From ec97ff5b000821589ed94437ff5a67fc43100ec6 Mon Sep 17 00:00:00 2001 From: "philip.liard@gmail.com" Date: Thu, 8 Dec 2011 13:38:07 +0000 Subject: [PATCH] JAVA: Add Maven support for the libphonenumber demo. That lets the demo be part of the libphonenumber Maven project thus adds the following benefits: - Automatically update the version of the demo and the libphonenumber artifact the demo depends on when performing a release. - Let Maven handle the deployment of the demo to AppEngine without any need to install the AppEngine SDK. - No need to push the dependency JARs (servlet, apache common fileupload/io) even if they are still here to let you use Ant if you prefer. Note that this CL depends on CL 5395054. Review URL: http://codereview.appspot.com/5405041 git-svn-id: http://libphonenumber.googlecode.com/svn/trunk@409 ee073f10-1060-11df-b6a4-87a95322a99c --- java/demo/README | 16 ++++++++ java/demo/pom.xml | 103 +++++++++++++++++++++++++++++++++++++++++++++++++ java/pom.xml | 1 + tools/java/data/README | 5 ++- 4 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 java/demo/README create mode 100644 java/demo/pom.xml diff --git a/java/demo/README b/java/demo/README new file mode 100644 index 0000000..29a46a1 --- /dev/null +++ b/java/demo/README @@ -0,0 +1,16 @@ +How to install the Appengine SDK to the Maven local repository? +Note that this needs to be done only once. + $ mvn gae:unpack + Note that you don't need to manually download any SDK. + +How to generate the WAR? + $ mvn package + $ mvn war:war + Note that this must be done before running the webapp locally and before + deploying it to Appengine. + +How to run the webapp locally? + $ mvn gae:run + +How to deploy the webapp to Appengine? + $ mvn gae:update diff --git a/java/demo/pom.xml b/java/demo/pom.xml new file mode 100644 index 0000000..11f34f6 --- /dev/null +++ b/java/demo/pom.xml @@ -0,0 +1,103 @@ + + + 4.0.0 + + libphonenumber-parent + com.googlecode.libphonenumber + 4.4-SNAPSHOT + + com.googlecode.libphonenumber + demo + 4.4-SNAPSHOT + + + 1.5.4 + + + + + mvnrepository + http://mvnrepository.com/artifact/ + + true + + + + + + + javax.servlet + servlet-api + 2.5 + + + org.apache.commons + commons-io + 1.3.2 + + + commons-fileupload + commons-fileupload + 1.2 + + + com.googlecode.libphonenumber + libphonenumber + 4.4-SNAPSHOT + + + com.googlecode.libphonenumber + geocoder + 1.8-SNAPSHOT + + + + + src + test + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.6 + 1.6 + + + + net.kindleit + maven-gae-plugin + 0.9.1 + + + org.apache.maven.plugins + maven-war-plugin + 2.1.1 + + war + + + + org.mortbay.jetty + maven-jetty-plugin + 6.1.10 + + webapp + 10 + + / + + + + 8080 + 60000 + + + + + + + + diff --git a/java/pom.xml b/java/pom.xml index d20e315..4f6b21b 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -80,6 +80,7 @@ libphonenumber geocoder + demo diff --git a/tools/java/data/README b/tools/java/data/README index 099cbf7..29a46a1 100644 --- a/tools/java/data/README +++ b/tools/java/data/README @@ -4,9 +4,10 @@ Note that this needs to be done only once. Note that you don't need to manually download any SDK. How to generate the WAR? -Note that this must be done before running the webapp locally and before -deploying it to Appengine. + $ mvn package $ mvn war:war + Note that this must be done before running the webapp locally and before + deploying it to Appengine. How to run the webapp locally? $ mvn gae:run -- 2.7.4