Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloud-firestore issue when running in DevAppServer GAE Standard Java 8 #2544

Closed
ifigotin opened this issue Oct 20, 2017 · 5 comments
Closed
Assignees
Labels
api: firestore Issues related to the Firestore API. priority: p2 Moderately-important priority. Fix may not be included in next release. running on app engine type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@ifigotin
Copy link

ifigotin commented Oct 20, 2017

When using the latest Firestore library we are getting the following error (in devappserver, GAE Standard, Java 8):

Caused by: com.google.apphosting.api.ApiProxy$CallNotFoundException: Can't make API call urlfetch.Fetch in a thread that is neither the original request thread nor a thread created by ThreadManager at com.google.apphosting.api.ApiProxy$CallNotFoundException.foreignThread(ApiProxy.java:844) at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:116) at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:40) at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.fetchResponse(URLFetchServiceStreamHandler.java:543) at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getInputStream(URLFetchServiceStreamHandler.java:422) at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getResponseCode(URLFetchServiceStreamHandler.java:275) at com.google.api.client.http.javanet.NetHttpResponse.<init>(NetHttpResponse.java:37) at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:105) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:981) at com.google.auth.oauth2.UserCredentials.refreshAccessToken(UserCredentials.java:210) at com.google.auth.oauth2.OAuth2Credentials.refresh(OAuth2Credentials.java:160) at com.google.auth.oauth2.OAuth2Credentials.getRequestMetadata(OAuth2Credentials.java:146) at io.grpc.auth.GoogleAuthLibraryCallCredentials$1.run(GoogleAuthLibraryCallCredentials.java:98)

The issue is triggered by a simple example:

  @Override
  protected void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
    Firestore firestore = FirestoreOptions.getDefaultInstance().toBuilder().build().getService();
    // Firestore firestore = FirestoreClient.getFirestore();
    DocumentReference doc = firestore.collection("cities").document("Mountain View");
    try {
      resp.getWriter().println("Count: " + doc.get().get().get("count"));
    } catch (Exception e) {
      throw new ServletException(e);
    }
  }

This one may be similar to the following two issues we fixed earlier:
#2150
#2275
#2306
#2300

@neozwu is this the same issue?

@vam-google vam-google added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. running on app engine api: firestore Issues related to the Firestore API. labels Oct 23, 2017
@garrettjonesgoogle garrettjonesgoogle added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Oct 26, 2017
@neozwu
Copy link
Contributor

neozwu commented Oct 31, 2017

@ifigotin can I confirm whether this is only an issue on devserver, but not an issue on prod server ?

@pongad
Copy link
Contributor

pongad commented Feb 1, 2018

I'll close this due to inactivity. @ifigotin please reopen if required.

@pongad pongad closed this as completed Feb 1, 2018
@hiranya911
Copy link

This issue occurs in latest versions of dev app server as well:

