Skip to content

Commit a90e1d7

Browse files
authored
Merge pull request GoogleCloudPlatform#676 from GoogleCloudPlatform/update-endpoints-migration-sample
[Endpoints Framework] Updating migration sample for endpoints framework plugin GA
2 parents bc1ffac + fecf308 commit a90e1d7

File tree

3 files changed

+25
-6
lines changed

3 files changed

+25
-6
lines changed

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

+17
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ process is explained [here][8] and a quickstart is provided [here][9].
3535
- [Google Cloud Endpoints Frameworks Gradle Plugin][11]
3636

3737
## Setup
38+
1. Change `YOUR-PROJECT-ID` with your project id in the hostname parameter
39+
defined in either the Maven or Gradle build script. Hostname is used when a
40+
discovery document is generated.
41+
42+
- [Maven - pom.xml](pom.xml#L101)
43+
- [Gradle - build.gradle](build.gradle#L77)
44+
3845
1. [Optional]: User Authenticating with Google Accounts in Web Clients
3946

4047
1. Update the `WEB_CLIENT_ID` in [Constants.java](src/main/java/com/example/helloendpoints/Constants.java)
@@ -88,6 +95,11 @@ process is explained [here][8] and a quickstart is provided [here][9].
8895
8996
[http://localhost:8080/_ah/api/explorer][13]
9097
98+
1. Generate the discovery document located at
99+
`target/discovery-docs/helloworld-v1-rest.discovery` by using:
100+
101+
`mvn endpoints-framework:discoveryDocs`
102+
91103
1. Generate the client library located at
92104
`target/client-libs/helloworld-v1-java.zip` by using:
93105
@@ -111,6 +123,11 @@ process is explained [here][8] and a quickstart is provided [here][9].
111123
112124
[http://localhost:8080/_ah/api/explorer][13]
113125
126+
1. Generate the discovery document located at
127+
`build/endpointsDiscoveryDocs/helloworld-v1-rest.discovery` by using:
128+
129+
`gradle endpointsDiscoveryDocs`
130+
114131
1. Generate the client library located at
115132
`build/endpointsClientLibs/helloworld-v1-java.zip` by using:
116133

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

+6-5
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ buildscript { // Configuration for building
2020
}
2121
dependencies {
2222
// App Engine Gradle plugin
23-
classpath 'com.google.cloud.tools:appengine-gradle-plugin:1.3.0'
23+
classpath 'com.google.cloud.tools:appengine-gradle-plugin:+'
2424

2525
// Endpoints Frameworks Gradle plugin
26-
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:1.0.0-beta9'
26+
classpath 'com.google.cloud.tools:endpoints-framework-gradle-plugin:+'
2727
}
2828
}
2929
// [END buildscript]
@@ -55,7 +55,7 @@ dependencies {
5555

5656
// Endpoints Frameworks v2.0
5757
// [START endpoints-tools]
58-
compile group: 'com.google.endpoints', name: 'endpoints-framework-tools', version: '2.0.7'
58+
compile group: 'com.google.endpoints', name: 'endpoints-framework', version: '2.0.7'
5959
// [END endpoints-tools]
6060
// End of Endpoints Frameworks v2.0
6161
}
@@ -71,11 +71,12 @@ appengine { // App Engine tasks configuration
7171
}
7272
}
7373

74-
/* [START endpoints-server]
74+
// [START endpoints-server]
7575
endpointsServer {
7676
// Endpoints Framework Plugin server-side configuration
77+
hostname = "YOUR-PROJECT-ID.appspot.com"
7778
}
78-
[END endpoints-server] */
79+
// [END endpoints-server]
7980

8081
group = 'com.example.helloendpoints' // Generated output GroupId
8182
version = '1' // Version in generated output

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ limitations under the License.
9595
<plugin>
9696
<groupId>com.google.cloud.tools</groupId>
9797
<artifactId>endpoints-framework-maven-plugin</artifactId>
98-
<version>1.0.0-beta5</version>
98+
<version>1.0.0</version>
9999
<configuration>
100100
<!-- plugin configuration -->
101+
<hostname>YOUR-PROJECT-ID.appspot.com</hostname>
101102
</configuration>
102103
</plugin>
103104
<!-- [END endpoints-frameworks-plugin] -->

0 commit comments

Comments
 (0)