how to control groupId, artifactId, and version in generated pom.xml for endpoints client lib?

4 views
Skip to first unread message

Andy Dennie via StackOverflow

unread,
Oct 3, 2013, 10:21:48 AM10/3/13
to google-appengin...@googlegroups.com

I'm new to Google Cloud Endpoints. I'm at the point where I'm generating the java client library. I see that the generated maven project for the client library contains the following:

<groupId>some-group-id</groupId>
<artifactId>some-artifact-id</artifactId>
<version>v1-1.17.0-rc-SNAPSHOT</version>
<name>pub v1-1.17.0-rc-SNAPSHOT</name>

Through experimentation, I've determined that:

1) The groupId comes from the <application> element in appengine-web.xml. That's not exactly what I want. I'd like the groupId of the client library to match the groupId of the web service artifact from which it was generated.

2) the artifactId comes from the name specified by

@Api(name="foo")

in my endpoint source code. However, if my web service's artifactId is my-web-service, I'd like the generated client library's artifact to be my-web-service-client. But I don't want my API name to be "my-web-service-client".

3) The version seems to come from the version of the api client library generator itself. This really isn't what I want -- the version of my client library artifact should match the version of the artifact that the endpoint client library was generated from. That is, if the version number of my web service's artifact is 1.2.3-SNAPSHOT, that's what the version of the client library generated from it should be.

Are there mechanisms to override this? If I did override these values (manually, or via some script) would it break anything downstream that is assuming they have the originally generated values?



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/19161638/how-to-control-groupid-artifactid-and-version-in-generated-pom-xml-for-endpoin

Andy Dennie via StackOverflow

unread,
Oct 3, 2013, 11:01:49 AM10/3/13
to google-appengin...@googlegroups.com

I'm new to Google Cloud Endpoints. I'm at the point where I'm generating the java client library. I see that the generated maven project for the client library contains the following:

<groupId>com.appspot.foo</groupId>
<artifactId>bar</artifactId>
<version>v1-1.17.0-rc-SNAPSHOT</version>
<name>pub v1-1.17.0-rc-SNAPSHOT</name>

Through experimentation, I've determined that:

1) The groupId comes from the <application> element in appengine-web.xml, prepended with "com.appspot". That's not exactly what I want. I'd like the groupId of the client library to match the groupId of the web service artifact from which it was generated.

Andy Dennie via StackOverflow

unread,
Oct 3, 2013, 6:09:51 PM10/3/13
to google-appengin...@googlegroups.com

I'm new to Google Cloud Endpoints. I'm at the point where I'm generating the java client library. I see that the generated maven project for the client library contains the following:

<groupId>com.appspot.foo</groupId>
<artifactId>bar</artifactId>
<version>v1-1.17.0-rc-SNAPSHOT</version>
<name>pub v1-1.17.0-rc-SNAPSHOT</name>

Through experimentation, I've determined that:

1) The groupId comes from the <application> element in appengine-web.xml, prepended with "com.appspot". That's not exactly what I want. I'd like the groupId of the client library to match the groupId of the web service artifact from which it was generated.

2) the artifactId comes from the name specified by the @Api annotation for my service:

@Api(name="bar")
Reply all
Reply to author
Forward
0 new messages