title: Google PubSub Error in AppEngine Standard Java8: java.lang.NoSuchFieldError: CONTEXT_SPAN_KEY
body: <p>I have a webapp running on AppEngine Standard Java8. The app needs to publish messages to Google PubSub. whenever this line executes:</p>
  
  <pre><code>ApiFuture&lt;String&gt; messageIdFuture = publisher.publish(pubsubMessage);
  </code></pre>
  
  <p>It will throw out error "java.lang.NoSuchFieldError: CONTEXT_SPAN_KEY". io.grpc.internal.CensusTracingModule$TracingClientInterceptor.interceptCall(CensusTracingModule.java:380). Looks like I use either newer or older version of one "library" that does not have CONTEXT_SPAN_KEY. Anyone know how to target to this library?</p>
  
  <p>I am new to Google App Engine (Java8) and PubSub and this is my first stackoverflow post.</p>
  
  <p>For the past 2 days I've been struggling to find out the root cause of this error but no luck so far. Would greatly appreciate if anyone can help!</p>
  
  <p>Here is the code:</p>
  
  <pre class="lang-java prettyprint-override"><code>PubsubMessage pubsubMessage = PubsubMessage.newBuilder().setData(ByteString.copyFromUtf8(payload)).build();
  
    ApiFuture&lt;String&gt; messageIdFuture = publisher.publish(pubsubMessage);
  
    // Add an asynchronous callback to handle success / failure
    ApiFutures.addCallback(messageIdFuture, new ApiFutureCallback&lt;String&gt;() {
  
      @Override
      public void onFailure(Throwable throwable) {
        throwable.printStackTrace();
  
        if (throwable instanceof ApiException) {
          ApiException apiException = ((ApiException) throwable);
          // details on the API exception
          System.out.println(apiException.getStatusCode().getCode());
          System.out.println(apiException.isRetryable());
        }
        System.out.println("Error publishing message");
      }
  </code></pre>
  
  <p>Here is the error message:</p>
  
  <pre><code>[INFO] GCLOUD: INFO: Dev App Server is now running
  [INFO] GCLOUD:  published: 
  [INFO] GCLOUD: java.lang.NoSuchFieldError: CONTEXT_SPAN_KEY
  [INFO] GCLOUD:  at io.grpc.internal.CensusTracingModule$TracingClientInterceptor.interceptCall(CensusTracingModule.java:380)
  [INFO] GCLOUD: Error publishing message
  [INFO] GCLOUD:  at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:104)
  [INFO] GCLOUD:  at io.grpc.internal.CensusStatsModule$StatsClientInterceptor.interceptCall(CensusStatsModule.java:675)
  [INFO] GCLOUD:  at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:104)
  [INFO] GCLOUD:  at com.google.api.gax.grpc.GrpcHeaderInterceptor.interceptCall(GrpcHeaderInterceptor.java:81)
  [INFO] GCLOUD:  at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:104)
  [INFO] GCLOUD:  at com.google.api.gax.grpc.GrpcMetadataHandlerInterceptor.interceptCall(GrpcMetadataHandlerInterceptor.java:55)
  [INFO] GCLOUD:  at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:104)
  [INFO] GCLOUD:  at io.grpc.internal.ManagedChannelImpl.newCall(ManagedChannelImpl.java:636)
  [INFO] GCLOUD:  at com.google.api.gax.grpc.ChannelPool.newCall(ChannelPool.java:77)
  [INFO] GCLOUD:  at com.google.api.gax.grpc.GrpcClientCalls.newCall(GrpcClientCalls.java:75)
  [INFO] GCLOUD:  at com.google.api.gax.grpc.GrpcDirectCallable.futureCall(GrpcDirectCallable.java:58)
  [INFO] GCLOUD:  at com.google.api.gax.grpc.GrpcExceptionCallable.futureCall(GrpcExceptionCallable.java:62)
  [INFO] GCLOUD:  at com.google.api.gax.rpc.AttemptCallable.call(AttemptCallable.java:75)
  [INFO] GCLOUD:  at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:63)
  [INFO] GCLOUD:  at com.google.api.gax.rpc.RetryingCallable.futureCall(RetryingCallable.java:41)
  [INFO] GCLOUD:  at com.google.api.gax.rpc.BatchingCallable.futureCall(BatchingCallable.java:79)
  [INFO] GCLOUD:  at com.google.api.gax.rpc.UnaryCallable$1.futureCall(UnaryCallable.java:126)
  [INFO] GCLOUD:  at com.google.api.gax.rpc.UnaryCallable.futureCall(UnaryCallable.java:87)
  [INFO] GCLOUD:  at com.google.cloud.pubsub.v1.Publisher.publishOutstandingBatch(Publisher.java:322)
  [INFO] GCLOUD:  at com.google.cloud.pubsub.v1.Publisher.publishAllOutstanding(Publisher.java:311)
  [INFO] GCLOUD:  at com.google.cloud.pubsub.v1.Publisher$3.run(Publisher.java:285)
  [INFO] GCLOUD:  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  [INFO] GCLOUD:  at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  [INFO] GCLOUD:  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
  [INFO] GCLOUD:  at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
  [INFO] GCLOUD:  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  [INFO] GCLOUD:  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  [INFO] GCLOUD:  at java.lang.Thread.run(Thread.java:745)
  [INFO] GCLOUD: Oct 12, 2018 7:25:22 AM com.google.api.server.spi.handlers.EndpointsMethodHandler$RestHandler handle
  [INFO] GCLOUD: WARNING: exception occurred while invoking backend method
  [INFO] GCLOUD: java.io.IOException: com.fasterxml.jackson.databind.JsonMappingException: ProjectTopicName.getType() not supported (through reference chain: com.google.cloud.pubsub.v1.Publisher["topicName"]-&gt;com.google.pubsub.v1.ProjectTopicName["type"])
  [INFO] GCLOUD:  at com.google.api.server.spi.response.ServletResponseResultWriter.writeValueAsString(ServletResponseResultWriter.java:212)
  [INFO] GCLOUD:  at com.google.api.server.spi.response.ServletResponseResultWriter.write(ServletResponseResultWriter.java:101)
  [INFO] GCLOUD:  at com.google.api.server.spi.SystemService.invokeServiceMethod(SystemService.java:352)
  [INFO] GCLOUD:  at com.google.api.server.spi.handlers.EndpointsMethodHandler$RestHandler.handle(EndpointsMethodHandler.java:119)
  [INFO] GCLOUD:  at com.google.api.server.spi.handlers.EndpointsMethodHandler$RestHandler.handle(EndpointsMethodHandler.java:102)
  [INFO] GCLOUD:  at com.google.api.server.spi.dispatcher.PathDispatcher.dispatch(PathDispatcher.java:50)
  [INFO] GCLOUD:  at com.google.api.server.spi.EndpointsServlet.service(EndpointsServlet.java:72)
  [INFO] GCLOUD:  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  [INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)
  [INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)
  [INFO] GCLOUD:  at com.google.api.control.ControlFilter.doFilter(ControlFilter.java:331)
  [INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
  [INFO] GCLOUD:  at com.google.api.control.ConfigFilter.doFilter(ConfigFilter.java:125)
  [INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
  [INFO] GCLOUD:  at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:134)
  [INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
  [INFO] GCLOUD:  at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
  [INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
  [INFO] GCLOUD:  at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63)
  [INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
  [INFO] GCLOUD:  at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:48)
  [INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
  [INFO] GCLOUD:  at com.google.appengine.tools.development.jetty9.StaticFileFilter.doFilter(StaticFileFilter.java:123)
  [INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
  [INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectRequest(DevAppServerModulesFilter.java:366)
  [INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModuleRequest(DevAppServerModulesFilter.java:349)
  [INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAppServerModulesFilter.java:116)
  [INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)
  [INFO] GCLOUD:  at com.google.appengine.tools.development.DevAppServerRequestLogFilter.doFilter(DevAppServerRequestLogFilter.java:44)
  [INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
  [INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
  [INFO] GCLOUD:  at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
  [INFO] GCLOUD:  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)
  [INFO] GCLOUD:  at com.google.appengine.tools.development.jetty9.DevAppEngineWebAppContext.doScope(DevAppEngineWebAppContext.java:94)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
  [INFO] GCLOUD:  at com.google.appengine.tools.development.jetty9.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:595)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.Server.handle(Server.java:531)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)
  [INFO] GCLOUD:  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
  [INFO] GCLOUD:  at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
  [INFO] GCLOUD:  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
  [INFO] GCLOUD:  at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
  [INFO] GCLOUD:  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762)
  [INFO] GCLOUD:  at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680)
  [INFO] GCLOUD:  at java.lang.Thread.run(Thread.java:745)
  [INFO] GCLOUD: Caused by: com.fasterxml.jackson.databind.JsonMappingException: ProjectTopicName.getType() not supported (through reference chain: com.google.cloud.pubsub.v1.Publisher["topicName"]-&gt;com.google.pubsub.v1.ProjectTopicName["type"])
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:391)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath(JsonMappingException.java:351)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.ser.std.StdSerializer.wrapAndThrow(StdSerializer.java:316)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:727)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:727)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:719)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:155)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider._serialize(DefaultSerializerProvider.java:480)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:319)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.ObjectWriter$Prefetch.serialize(ObjectWriter.java:1396)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.ObjectWriter._configAndWriteValue(ObjectWriter.java:1120)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.ObjectWriter.writeValueAsString(ObjectWriter.java:993)
  [INFO] GCLOUD:  at com.google.api.server.spi.response.ServletResponseResultWriter.writeValueAsString(ServletResponseResultWriter.java:210)
  [INFO] GCLOUD:  ... 56 more
  [INFO] GCLOUD: Caused by: java.lang.UnsupportedOperationException: ProjectTopicName.getType() not supported
  [INFO] GCLOUD:  at com.google.pubsub.v1.ProjectTopicName.getType(ProjectTopicName.java:130)
  [INFO] GCLOUD:  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [INFO] GCLOUD:  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  [INFO] GCLOUD:  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  [INFO] GCLOUD:  at java.lang.reflect.Method.invoke(Method.java:498)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:687)
  [INFO] GCLOUD:  at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:719)
  [INFO] GCLOUD:  ... 66 more
  [INFO] GCLOUD: 
  </code></pre>
  
  <p>pom.xml</p>
  
  <pre><code>&lt;project&gt;
  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;groupId&gt;com.example.test&lt;/groupId&gt;
  &lt;artifactId&gt;appengine-pubsub&lt;/artifactId&gt;
  &lt;prerequisites&gt;
      &lt;maven&gt;3.0&lt;/maven&gt;
  &lt;/prerequisites&gt;
  
  &lt;properties&gt;
      &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
  
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
  
      &lt;endpoints.framework.version&gt;2.1.2&lt;/endpoints.framework.version&gt;
      &lt;endpoints.management.version&gt;1.0.10&lt;/endpoints.management.version&gt;
  
      &lt;google.datastore.version&gt;1.38.0&lt;/google.datastore.version&gt;
  
      &lt;io.netty.all&gt;5.0.0.Alpha2&lt;/io.netty.all&gt;
  
      &lt;endpoints.project.id&gt;my-very-first-project-id&lt;/endpoints.project.id&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;!-- Google --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.endpoints&lt;/groupId&gt;
          &lt;artifactId&gt;endpoints-framework&lt;/artifactId&gt;
          &lt;version&gt;${endpoints.framework.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.endpoints&lt;/groupId&gt;
          &lt;artifactId&gt;endpoints-management-control-appengine-all&lt;/artifactId&gt;
          &lt;version&gt;${endpoints.management.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.endpoints&lt;/groupId&gt;
          &lt;artifactId&gt;endpoints-management-control-appengine&lt;/artifactId&gt;
          &lt;version&gt;${endpoints.management.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.endpoints&lt;/groupId&gt;
          &lt;artifactId&gt;endpoints-framework-auth&lt;/artifactId&gt;
          &lt;version&gt;${endpoints.management.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.appengine&lt;/groupId&gt;
          &lt;artifactId&gt;appengine-api-1.0-sdk&lt;/artifactId&gt;
          &lt;version&gt;1.9.64&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/com.google.cloud/google-cloud-pubsub --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.cloud&lt;/groupId&gt;
          &lt;artifactId&gt;google-cloud-pubsub&lt;/artifactId&gt;
          &lt;version&gt;0.48.0-beta&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/com.google.code.gson/gson --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.code.gson&lt;/groupId&gt;
          &lt;artifactId&gt;gson&lt;/artifactId&gt;
          &lt;version&gt;2.8.5&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- javax --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
          &lt;version&gt;3.1.0&lt;/version&gt;
          &lt;type&gt;jar&lt;/type&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.inject&lt;/groupId&gt;
          &lt;artifactId&gt;javax.inject&lt;/artifactId&gt;
          &lt;version&gt;1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/org.json/json --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.json&lt;/groupId&gt;
          &lt;artifactId&gt;json&lt;/artifactId&gt;
          &lt;version&gt;20180813&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.ws.rs&lt;/groupId&gt;
          &lt;artifactId&gt;javax.ws.rs-api&lt;/artifactId&gt;
          &lt;version&gt;2.1.1&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- https://mvnrepository.com/artifact/com.google.protobuf/protobuf-java --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.google.protobuf&lt;/groupId&gt;
          &lt;artifactId&gt;protobuf-java&lt;/artifactId&gt;
          &lt;version&gt;3.6.1&lt;/version&gt;
      &lt;/dependency&gt;
  
  &lt;/dependencies&gt;
  
  &lt;build&gt;
      &lt;!-- for hot reload of the web application--&gt;
      &lt;outputDirectory&gt;${project.build.directory}/${project.build.finalName}/WEB-INF/classes
      &lt;/outputDirectory&gt;
      &lt;plugins&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.6&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;webResources&gt;
                      &lt;resources&gt;
                          &lt;directory&gt;${basedir}/src/main/webapp/WEB-INF&lt;/directory&gt;
                          &lt;filtering&gt;true&lt;/filtering&gt;
                          &lt;targetPath&gt;WEB-INF&lt;/targetPath&gt;
                      &lt;/resources&gt;
                  &lt;/webResources&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;com.google.cloud.tools&lt;/groupId&gt;
              &lt;artifactId&gt;appengine-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.3.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;!-- deploy configuration --&gt;
                  &lt;hostname&gt;${endpoints.project.id}.appspot.com&lt;/hostname&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;com.google.cloud.tools&lt;/groupId&gt;
              &lt;artifactId&gt;endpoints-framework-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.0.2&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;!-- plugin configuration --&gt;
                  &lt;hostname&gt;${endpoints.project.id}.appspot.com&lt;/hostname&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
              &lt;artifactId&gt;versions-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.3&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;phase&gt;compile&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;display-dependency-updates&lt;/goal&gt;
                          &lt;goal&gt;display-plugin-updates&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
  &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>