Git Product home page Git Product logo

app-maven-plugin's Introduction

๐ŸšŒ In February 2024, this library has moved to appengine-plugins/app-maven-plugin. This repository will be archived in the future. Future releases will appear in the new repository (https://github.com/GoogleCloudPlatform/appengine-plugins/releases). The Maven artifact coordinates (com.google.cloud.tools:appengine-maven-plugin) remain the same.

project status image Unit Tests Maven Central

Google App Engine Maven plugin

This Maven plugin provides goals to build and deploy Google App Engine applications.

Requirements

Maven is required to build and run the plugin.

Google Cloud SDK is required but will be automatically installed by the plugin.

How to use

In your Maven App Engine Java app, add the following plugin to your pom.xml:

<plugin>
    <groupId>com.google.cloud.tools</groupId>
    <artifactId>appengine-maven-plugin</artifactId>
    <version>2.4.4</version>
</plugin>

You can now run commands like mvn package appengine:deploy in the root folder of your Java application.

Goals and Configuration

Please see the USER GUIDE for a full list of supported goals and configuration options.

Reference Documentation

App Engine Standard Environment:

App Engine Flexible Environment:

app-maven-plugin's People

Contributors

akerekes avatar alicejli avatar chanseokoh avatar coollog avatar ddixit14 avatar dependabot[bot] avatar elefeint avatar elharo avatar emmileaf avatar grant avatar joaoandremartins avatar joewang1127 avatar loosebazooka avatar ludoch avatar matt-blanchette avatar meltsufin avatar mpeddada1 avatar patflynn avatar suztomo avatar tadcordle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

app-maven-plugin's Issues

Unable to discover the Google App Engine SDK root

I have a pom.xml like follows:

<plugin>
    <groupId>com.google.cloud.tools</groupId>
    <artifactId>appengine-maven-plugin</artifactId>
    <version>1.0.0</version>
    <configuration>
        <deploy.version>${app.version}</deploy.version>
        <deploy.project>${app.id}</deploy.project>
        <deploy.promote>False</deploy.promote>
    </configuration>
</plugin>

I'm using Eclipse IDE with this version:

Eclipse Java EE IDE for Web Developers.
Version: Neon.1a Release (4.6.1)
Build id: 20161007-1200

While Eclipse is compiling the project, I'm getting this error in console:

Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.google.appengine.tools.info.ClassicSdk.getLoggingProperties(ClassicSdk.java:127)
    at com.google.appengine.tools.util.Logging.initializeLogging(Logging.java:35)
    at com.google.appengine.tools.enhancer.Enhance.main(Enhance.java:50)
Caused by: java.lang.RuntimeException: Unable to discover the Google App Engine SDK root. This code should be loaded from the SDK directory, but was instead loaded from file:/C:/Users/Nicola/.m2/repository/com/google/appengine/appengine-tools-sdk/1.9.44/appengine-tools-sdk-1.9.44.jar.  Specify -Dappengine.sdk.root to override the SDK location.
    at com.google.appengine.tools.info.SdkInfo.findSdkRoot(SdkInfo.java:117)
    at com.google.appengine.tools.info.SdkInfo.init(SdkInfo.java:238)
    at com.google.appengine.tools.info.SdkInfo.getSdkRoot(SdkInfo.java:192)
    at com.google.appengine.tools.info.SdkImplInfo.<clinit>(SdkImplInfo.java:20)
    ... 3 more

Is there a way to specify sdk.root as suggested?

Rename artifactId from gcp-app-maven-plugin to app-maven-plugin

Currently, the plugin artifactId is inconsistent with the GitHub project name, and the gradle plugin artifactId (app-gradle-plugin). When artifactId name is changed to app-maven-plugin, we will have to make sure to customize the goal prefix to be gcp-app instead of the default app.

BUG: Maven doesn't build a compat app for Java 8

Deploy a compat runtime fails if it's java8.

Myappengine-web.xml:

<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
  <application>your-project-id</application>
  <vm>true</vm>
  <threadsafe>true</threadsafe>
</appengine-web-app>
mvn appengine:run
[INFO] --- maven-war-plugin:2.2:war (default-war) @ helloworld-compat ---
[INFO] Packaging webapp
[INFO] Assembling webapp [helloworld-compat] in [/Users/lesv/github/getting-started-java/helloworld-compat/target/helloworld-compat-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/lesv/github/getting-started-java/helloworld-compat/src/main/webapp]
[INFO] Webapp assembled in [101 msecs]
[INFO] Building war: /Users/lesv/github/getting-started-java/helloworld-compat/target/helloworld-compat-1.0-SNAPSHOT.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] <<< appengine-maven-plugin:0.1.1-beta:deploy (default-cli) < package @ helloworld-compat <<<
[INFO]
[INFO] --- appengine-maven-plugin:0.1.1-beta:deploy (default-cli) @ helloworld-compat ---
[INFO] Staging the application to: /Users/lesv/github/getting-started-java/helloworld-compat/target/appengine-staging
[INFO] Detected App Engine standard environment application.
Aug 30, 2016 5:41:59 PM com.google.cloud.tools.appengine.cloudsdk.CloudSdk logCommand
INFO: submitting command: /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/bin/java -cp /Users/lesv/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/appengine-tools-api.jar com.google.appengine.tools.admin.AppCfg --disable_update_check stage /Users/lesv/github/getting-started-java/helloworld-compat/target/helloworld-compat-1.0-SNAPSHOT /Users/lesv/github/getting-started-java/helloworld-compat/target/appengine-staging
[INFO] GCLOUD: Reading application configuration data...
[INFO] GCLOUD:
[INFO] GCLOUD:
[INFO] GCLOUD: Beginning interaction for module default...
[INFO] GCLOUD: Unable to stage app: Class file is Java 8 but max supported is Java 7: /Users/lesv/github/getting-started-java/helloworld-compat/target/helloworld-compat-1.0-SNAPSHOT/WEB-INF/classes/com/example/appengine/helloworld/HelloServlet.class
[INFO] GCLOUD: Please see the logs [/var/folders/xr/8psp9665483gvdbs6t2jl3s00044fd/T/appcfg5048155306970265780.log] for further information.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.934 s
[INFO] Finished at: 2016-08-30T17:42:00-07:00
[INFO] Final Memory: 19M/305M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:0.1.1-beta:deploy (default-cli) on project helloworld-compat: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:0.1.1-beta:deploy failed: Non zero exit: 1 -> [Help 1]

