archetype-resources.README.md Maven / Gradle / Ivy
#set( $pound = '#' )
App Engine Java Guestbook
=========================
Sample guestbook for use with App Engine Java.
See the [Google App Engine standard environment documentation][ae-docs] for more
detailed instructions.
[ae-docs]: https://cloud.google.com/appengine/docs/java/
* [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
* [Maven](https://maven.apache.org/download.cgi) (at least 3.5)
* [Google Cloud SDK](https://cloud.google.com/sdk/) (aka gcloud)
$pound$pound Setup
gcloud init
gcloud auth application-default login
$pound$pound Maven
$pound$pound$pound Running locally
#if ( $CloudSDK_Tooling == "true" )
mvn appengine:run
#else
mvn appengine:devserver
#end
$pound$pound$pound Deploying
#if ( $CloudSDK_Tooling == "true" )
mvn appengine:deploy
#else
mvn appengine:update
#end
$pound$pound Testing
mvn verify
As you add / modify the source code (`src/main/java/...`) it's very useful to add
[unit testing](https://cloud.google.com/appengine/docs/java/tools/localunittesting)
to (`src/main/test/...`). The following resources are quite useful:
* [Junit4](http://junit.org/junit4/)
* [Mockito](http://mockito.org/)
* [Truth](http://google.github.io/truth/)
$pound$pound Updating to latest Artifacts
An easy way to keep your projects up to date is to use the maven [Versions plugin][versions-plugin].
mvn versions:display-plugin-updates
mvn versions:display-dependency-updates
mvn versions:use-latest-versions
Note - Be careful when changing `javax.servlet` as App Engine Standard uses 3.1 for Java 8, and 2.5
for Java 7.
Our usual process is to test, update the versions, then test again before committing back.
[plugin]: http://www.mojohaus.org/versions-maven-plugin/
© 2015 - 2025 Weber Informatics LLC | Privacy Policy