Skip to content

Commit cae8541

Browse files
author
Frank Natividad
committed
applying changes from archetypes.
1 parent c90a83d commit cae8541

File tree

6 files changed

+22
-33
lines changed

6 files changed

+22
-33
lines changed

appengine/endpoints-frameworks-v2/migration-example/README.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ process is explained [here][8] and a quickstart is provided [here][9].
6161
client IDs registered in the
6262
[Credentials on Developers Console for OAuth 2.0 client IDs][6].
6363

64+
- Note: iOS support should work but has not been fully tested.
65+
6466
- These client IDs are used when defining annotation for this sample API
6567
found in [Greetings.java](src/main/java/com/example/helloendpoints/Greetings.java).
6668

@@ -83,13 +85,9 @@ process is explained [here][8] and a quickstart is provided [here][9].
8385
8486
### Maven
8587
86-
1. Build a fresh binary by using:
87-
88-
`mvn clean compile`
88+
1. Build and Run the application locally at [http://localhost:8080][5] by using:
8989
90-
1. Run the application locally at [http://localhost:8080][5] by using:
91-
92-
`mvn appengine:run`
90+
`mvn clean appengine:run`
9391
9492
1. Explore local server's API explorer by browsing to:
9593
@@ -105,19 +103,15 @@ process is explained [here][8] and a quickstart is provided [here][9].
105103
106104
`mvn endpoints-framework:clientLibs`
107105
108-
1. Deploy your application to Google App Engine by using:
106+
1. Build and Deploy your application to Google App Engine by using:
109107
110-
`mvn appengine:deploy`
108+
`mvn clean appengine:deploy`
111109
112110
### Gradle
113111
114-
1. Build a fresh binary by using:
112+
1. Build and Run the application locally at [http://localhost:8080][5] by using:
115113
116-
`gradle clean compileJava`
117-
118-
1. Run the application locally at [http://localhost:8080][5] by using:
119-
120-
`gradle appengineRun`
114+
`gradle clean appengineRun`
121115
122116
1. Explore local server's API explorer by browsing to:
123117
@@ -137,7 +131,6 @@ process is explained [here][8] and a quickstart is provided [here][9].
137131
138132
`gradle appengineDeploy`
139133
140-
141134
[1]: https://cloud.google.com/appengine/docs/java/
142135
[2]: http://java.com/en/
143136
[3]: https://cloud.google.com/endpoints/docs/frameworks/legacy/v1/java

appengine/endpoints-frameworks-v2/migration-example/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ dependencies {
4949
compile 'jstl:jstl:1.2'
5050
compile group: 'javax.inject', name: 'javax.inject', version: '1'
5151

52-
// Uncomment to use Endpoints Frameworks v1.0
53-
// compile group: 'com.google.appengine', name: 'appengine-endpoints', version: '1.9.48'
52+
// Uncomment to use Endpoints Frameworks v1.0 and comment the v2.0 section
53+
// compile group: 'com.google.appengine', name: 'appengine-endpoints', version: '+'
5454
// End of Endpoints Frameworks v1.0
5555

5656
// Endpoints Frameworks v2.0
5757
// [START endpoints-tools]
58-
compile group: 'com.google.endpoints', name: 'endpoints-framework', version: '2.0.7'
58+
compile group: 'com.google.endpoints', name: 'endpoints-framework', version: '+'
5959
// [END endpoints-tools]
6060
// End of Endpoints Frameworks v2.0
6161
}

appengine/endpoints-frameworks-v2/migration-example/pom.xml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,27 +30,20 @@ limitations under the License.
3030
</parent>
3131

3232
<properties>
33-
<javax.inject.version>1</javax.inject.version>
3433
<maven.compiler.source>1.7</maven.compiler.source>
3534
<maven.compiler.target>1.7</maven.compiler.target>
36-
<mojo.versions.maven.version>2.3</mojo.versions.maven.version>
3735
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
38-
<servlet.api.version>2.5</servlet.api.version>
3936
</properties>
4037

41-
<prerequisites>
42-
<maven>3.3.9</maven>
43-
</prerequisites>
44-
4538
<dependencies>
4639
<!-- Compile/runtime dependencies -->
47-
<!-- Uncomment to use Endpoints Frameworks v1.0 -->
40+
<!-- Uncomment to use Endpoints Frameworks v1.0 and comment the v2.0 section -->
4841
<!--
4942
[START appengine-endpoints]
5043
<dependency>
5144
<groupId>com.google.appengine</groupId>
5245
<artifactId>appengine-endpoints</artifactId>
53-
<version>1.9.48</version>
46+
<version>1.9.53</version>
5447
</dependency>
5548
[END appengine-endpoints]
5649
-->
@@ -67,13 +60,13 @@ limitations under the License.
6760
<dependency>
6861
<groupId>javax.servlet</groupId>
6962
<artifactId>servlet-api</artifactId>
70-
<version>${servlet.api.version}</version>
63+
<version>2.5</version>
7164
<scope>provided</scope>
7265
</dependency>
7366
<dependency>
7467
<groupId>javax.inject</groupId>
7568
<artifactId>javax.inject</artifactId>
76-
<version>${javax.inject.version}</version>
69+
<version>1</version>
7770
</dependency>
7871
</dependencies>
7972

@@ -105,7 +98,7 @@ limitations under the License.
10598
<plugin>
10699
<groupId>org.codehaus.mojo</groupId>
107100
<artifactId>versions-maven-plugin</artifactId>
108-
<version>${mojo.versions.maven.version}</version>
101+
<version>2.3</version>
109102
<executions>
110103
<execution>
111104
<phase>compile</phase>

appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Constants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
public class Constants {
2323
public static final String WEB_CLIENT_ID = "replace this with your web client ID";
2424
public static final String ANDROID_CLIENT_ID = "replace this with your Android client ID";
25+
public static final String IOS_CLIENT_ID = "replace this with your iOS client ID";
2526
public static final String ANDROID_AUDIENCE = WEB_CLIENT_ID;
2627

2728
public static final String EMAIL_SCOPE = "https://www.googleapis.com/auth/userinfo.email";

appengine/endpoints-frameworks-v2/migration-example/src/main/java/com/example/helloendpoints/Greetings.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@
3434
*/
3535
@Api(name = "helloworld",
3636
version = "v1",
37+
// You can add additional SCOPES as a comma separated list of values
3738
scopes = {Constants.EMAIL_SCOPE},
38-
clientIds = {Constants.WEB_CLIENT_ID, Constants.ANDROID_CLIENT_ID},
39+
clientIds = {Constants.WEB_CLIENT_ID, Constants.ANDROID_CLIENT_ID, Constants.IOS_CLIENT_ID},
3940
audiences = {Constants.ANDROID_AUDIENCE}
4041
)
4142
public class Greetings {

appengine/endpoints-frameworks-v2/migration-example/src/main/webapp/WEB-INF/web.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<?xml version="1.0" encoding="utf-8" standalone="no"?><web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
1+
<?xml version="1.0" encoding="utf-8" standalone="no"?>
2+
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
23
<!--
34
Copyright 2017 Google Inc.
45
@@ -14,7 +15,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1415
See the License for the specific language governing permissions and
1516
limitations under the License.
1617
-->
17-
<!-- Uncomment to use Endpoints Frameworks v1.0 -->
18+
<!-- Uncomment to use Endpoints Frameworks v1.0 and comment the v2.0 section -->
1819
<!--
1920
[START appengine-endpoints]
2021
<servlet>

0 commit comments

Comments
 (0)