Log

java.lang.IllegalArgumentException: Class file is Java 8 but max supported is Java 7: /Users/lesv/github/getting-started-java/helloworld-compat/target/helloworld-compat-1.0-SNAPSHOT/WEB-INF/classes/com/example/appengine/helloworld/HelloServlet.class
        at com.google.appengine.tools.admin.Application.checkJavaVersion(Application.java:1378)
        at com.google.appengine.tools.admin.Application.checkJavaClassVersion(Application.java:1347)
        at com.google.appengine.tools.admin.Application.checkJavaVersion(Application.java:1329)
        at com.google.appengine.tools.admin.Application.copyOrLinkFile(Application.java:1256)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1235)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1224)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1224)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1224)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1224)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1224)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1222)
        at com.google.appengine.tools.admin.Application.populateStagingDirectory(Application.java:756)
        at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:741)
        at com.google.appengine.tools.admin.AppAdminImpl.stageApplication(AppAdminImpl.java:531)
        at com.google.appengine.tools.admin.AppAdminImpl.stageApplicationWithDefaultResourceLimits(AppAdminImpl.java:484)
        at com.google.appengine.tools.admin.AppCfg$StagingAction.execute(AppCfg.java:2473)
        at com.google.appengine.tools.admin.AppCfg.executeAction(AppCfg.java:357)
        at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:218)
        at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:119)
        at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:115)
com.google.appengine.tools.admin.AdminException: Unable to stage app: Class file is Java 8 but max supported is Java 7: /Users/lesv/github/getting-started-java/helloworld-compat/target/helloworld-compat-1.0-SNAPSHOT/WEB-INF/classes/com/example/appengine/helloworld/HelloServlet.class
        at com.google.appengine.tools.admin.AppAdminImpl.stageApplication(AppAdminImpl.java:535)
        at com.google.appengine.tools.admin.AppAdminImpl.stageApplicationWithDefaultResourceLimits(AppAdminImpl.java:484)
        at com.google.appengine.tools.admin.AppCfg$StagingAction.execute(AppCfg.java:2473)
        at com.google.appengine.tools.admin.AppCfg.executeAction(AppCfg.java:357)
        at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:218)
        at com.google.appengine.tools.admin.AppCfg.<init>(AppCfg.java:119)
        at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:115)