[INFO] GCLOUD: javax.servlet.ServletException: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: UNAUTHENTICATED: Failed computing credential metadata
[INFO] GCLOUD: 	at com.google.firebase.examples.HelloAppEngine.doGet(HelloAppEngine.java:35)
[INFO] GCLOUD: 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
[INFO] GCLOUD: 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1772)
[INFO] GCLOUD: 	at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] GCLOUD: 	at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:128)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[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:1759)
[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:1759)
[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:1759)
[INFO] GCLOUD: 	at com.google.appengine.tools.development.jetty9.StaticFileFilter.doFilter(StaticFileFilter.java:122)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[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:1751)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
[INFO] GCLOUD: 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
[INFO] GCLOUD: 	at com.google.appengine.tools.development.jetty9.DevAppEngineWebAppContext.doScope(DevAppEngineWebAppContext.java:112)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
[INFO] GCLOUD: 	at com.google.appengine.tools.development.jetty9.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:596)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.Server.handle(Server.java:534)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
[INFO] GCLOUD: 	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
[INFO] GCLOUD: 	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
[INFO] GCLOUD: 	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
[INFO] GCLOUD: 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
[INFO] GCLOUD: 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
[INFO] GCLOUD: 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
[INFO] GCLOUD: 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: 	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: 	at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: Caused by: 
[INFO] GCLOUD: java.util.concurrent.ExecutionException: io.grpc.StatusRuntimeException: UNAUTHENTICATED: Failed computing credential metadata
[INFO] GCLOUD: 	at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:500)
[INFO] GCLOUD: 	at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:479)
[INFO] GCLOUD: 	at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:76)
[INFO] GCLOUD: 	at com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:62)
[INFO] GCLOUD: 	at com.google.firebase.examples.HelloAppEngine.doGet(HelloAppEngine.java:30)
[INFO] GCLOUD: 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
[INFO] GCLOUD: 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:848)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1772)
[INFO] GCLOUD: 	at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[INFO] GCLOUD: 	at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:128)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[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:1759)
[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:1759)
[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:1759)
[INFO] GCLOUD: 	at com.google.appengine.tools.development.jetty9.StaticFileFilter.doFilter(StaticFileFilter.java:122)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1759)
[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:1751)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
[INFO] GCLOUD: 	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
[INFO] GCLOUD: 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
[INFO] GCLOUD: 	at com.google.appengine.tools.development.jetty9.DevAppEngineWebAppContext.doScope(DevAppEngineWebAppContext.java:112)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
[INFO] GCLOUD: 	at com.google.appengine.tools.development.jetty9.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:596)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.Server.handle(Server.java:534)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
[INFO] GCLOUD: 	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
[INFO] GCLOUD: 	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)
[INFO] GCLOUD: 	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110)
[INFO] GCLOUD: 	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
[INFO] GCLOUD: 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
[INFO] GCLOUD: 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
[INFO] GCLOUD: 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
[INFO] GCLOUD: 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
[INFO] GCLOUD: 	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
[INFO] GCLOUD: 	at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: Caused by: 
[INFO] GCLOUD: io.grpc.StatusRuntimeException: UNAUTHENTICATED: Failed computing credential metadata
[INFO] GCLOUD: 	at io.grpc.Status.asRuntimeException(Status.java:526)
[INFO] GCLOUD: 	at com.google.api.gax.grpc.GrpcDirectStreamController$ResponseObserverAdapter.onClose(GrpcDirectStreamController.java:127)
[INFO] GCLOUD: 	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41)
[INFO] GCLOUD: 	at io.grpc.internal.CensusStatsModule$StatsClientInterceptor$1$1.onClose(CensusStatsModule.java:684)
[INFO] GCLOUD: 	at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41)
[INFO] GCLOUD: 	at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:392)
[INFO] GCLOUD: 	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:475)
[INFO] GCLOUD: 	at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
[INFO] GCLOUD: 	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:557)
[INFO] GCLOUD: 	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:478)
[INFO] GCLOUD: 	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:590)
[INFO] GCLOUD: 	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
[INFO] GCLOUD: 	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
[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:1149)
[INFO] GCLOUD: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[INFO] GCLOUD: 	at java.lang.Thread.run(Thread.java:748)
[INFO] GCLOUD: Caused by: 
[INFO] GCLOUD: com.google.apphosting.api.ApiProxy$CallNotFoundException: Can't make API call urlfetch.Fetch in a thread that is neither the original request thread nor a thread created by ThreadManager
[INFO] GCLOUD: 	at com.google.apphosting.api.ApiProxy$CallNotFoundException.foreignThread(ApiProxy.java:844)
[INFO] GCLOUD: 	at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:116)
[INFO] GCLOUD: 	at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:40)
[INFO] GCLOUD: 	at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.fetchResponse(URLFetchServiceStreamHandler.java:543)
[INFO] GCLOUD: 	at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getInputStream(URLFetchServiceStreamHandler.java:422)
[INFO] GCLOUD: 	at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection.getResponseCode(URLFetchServiceStreamHandler.java:275)
[INFO] GCLOUD: 	at com.google.api.client.http.javanet.NetHttpResponse.<init>(NetHttpResponse.java:37)
[INFO] GCLOUD: 	at com.google.api.client.http.javanet.NetHttpRequest.execute(NetHttpRequest.java:105)
[INFO] GCLOUD: 	at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:981)
[INFO] GCLOUD: 	at com.google.auth.oauth2.ServiceAccountCredentials.refreshAccessToken(ServiceAccountCredentials.java:378)
[INFO] GCLOUD: 	at com.google.auth.oauth2.OAuth2Credentials.refresh(OAuth2Credentials.java:160)
[INFO] GCLOUD: 	at com.google.auth.oauth2.OAuth2Credentials.getRequestMetadata(OAuth2Credentials.java:146)
[INFO] GCLOUD: 	at com.google.auth.Credentials.blockingGetToCallback(Credentials.java:103)
[INFO] GCLOUD: 	at com.google.auth.Credentials$1.run(Credentials.java:92)
[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:1149)
[INFO] GCLOUD: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[INFO] GCLOUD: 	at java.lang.Thread.run(Thread.java:748)

This was while trying to run a Firestore API call from the app.

@pongad
Copy link
Contributor

pongad commented Feb 26, 2018

@hiranya911 I'm not able to reproduce the problem. Could you let us know what SDK version you're using?

I'm testing with:

    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-api-1.0-sdk</artifactId>
      <version>1.9.60</version>
    </dependency>

@hiranya911
Copy link

Here's my pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project>
  <modelVersion>4.0.0</modelVersion>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>

  <groupId>com.google.firebase.examples</groupId>
  <artifactId>fireflicks-service</artifactId>

  <properties>
    <!-- uncomment if you wish to set your project here project- gcloud is used otherwise -->
    <!-- <app.deploy.project>hkj-firestore-bash</app.deploy.project> -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
    <archiveClasses>true</archiveClasses>
  </properties>

  <dependencies>
    <!-- Compile/runtime dependencies -->
    <dependency>
      <groupId>com.google.appengine</groupId>
      <artifactId>appengine-api-1.0-sdk</artifactId>
      <version>1.9.59</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.1.0</version>
      <type>jar</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.firebase</groupId>
      <artifactId>firebase-admin</artifactId>
      <version>5.9.0</version>
    </dependency>
  </dependencies>

  <build>
    <!-- for hot reload of the web application-->
    <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
    <plugins>
      <plugin>
        <groupId>com.google.cloud.tools</groupId>
        <artifactId>appengine-maven-plugin</artifactId>
        <version>1.3.1</version>
        <configuration>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.3</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>display-dependency-updates</goal>
              <goal>display-plugin-updates</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>javax.servlet:javax.servlet-api</exclude>
            <exclude>com.google.guava:guava</exclude> <!-- avoid android version -->
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>

      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.6.1</version>
      </plugin>

      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.0.0</version>
      </plugin>

      <plugin>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.5.2</version>
      </plugin>

      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.20</version>
      </plugin>

      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.6</version>
      </plugin>

      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.0.2</version>
      </plugin>

      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>3.1</version>
      </plugin>

      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4.1</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requirePluginVersions>
                   <message>Best Practice is to always define plugin versions!</message>
                   <banLatest>true</banLatest>
                   <banRelease>true</banRelease>
                   <phases>clean,deploy,verify,appengine:run,appengine:deploy,appengine:update,appengine:devappaserver,site</phases>
                </requirePluginVersions>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the Firestore API. priority: p2 Moderately-important priority. Fix may not be included in next release. running on app engine type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

6 participants