mavenを使用してプロジェクトを作成しました3.3.9コマンドmvn archetype:generateを使用してエンドポイントのarchtypeを検索し、それを選択して、次にgroupid artifectIdのバージョンを挿入します。その後、Eclipse Neonでこのプロジェクトをインポートします。このプロジェクトappengineを実行しています。下記エラーメッセージ取得しています:
Resolving expression: '${gcloud.plugin.version}': Detected the following recursive expression cycle in 'gcloud.plugin.version': [gcloud.plugin.version] -> [Help 2]
[ERROR] Resolving expression: '${gcloud.plugin.version}': Detected the following recursive expression cycle in 'gcloud.plugin.version': [gcloud.plugin.version] -> [Help 2]
[ERROR] 'dependencies.dependency.version' for com.google.appengine:appengine-api-1.0-sdk:jar must be a valid version but is '${appengine.target.version}'. @ line 34, column 13
[ERROR] 'dependencies.dependency.version' for com.google.appengine:appengine-endpoints:jar must be a valid version but is '${appengine.target.version}'. @ line 39, column 13
[ERROR] 'dependencies.dependency.version' for com.google.appengine:appengine-testing:jar must be a valid version but is '${appengine.sdk.version}'. @ line 69, column 13
[ERROR] 'dependencies.dependency.version' for com.google.appengine:appengine-api-stubs:jar must be a valid version but is '${appengine.sdk.version}'. @ line 75, column 13
[ERROR] 'build.plugins.plugin.version' for com.google.appengine:appengine-maven-plugin must be a valid version but is '${appengine.sdk.version}'. @ line 122, column 14
[ERROR] 'build.plugins.plugin.version' for com.google.appengine:gcloud-maven-plugin must be a valid version but is '${gcloud.plugin.version}'. @ line 145, column 14
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/InterpolationCycleException
を生成pom.xmlファイルは以下のとおりです。私はなぜこのエラーが発生しているのか、どうやって解決するのか分からない。最初のError readingから、私は{{gcloud.plugin.version}}に間違った情報を得ましたが、何が問題なのですか?この問題をどう解決することができますか?
<?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>com.demo.app</groupId>
<artifactId>demo-app</artifactId>
<properties>
<app.id>your-app-id</app.id>
<app.version>1</app.version>
<appengine.version>${appengine.sdk.version}</appengine.version>
<gcloud.plugin.version>${gcloud.plugin.version}</gcloud.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
<archiveClasses>true</archiveClasses>
</properties>
<prerequisites>
<maven>3.3.9</maven>
</prerequisites>
<dependencies>
<!-- Compile/runtime dependencies -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${appengine.target.version}</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-endpoints</artifactId>
<version>${appengine.target.version}</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>
<!-- Test Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>2.0.2-beta</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-testing</artifactId>
<version>${appengine.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-stubs</artifactId>
<version>${appengine.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- for hot reload of the web application -->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<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>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<webXml>${project.build.directory}/generated-sources/appengine-endpoints/WEB-INF/web.xml</webXml>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>${project.build.directory}/generated-sources/appengine-endpoints</directory>
<!-- the list has a default value of ** -->
<includes>
<include>WEB-INF/*.discovery</include>
<include>WEB-INF/*.api</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>${appengine.version}</version>
<configuration>
<enableJarClasses>false</enableJarClasses>
<version>${app.version}</version>
<!-- Comment in the below snippet to bind to all IPs instead of just
localhost -->
<!-- address>0.0.0.0</address> <port>8080</port -->
<!-- Comment in the below snippet to enable local debugging with a remote
debugger like those included with Eclipse or IntelliJ -->
<!-- jvmFlags> <jvmFlag>-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n</jvmFlag>
</jvmFlags -->
</configuration>
<executions>
<execution>
<goals>
<goal>endpoints_get_discovery_doc</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>gcloud-maven-plugin</artifactId>
<version>${gcloud.plugin.version}</version>
<configuration>
<set_default>true</set_default>
</configuration>
</plugin>
</plugins>
</build>
を使用するAppEngine-SDKとgcloud.plugin.versionの最新バージョンをグーグルことができます。 ''の中を見て、そこに追加してください。 'appengine.sdk.version'も定義しませんでした。また、 'gcloud.plugin.version'という値は' gcloud.plugin.version'自身で定義されていますが、それは動作しません。 –
Tunaki
ありがとうございましたtunaki –
http://stackoverflow.com/questions/38410322/error-in-compilation-of-maven-project/38424547#38424547同じタイプの質問。@ Tunakiあなたは私にどのように最新のgcloud.plugin.version? –