Caused by: java.lang.IllegalArgumentException: Class file is Java 8 but max supported is Java 7: /Users/lesv/github/getting-started-java/helloworld-compat/target/helloworld-compat-1.0-SNAPSHOT/WEB-INF/classes/com/example/appengine/helloworld/HelloServlet.class
        at com.google.appengine.tools.admin.Application.checkJavaVersion(Application.java:1378)
        at com.google.appengine.tools.admin.Application.checkJavaClassVersion(Application.java:1347)
        at com.google.appengine.tools.admin.Application.checkJavaVersion(Application.java:1329)
        at com.google.appengine.tools.admin.Application.copyOrLinkFile(Application.java:1256)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1235)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1224)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1224)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1224)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1224)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1224)
        at com.google.appengine.tools.admin.Application.copyOrLink(Application.java:1222)
        at com.google.appengine.tools.admin.Application.populateStagingDirectory(Application.java:756)
        at com.google.appengine.tools.admin.Application.createStagingDirectory(Application.java:741)
        at com.google.appengine.tools.admin.AppAdminImpl.stageApplication(AppAdminImpl.java:531)
        ... 6 more
mvn appengine:run
[INFO] --- maven-war-plugin:2.2:war (default-war) @ helloworld-compat ---
[INFO] Packaging webapp
[INFO] Assembling webapp [helloworld-compat] in [/Users/lesv/github/getting-started-java/helloworld-compat/target/helloworld-compat-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/lesv/github/getting-started-java/helloworld-compat/src/main/webapp]
[INFO] Webapp assembled in [16 msecs]
[INFO] Building war: /Users/lesv/github/getting-started-java/helloworld-compat/target/helloworld-compat-1.0-SNAPSHOT.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO]
[INFO] <<< appengine-maven-plugin:0.1.1-beta:run (default-cli) < package @ helloworld-compat <<<
[INFO]
[INFO] --- appengine-maven-plugin:0.1.1-beta:run (default-cli) @ helloworld-compat ---
Aug 30, 2016 5:39:19 PM com.google.cloud.tools.appengine.cloudsdk.CloudSdk logCommand
INFO: submitting command: /Users/lesv/google-cloud-sdk/bin/dev_appserver.py /Users/lesv/github/getting-started-java/helloworld-compat/target/helloworld-compat-1.0-SNAPSHOT --jvm_flag=-Dappengine.user.timezone=UTC
[INFO] GCLOUD: INFO     2016-08-31 00:39:20,432 application_configuration.py:431] No version specified. Generated version id: 20160831t003920
[INFO] GCLOUD: INFO     2016-08-31 00:39:20,432 devappserver2.py:769] Skipping SDK update check.
[INFO] GCLOUD: INFO     2016-08-31 00:39:20,479 api_server.py:205] Starting API server at: http://localhost:62265
[INFO] GCLOUD: INFO     2016-08-31 00:39:20,484 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
[INFO] GCLOUD: INFO     2016-08-31 00:39:20,488 admin_server.py:116] Starting admin server at: http://localhost:8000
[INFO] GCLOUD: 2016-08-31 00:39:20.799:INFO::main: Logging initialized @292ms
[INFO] GCLOUD: 2016-08-31 00:39:20.983:INFO:oejs.Server:main: jetty-9.2.10.v20150310
[INFO] GCLOUD: 2016-08-31 00:39:20.996:WARN:oejsh.RequestLogHandler:main: !RequestLog
[INFO] GCLOUD: 2016-08-31 00:39:20.997:INFO:oejdp.ScanningAppProvider:main: Deployment monitor [file:/Users/lesv/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/jetty-base-sdk/contexts/] at interval 1

BUG: generated app.yaml uses "module" not "service"

My appengine-web.xml:

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">

  <threadsafe>true</threadsafe>
  <vm>false</vm>
  <service>grpc</service>

  <system-properties>
    <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
  </system-properties>

  <instance-class>F4</instance-class>
</appengine-web-app>

generated app.yaml:

runtime: java7
module: 'grpc'
instance_class: F4
inbound_services:
- warmup
derived_file_type:
- java_precompiled
threadsafe: True
auto_id_policy: default
api_version: '1.0'
handlers:
- url: /
  script: unused
  login: optional
  secure: optional
- url: /.*/
  script: unused
  login: optional
  secure: optional
- url: /_ah/.*
  script: unused
  login: optional
  secure: optional
- url: /hi
  script: unused
  login: optional
  secure: optional

Messages:

[INFO] 
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ grpc-fun-helloworld ---
[INFO] Packaging webapp
[INFO] Assembling webapp [grpc-fun-helloworld] in [/Users/lesv/TEST/gRPC-fun/target/grpc-fun-helloworld-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/Users/lesv/TEST/gRPC-fun/src/main/webapp]
[INFO] Webapp assembled in [117 msecs]
[INFO] Building war: /Users/lesv/TEST/gRPC-fun/target/grpc-fun-helloworld-1.0-SNAPSHOT.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] 
[INFO] <<< appengine-maven-plugin:1.0.0:deploy (default-cli) @ grpc-fun-helloworld <<<
[INFO] 
[INFO] --- appengine-maven-plugin:1.0.0:deploy (default-cli) @ grpc-fun-helloworld ---
[INFO] Staging the application to: /Users/lesv/TEST/gRPC-fun/target/appengine-staging
[INFO] Detected App Engine standard environment application.
Oct 25, 2016 8:27:03 PM com.google.cloud.tools.appengine.cloudsdk.CloudSdk logCommand
INFO: submitting command: /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre/bin/java -cp /Users/lesv/google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/appengine-tools-api.jar com.google.appengine.tools.admin.AppCfg --disable_update_check stage /Users/lesv/TEST/gRPC-fun/target/grpc-fun-helloworld-1.0-SNAPSHOT /Users/lesv/TEST/gRPC-fun/target/appengine-staging
[INFO] GCLOUD: Reading application configuration data...
[INFO] GCLOUD: 
[INFO] GCLOUD: 
[INFO] GCLOUD: Beginning interaction for module grpc...
[INFO] GCLOUD: 0% Scanning for jsp files.
[INFO] GCLOUD: Success.
[INFO] GCLOUD: Temporary staging for module grpc directory left in /Users/lesv/TEST/gRPC-fun/target/appengine-staging
Oct 25, 2016 8:27:04 PM com.google.cloud.tools.appengine.cloudsdk.CloudSdk logCommand
INFO: submitting command: /Users/lesv/google-cloud-sdk/bin/gcloud app deploy /Users/lesv/TEST/gRPC-fun/target/appengine-staging/app.yaml --quiet
[INFO] GCLOUD: WARNING: The "module" parameter in application .yaml files is deprecated. Please use the "service" parameter instead.
[INFO] GCLOUD: You are about to deploy the following services:
[INFO] GCLOUD:  - lesv-003/grpc/20161025t202704 (from [/Users/lesv/TEST/gRPC-fun/target/appengine-staging/app.yaml])
[INFO] GCLOUD:      Deploying to URL: [https://grpc-dot-lesv-003.appspot.com]
[INFO] GCLOUD: 
[INFO] GCLOUD: Beginning deployment of service [grpc]...
[INFO] GCLOUD: File upload done.
[INFO] GCLOUD: 
[INFO] GCLOUD:                                                                                 
[INFO] GCLOUD: Updating service [grpc]...
[INFO] GCLOUD:                                                                                 
[INFO] GCLOUD: Updating service [grpc]...failed.
[INFO] GCLOUD: ERROR: (gcloud.app.deploy) 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.911s
[INFO] Finished at: Tue Oct 25 20:27:24 PDT 2016
[INFO] Final Memory: 10M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.0.0:deploy (default-cli) on project grpc-fun-helloworld: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.0.0:deploy failed: Non zero exit: 1 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Process finished with exit code 1

:deploy goal should quietly skip non-war projects

If you attempt to setup a common appengine:deploy from a parent pom, the maven plugin fails as its trying to deploy the <packaging>pom</packaging> project.

If it encounters a non-war packaging, it should just skip the appengine:deploy attempt.

[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:0.1.2:deploy (deploy-integration-test) on project tests-webapps-parent: Execution deploy-integration-test of goal com.google.cloud.tools:appengine-maven-plugin:0.1.2:deploy failed: Artifact doesn't exist at '/home/joakim/code/jetty/gcloud.project/jetty-runtime/tests/webapps/target/tests-webapps-parent-0.1.0-SNAPSHOT.pom' -> [Help 1]

Incompatibility with appengine-gcs-client

Reported against the Eclipse-plugin here:
GoogleCloudPlatform/google-cloud-eclipse#599

Here how to reproduce the problem
The plugin declaration

<!-- https://cloud.google.com/appengine/docs/java/tools/maven-reference -->
<plugin>
    <groupId>com.google.cloud.tools</groupId>
    <artifactId>appengine-maven-plugin</artifactId>
    <version>1.0.0</version>
    <configuration>
        <deploy.version>${app.version}</deploy.version>
        <deploy.project>${app.id}</deploy.project>
        <deploy.promote>False</deploy.promote>
    </configuration>
</plugin>

The needed dependencies

<!-- https://mvnrepository.com/artifact/com.google.appengine.tools/appengine-gcs-client -->
<dependency>
    <groupId>com.google.appengine.tools</groupId>
    <artifactId>appengine-gcs-client</artifactId>
    <version>0.6</version>
</dependency>

<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
    <groupId>commons-io</groupId>
    <artifactId>commons-io</artifactId>
    <version>2.5</version>
</dependency>

And the (very) simple code

GcsFilename storageObject = new GcsFilename("my-bucket", "my-object");
GcsService createGcsService = GcsServiceFactory.createGcsService();
GcsOutputChannel createOrReplace = createGcsService.createOrReplace(storageObject,
        GcsFileOptions.getDefaultInstance());

try (OutputStream newOutputStream = Channels.newOutputStream(createOrReplace)) {
    IOUtils.write("input test".getBytes("UTF-8"), newOutputStream);
}

I started the server using appengine:run and at soon I hit the code, this error is shown in console

[INFO] INFORMAZIONI: RetryHelper(2.787 ms, 1 attempts, com.google.appengine.tools.cloudstorage.GcsServiceImpl$1@6b385e1d): Attempt #1 failed [java.io.IOException: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)], sleeping for 886 ms
[INFO] 
[INFO] ott 24, 2016 9:39:32 AM com.google.appengine.tools.cloudstorage.RetryHelper doRetry
[INFO] 
[INFO] INFORMAZIONI: RetryHelper(892.1 ms, 2 attempts, com.google.appengine.tools.cloudstorage.GcsServiceImpl$1@6b385e1d): Attempt #2 failed [java.io.IOException: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)], sleeping for 1715 ms
[INFO] 
[INFO] ott 24, 2016 9:39:30 AM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties
[INFO] 
[INFO] INFORMAZIONI: Overwriting system property key 'java.util.logging.config.file', value 'C:\Users\Francesco\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\java\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'C:\Users\Francesco\workspace_neon\testsql\target\testsql-1\WEB-INF\appengine-web.xml'
[INFO] 
[INFO] ott 24, 2016 9:39:31 AM com.google.appengine.tools.development.AbstractContainerService configure
[INFO] 
[INFO] AVVERTENZA: Null value for containerConfigProperties.get(devappserver.portMappingProvider)
[INFO] 
[INFO] ott 24, 2016 9:39:31 AM com.google.apphosting.utils.jetty.JettyLogger info
[INFO] 
[INFO] INFORMAZIONI: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
[INFO] 
[INFO] ott 24, 2016 7:39:31 AM com.google.apphosting.utils.jetty.JettyLogger info
[INFO] 
[INFO] INFORMAZIONI: jetty-6.1.x
[INFO] 
[INFO] ott 24, 2016 7:39:31 AM com.google.apphosting.utils.jetty.JettyLogger info
[INFO] 
[INFO] INFORMAZIONI: Started SelectChannelConnector@localhost:49947
[INFO] 
[INFO] ott 24, 2016 7:39:31 AM com.google.appengine.tools.development.AbstractModule startup
[INFO] 
[INFO] INFORMAZIONI: Module instance default is running at http://localhost:49947/
[INFO] 
[INFO] ott 24, 2016 7:39:31 AM com.google.appengine.tools.development.AbstractModule startup
[INFO] 
[INFO] INFORMAZIONI: The admin console is running at http://localhost:49947/_ah/admin
[INFO] 
[INFO] ott 24, 2016 9:39:31 AM com.google.appengine.tools.development.devappserver2.DevAppServer2Impl doStart
[INFO] 
[INFO] 
[INFO] ott 24, 2016 9:39:33 AM com.google.appengine.tools.cloudstorage.RetryHelper doRetry
[INFO] 
[INFO] INFORMAZIONI: RetryHelper(2.608 s, 3 attempts, com.google.appengine.tools.cloudstorage.GcsServiceImpl$1@6b385e1d): Attempt #3 failed [java.io.IOException: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)], sleeping for 4590 ms
[INFO] 
[INFO] ott 24, 2016 9:39:34 AM com.google.appengine.tools.development.LocalResourceFileServlet doGet
[INFO] 
[INFO] AVVERTENZA: No file found for: /_ah/warmup
[INFO] 
[INFO] INFO     2016-10-24 09:39:34,467 module.py:788] default: "GET /_ah/warmup HTTP/1.1" 404 83
[INFO] ott 24, 2016 9:39:38 AM com.google.appengine.tools.cloudstorage.RetryHelper doRetry
[INFO] 
[INFO] INFORMAZIONI: RetryHelper(7.198 s, 4 attempts, com.google.appengine.tools.cloudstorage.GcsServiceImpl$1@6b385e1d): Attempt #4 failed [java.io.IOException: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)], sleeping for 8940 ms
[INFO] 
[INFO] ott 24, 2016 9:39:47 AM com.google.appengine.tools.cloudstorage.RetryHelper doRetry
[INFO] 
[INFO] INFORMAZIONI: RetryHelper(16.14 s, 5 attempts, com.google.appengine.tools.cloudstorage.GcsServiceImpl$1@6b385e1d): Attempt #5 failed [java.io.IOException: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)], sleeping for 12145 ms
[INFO] 
[INFO] ott 24, 2016 9:39:59 AM com.google.apphosting.utils.jetty.JettyLogger warn
[INFO] 
[INFO] AVVERTENZA: /hello
[INFO] 
[INFO] com.google.appengine.tools.cloudstorage.RetriesExhaustedException: RetryHelper(28.28 s, 6 attempts, com.google.appengine.tools.cloudstorage.GcsServiceImpl$1@6b385e1d): Too many failures, giving up
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.RetryHelper.doRetry(RetryHelper.java:127)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.RetryHelper.runWithRetries(RetryHelper.java:166)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.RetryHelper.runWithRetries(RetryHelper.java:156)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.GcsServiceImpl.createOrReplace(GcsServiceImpl.java:70)
[INFO] 
[INFO]  at it.noovle.testsql.HelloAppEngine.testStorage(HelloAppEngine.java:91)
[INFO] 
[INFO]  at it.noovle.testsql.HelloAppEngine.doGet(HelloAppEngine.java:54)
[INFO] 
[INFO]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
[INFO] 
[INFO]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
[INFO] 
[INFO]  at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO] 
[INFO]  at com.google.appengine.tools.development.devappserver2.RequestIdFilter.doFilter(RequestIdFilter.java:36)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO] 
[INFO]  at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:128)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO] 
[INFO]  at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO] 
[INFO]  at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:50)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO] 
[INFO]  at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
[INFO] 
[INFO]  at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
[INFO] 
[INFO]  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
[INFO] 
[INFO]  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
[INFO] 
[INFO]  at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
[INFO] 
[INFO]  at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:98)
[INFO] 
[INFO]  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
[INFO] 
[INFO]  at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:511)
[INFO] 
[INFO]  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
[INFO] 
[INFO]  at org.mortbay.jetty.Server.handle(Server.java:326)
[INFO] 
[INFO]  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
[INFO] 
[INFO]  at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
[INFO] 
[INFO]  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
[INFO] 
[INFO]  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
[INFO] 
[INFO]  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
[INFO] 
[INFO]  at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
[INFO] 
[INFO]  at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
[INFO] 
[INFO] Caused by: java.io.IOException: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService$BlobStorageAdapter.getInstance(LocalRawGcsService.java:186)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService$BlobStorageAdapter.access$000(LocalRawGcsService.java:109)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService.ensureInitialized(LocalRawGcsService.java:194)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService.beginObjectCreation(LocalRawGcsService.java:249)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService.beginObjectCreation(LocalRawGcsService.java:92)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.GcsServiceImpl$1.call(GcsServiceImpl.java:74)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.GcsServiceImpl$1.call(GcsServiceImpl.java:70)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.RetryHelper.doRetry(RetryHelper.java:108)
[INFO] 
[INFO]  ... 38 more
[INFO] 
[INFO] Caused by: java.lang.NoSuchMethodException: com.google.appengine.tools.development.devappserver2.DevAppServer2Delegate.getService(java.lang.String)
[INFO] 
[INFO]  at java.lang.Class.getDeclaredMethod(Class.java:2009)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService$BlobStorageAdapter.<init>(LocalRawGcsService.java:123)
[INFO] 
[INFO]  at com.google.appengine.tools.cloudstorage.dev.LocalRawGcsService$BlobStorageAdapter.getInstance(LocalRawGcsService.java:184)
[INFO] 
[INFO]  ... 45 more
[INFO] 
[INFO] 
[INFO] 
[INFO] INFO     2016-10-24 09:39:59,625 module.py:788] default: "GET /hello HTTP/1.1" 500 16086

AppVeyor build fails on gcloud components update

From AppVeyor log:

gcloud.cmd components install app-engine-java --quiet
ERROR: Cannot use bundled Python installation to update Cloud SDK in
non-interactive mode. Please run again in interactive mode.
If you really want to run in non-interactive mode, please run the
following command before re-running this one:
  FOR /F "delims=" %i in ( '""C:\google\google-cloud-sdk\bin\gcloud.cmd"" components copy-bundled-python'
  ) DO (
    SET CLOUDSDK_PYTHON=%i
  )
(Substitute `%%i` for `%i` if in a .bat script.)

Consider renaming to `appengine-maven-plugin` and bump major version

Following on the discussion from the use of app vs appengine in GoogleCloudPlatform/app-tools-lib-for-java, the use of app in this plugin name is confusing.

Since this plugin is to replace the older appengine-maven-plugin, can't it be called appengine-maven-plugin and bump the major version to 2.x? Although the version bump isn't strictly necessary since this plugin is in a different group (com.google.cloud.tools vs com.google.appengine for the older plugin), it provides a subtle clue that it's the successor.

cc @elharo

dispatch.xml not staged

Greetings,

I'm not sure if the problem is in the Maven plugin or in one of its dependencies. When staging (or deploying) a Java standard runtime app, dispatch.xml is not staged as dispatch.yaml. Other files - appengine-web.xml, cron.xml, datastore-indexes.xml and queue.xml get staged as YAML files fine, the problem is specific to dispatch.xml.

I also tried to add dispatch.yaml in several places in the project and added its path to deployables, but it never got copied to to appengine-staging. Is there a way to do it? It doesn't matter to me if I use XML or YAML.

BUG: -Dapp.

Trying to build helloworld on Jenkins with:

mvn clean appengine:deploy -Dapp.deploy.version=java-mvm-helloworld -Dapp.deploy.promote=false -DcloudSdkPath=/usr/local/share/google/google-cloud-sdk

The -Dapp.deploy.promote=false should be able to override:

    <configuration>
      <!-- deploy configuration -->
      <deploy.promote>true</deploy.promote>
      <deploy.stopPreviousVersion>true</deploy.stopPreviousVersion>
    </configuration>

I probably should remove these from the samples, but it would be nice if it worked in a logical way.

Plugin asks for installing gcloud Python Extension, but no way to interact

On my machine (Linux) without the Python Extension, the plugin will show:

[INFO] GCLOUD: This action requires the installation of components: [app-engine-
[INFO] GCLOUD: python]
[INFO] GCLOUD: 
[INFO] GCLOUD: 
[INFO] GCLOUD: Your current Cloud SDK version is: 115.0.0
[INFO] GCLOUD: Installing components from version: 115.0.0
[INFO] GCLOUD: 
[INFO] GCLOUD: +--------------------------------------------------+
[INFO] GCLOUD: |       These components will be installed.        |
[INFO] GCLOUD: +------------------------------+---------+---------+
[INFO] GCLOUD: |             Name             | Version |   Size  |
[INFO] GCLOUD: +------------------------------+---------+---------+
[INFO] GCLOUD: | gcloud app Python Extensions |  1.9.38 | 7.2 MiB |
[INFO] GCLOUD: +------------------------------+---------+---------+
[INFO] GCLOUD: 
[INFO] GCLOUD: For the latest full release notes, please visit:
[INFO] GCLOUD:   https://cloud.google.com/sdk/release_notes
[INFO] GCLOUD: 

