Skip to content
This repository was archived by the owner on Apr 13, 2022. It is now read-only.

update java repo tools for the gcloud branch#16

Merged
tswast merged 31 commits intogcloudfrom
tswast-gcloud-update-java-repo-tools
Jun 30, 2016
Merged

update java repo tools for the gcloud branch#16
tswast merged 31 commits intogcloudfrom
tswast-gcloud-update-java-repo-tools

Conversation

@tswast
Copy link
Contributor

@tswast tswast commented Jun 28, 2016

tswast and others added 30 commits March 22, 2016 10:25
Fixes checkstyle errors in bookshelf sample.
I modify the checkstyle config to have SAME_PACKAGE imports appear
before third-party imports. I think this better matches the intent of
the import ordering rules in the style guide.
https://google.github.io/styleguide/javaguide.html#s3.3.3-import-ordering-and-spacing
Expecially since it says the `com.google` imports only appear after
static imports if the source file is in the `com.google` package space.
* Moved some checkstyle modules to java-repo-tools
* Moved some lines in .gitignore to the top level
Also update checkstyle to allow 1-letter variable names, since it
doesn't make sense to give long names to something like "arbitrary
column A that doesn't actually mean anything".
Samples are moved from:
https://cloud.google.com/appengine/docs/java/datastore/indexes

Note: I add a new script `test-devserver.sh` to the testing config. This
script runs the `mvn appengine:devserver` plugin, waits for it to start,
then verifies that it gets a non-error response from the `/` path. I use
this to verify that the `datastore-indexes.xml` files are correct (by
disabling autoGenerate, the local devserver throws an error when a query
is used without the correct index defined, just as production does).

We should probably add any "hello world" or other projects to this
check, as well. Anywhere we say to run `mvn appengine:devserver`, it
would be good to test that it is correct.
…e-from-java-docs-samples

Java repo tools update from java docs samples
This should make it easier to push upstream and pull downstream.
This script will allow us to run tests against a local server for
testing. Since the App Engine and Jetty server running and testing is so
similar, I combined the scripts rather than copying. The only
differences are which plugin to use and what string to wait for before
running curl.

Since the bookshelf sample also needs a `-Plocal` profile argument, I
extended the script to allow passing through arbitrary arguments to
Maven.
Run the local servers and verify they respond with code 200 to the "/"
path.

Note: bookshelf does not yet run in Travis, since we'll need to set up
client secrets credentials.
Also, update the README instructions for how to push changes upstream.
…-tools

Update java-repo-tools from getting-started-java.
Switch to codecov.io for coverage measurements.
Auto-update dependencies.
It's embarrassing having only 25% code coverage with literally just
Hello World. This should bump it up by subbing out stdout. See:
http://stackoverflow.com/a/2169336/101923
@lesv
Copy link
Contributor

lesv commented Jun 29, 2016

LGTM - seems like I'm seeing all the same code tonight, if only there was some tool that would let us share code so we only had to check it in once. I wonder what that kind of tool would look like. And once it exists, maybe there could be a website where we hosted that kind of thing -- I wonder what that would be called? I guess I'm only dreaming.

@tswast
Copy link
Contributor Author

tswast commented Jun 29, 2016

@lesv I bet we could package java-repo-tools with Maven. That's what the Python team is doing (packaging and publishing to PyPi). I'll ping you separately to figure out what the process is for publishing Maven packages.

@lesv
Copy link
Contributor

lesv commented Jun 29, 2016

SGTM - we'll do this next week then. I did give you an LGTM for now, however.

@tswast tswast merged commit 9e35ba4 into gcloud Jun 30, 2016
@tswast tswast deleted the tswast-gcloud-update-java-repo-tools branch June 30, 2016 16:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants