Maven GAE无法执行目标com.google.appengine:appengine-maven-plugin:1.9.12:devserver [...] NoSuchElementException

时间:2014-10-15 02:20:39

标签: java eclipse google-app-engine maven

Maven遇到了这个问题,我找不到任何解决方案:(。

的pom.xml https://github.com/Brkk/text-share/blob/master/pom.xml

的web.xml https://github.com/Brkk/text-share/blob/master/src/main/webapp/WEB-INF/web.xml

Maven正在生成

[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building text-share 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> appengine-maven-plugin:1.9.12:devserver (default-cli) @ text-share >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ text-share ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/paulotabarro/Desktop/workspace/text-share/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ text-share ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ text-share ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /Users/paulotabarro/Desktop/workspace/text-share/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ text-share ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ text-share ---
[INFO] 
[INFO] --- maven-war-plugin:2.4:war (default-war) @ text-share ---
[INFO] Packaging webapp
[INFO] Assembling webapp [text-share] in [/Users/paulotabarro/Desktop/workspace/text-share/target/text-share-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp webResources [/Users/paulotabarro/Desktop/workspace/text-share/src/main/webapp/WEB-INF] to [/Users/paulotabarro/Desktop/workspace/text-share/target/text-share-1.0-SNAPSHOT]
[INFO] Copying webapp resources [/Users/paulotabarro/Desktop/workspace/text-share/src/main/webapp]
[INFO] Webapp assembled in [101 msecs]
[INFO] Building war: /Users/paulotabarro/Desktop/workspace/text-share/target/text-share-1.0-SNAPSHOT.war
[INFO] 
[INFO] <<< appengine-maven-plugin:1.9.12:devserver (default-cli) @ text-share <<<
[INFO] 
[INFO] --- appengine-maven-plugin:1.9.12:devserver (default-cli) @ text-share ---
[INFO] 
[INFO] Google App Engine Java SDK - Running Development Server
[INFO] 
[INFO] Retrieving Google App Engine Java SDK from Maven
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.692 s
[INFO] Finished at: 2014-10-14T19:12:13-08:00
[INFO] Final Memory: 16M/184M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:appengine-maven-plugin:1.9.12:devserver (default-cli) on project text-share: Execution default-cli of goal com.google.appengine:appengine-maven-plugin:1.9.12:devserver failed. NoSuchElementException -> [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

1 个答案:

答案 0 :(得分:7)

根据此页面https://code.google.com/p/appengine-maven-plugin/issues/detail?id=41,您需要不仅在<build><pluginManagement>部分添加插件,还需在<build><plugins>部分添加插件。所以你需要扩展你的pom如下:

<build>
    <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
    <pluginManagement>
        <!-- other plugins here -->
        <plugin>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-maven-plugin</artifactId>
            <version>1.9.12</version>
            <configuration>
                <enableJarClasses>false</enableJarClasses>
            </configuration>
        </plugin>
    </pluginManagement>
    <plugins>
        <plugin>
            <groupId>com.google.appengine</groupId>
            <artifactId>appengine-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>