While looking at the output, I was under the impression that the plugin is automatically installing the Python Extension. After waiting for 10 minutes, I decided to cancel it (Ctrl+C), and I get the following log:

^C[INFO] GCLOUD: Do you want to continue (Y/n)?  Traceback (most recent call last):
[INFO] GCLOUD:   File "/home/chanseok/google-cloud-sdk/bin/dev_appserver.py", line 35, in <module>
[INFO] GCLOUD:     main()
[INFO] GCLOUD:   File "/home/chanseok/google-cloud-sdk/bin/dev_appserver.py", line 22, in main
[INFO] GCLOUD:     command=__file__)
chanseok@chanseok3:~/workspace/mvn/compat$

I think it is good to make a clear point (in a doc, etc) that the Python Extension is a pre-requisite.

Incompatibility with com.google.appengine:appengine-maven-plugin for relesign cron jobs

Hi,

I have problem having the two plugins in the same pom:

  1. com.google.cloud.tools:appengine-maven-plugin 0.1.2

  2. com.google.appengine:appengine-maven-plugin 1.9.42

The first I use to deploy my flexible application on Google Cloud Platform, the second is useful for deploy (update_cron) the cron job xml file I have under WEB-INF folder of my project. I can't runmvn appengine:deploy and appengine:update_cron if I have both seen they have the same name but different goals.

I was wondering how can I deploy a cron job with com.google.cloud.tools:appengine-maven-plugin 0.1.2 but looks like it does not cope with this scope so I used the command appcfg.sh update_cron target/project-name but this causes problems when I have to do so in a continuos integration tools such as Jenkins/Hudson/Gocd because I cant' install Google Appengine SDK on that server.

Thank you

Improve error message when appengine-engine-java component is missing in Cloud SDK

Currently this is the error that is shown:

mvn appengine:deploy

...

[INFO] GCLOUD: Error: Could not find or load main class com.google.appengine.tools.admin.AppCfg
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.739 s
[INFO] Finished at: 2016-09-07T10:56:28-04:00
[INFO] Final Memory: 23M/485M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:0.1.2-SNAPSHOT:deploy (default-cli) on project helloworld-compat: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:0.1.2-SNAPSHOT:deploy failed: Non zero exit: 1 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

See: GoogleCloudPlatform/java-docs-samples#332

Multiple modules with different runtimes

Greetings,

If I understand correctly, for standard environment, this plugin is designed to work in a directory which contains WEB-INF/appengine-web.xml. I would like to use it to run the development server with a project that contains a Java default module and a Python module (for that matter it can be any non-Java runtime) and I couldn't find any way to do it with the maven plugin (setting appYamls didn't seem to help).

I can implement what I want when using the App Engine Java Client Library directly like so:

DefaultRunConfiguration config = new DefaultRunConfiguration();
config.setAppYamls(Arrays,asList(
  new File("/java-module-dir/target/..."),
  new File("/python-module-dir")
));
new CloudSdkAppEngineDevServer(new CloudSdk.Builder().build()).run(config);

Is there a way to do it with the Maven plugin? If not, may I suggest adding it?

<service> converts to module: blah -- should convert to service: blah

When I put <service> in appengine-web.xml, it appears to convert to module in app.yaml

When I do a mvn appengine:deploy, I get the following:

[INFO] GCLOUD: Reading application configuration data...
[INFO] GCLOUD:
[INFO] GCLOUD:
[INFO] GCLOUD: Beginning interaction for module blue...
[INFO] GCLOUD: 0% Scanning for jsp files.
[INFO] GCLOUD: 0% Generated git repository information file.
[INFO] GCLOUD: Success.
[INFO] GCLOUD: Temporary staging for module blue directory left in /Users/lesv/github/java-docs-samples/appengine/helloworld-new-plugins/target/appengine-staging
Aug 16, 2016 2:26:31 PM com.google.cloud.tools.appengine.cloudsdk.CloudSdk logCommand
INFO: submitting command: /Users/lesv/google-cloud-sdk/bin/gcloud app deploy /Users/lesv/github/java-docs-samples/appengine/helloworld-new-plugins/target/appengine-staging/app.yaml --promote --stop-previous-version --quiet
[INFO] GCLOUD: WARNING: The "module" parameter in application .yaml files is deprecated. Please use the "service" parameter instead.
[INFO] GCLOUD: You are about to deploy the following services:
[INFO] GCLOUD:  - lesv-003/blue/20160816t142631 (from [/Users/lesv/github/java-docs-samples/appengine/helloworld-new-plugins/target/appengine-staging/app.yaml])
[INFO] GCLOUD:      Deployed URL: [https://blue-dot-lesv-003.appspot.com]
[INFO] GCLOUD:
[INFO] GCLOUD: Beginning deployment of service [blue]...
[INFO] GCLOUD: File upload done.
[INFO] GCLOUD:
[INFO] GCLOUD: Updating service [blue]...
[INFO] GCLOUD:
[INFO] GCLOUD: Updating service [blue]...done.
[INFO] GCLOUD: Deployed service [blue]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.