Java appengine maven插件:1.3.1运行失败非零退出
我正在尝试使用Java appengine maven插件:1.3.1运行失败非零退出,java,maven,google-app-engine,google-cloud-endpoints-v2,Java,Maven,Google App Engine,Google Cloud Endpoints V2,我正在尝试使用maven原型创建hello端点框架 我使用此命令来构建项目 mvn archetype:generate -Dappengine-version=1.9.63 -Djava8=true -DCloudSDK_Tooling=false -Dapplication-id=your-app-id -Dfilter=com.google.appengine.archetypes: 我设置了-Djava8=true,因为我想在java8中运行它 下面是pom.xml文件 <?xm
maven原型创建hello端点框架
我使用此命令来构建项目
mvn archetype:generate -Dappengine-version=1.9.63 -Djava8=true -DCloudSDK_Tooling=false -Dapplication-id=your-app-id -Dfilter=com.google.appengine.archetypes:
我设置了-Djava8=true
,因为我想在java8中运行它
下面是pom.xml
文件
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<groupId>org.azeem.endpoints</groupId>
<artifactId>endpoints</artifactId>
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Compile/runtime dependencies -->
<!-- Uncomment to use Endpoints Frameworks v1.0 and comment the v2.0 section -->
<!--<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-endpoints</artifactId>
<version>1.9.53</version>
</dependency>-->
<!-- End of Endpoints Frameworks v1.0 -->
<!-- Endpoints Frameworks v2.0 -->
<dependency>
<groupId>com.google.endpoints</groupId>
<artifactId>endpoints-framework</artifactId>
<version>2.0.7</version>
</dependency>
<!-- End of Endpoints Frameworks v2.0 -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.53</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</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>
<!-- deploy configuration -->
</configuration>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>endpoints-framework-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<!-- plugin configuration -->
<hostname>YOUR-PROJECT-ID.appspot.com</hostname>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>display-dependency-updates</goal>
<goal>display-plugin-updates</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
我知道只有一个错误Project没有定义所需的Maven最低版本。我在pom中设置了最低版本,但仍然存在相同的错误
在此之后,我还尝试更新gcloud componentsgcloud components update
,但无法解决此错误
我正在使用JDK10
我还有另一个问题,这个项目是针对java7还是针对java8。
我想在java8中运行这个项目,这就是我设置-Djava8=true
的原因,但我不认为这个项目是为java8环境创建的,是吗?如果不是,我该怎么做
那么appengine maven插件的错误呢?我怎样才能解决这个问题?为什么我会看到这一点,云SDK中是否存在问题?或者还有其他原因。如下所示:
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
1.7
1.7
UTF-8
这是Java7,因此,如果您想用Java8运行它,您必须将1.7的两个外观都更改为1.8
appengine maven plugin的错误是您试图使用Java 7,而在命令中说要使用Java 8
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>