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

查看:142
本文介绍了Maven GAE无法执行com.google.appengine目标:appengine-maven-plugin:1.9.12:devserver [...] NoSuchElementException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



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]扫描项目... 
[INFO]
[INFO]使用构建器org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder,线程数为1
[INFO]
[信息] ------------------------------------------------ ------------------------
[INFO]构建文本共享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]使用'UTF-8 '编码来复制过滤的资源。
[INFO]跳过不存在的resourceDirectory / Users / paulotabarro / Desktop / workspace / text-share / src / main / resources
[INFO]
[INFO] --- maven-compiler-插件:3.1:compile(default-compile)@ text-share ---
[INFO]没有编译 - 所有类都是最新的
[INFO]
[INFO] - - maven-resources-plugin:2.6:testResources(default-testResources)@ text-share ---
[INFO]使用'UTF-8'编码来复制过滤的资源。
[INFO]跳过不存在的resourceDirectory / Users / paulotabarro / Desktop / workspace / text-share / src / test / resources
[INFO]
[INFO] --- maven-compiler-插件:3.1:testCompile(default-testCompile)@ text-share ---
[INFO]没有编译 - 所有类都是最新的
[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]打包webapp
[INFO]在[/ Users / paulotabarro / Desktop / workspace / text-share /目标/文本共享1.0-SNAPSHOT]
[INFO]处理战争项目
[INFO]复制webapp webResources [/ Users / paulotabarro / Desktop / workspace / text-share / src / main / webapp / WEB-INF]到[/Users/paulotabarro/Desktop/workspace/text-share/target/text-share-1.0-SNAPSHOT]
[INFO]复制webapp资源[/ Users / paulotabarro / Desktop / workspace / text -share / src / main / webapp]
[INFO] Webapp组装在[101毫秒]
[INFO]建筑战争:/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 - 运行开发服务器
[INFO]
[INFO]从Maven检索Google App Engine Java SDK
[INFO] -------- -------------------------------------------------- --------------
[INFO] BUILD FAILURE
[INFO] -------------------- -------------------------------------------------- -
[INFO]总时间:4.692 s
[INFO]完成于:2014-10-14T19:12:13-08:00
[INFO] Final Memory:16M / 184M
[INFO] ------------------------------------------- -----------------------------
[错误]执行com.google.appengine目标失败:appengine-maven- plugin:1.9.12:项目文本共享上的devserver(default-cli):执行com.google.appengine目标的default-cli:appengine-maven-plugin:1.9.12:devserver失败。 NoSuchElementException - > [帮助1]
[ERROR]
[ERROR]要查看错误的完整堆栈跟踪,请使用-e开关重新运行Maven。
[ERROR]使用-X开关重新运行Maven以启用完整的调试日志记录。
[ERROR]
[ERROR]有关错误和可能的解决方案的更多信息,请阅读以下文章:
[错误] [帮助1] http://cwiki.apache.org / confluence / display / MAVEN / PluginExecutionException


解决方案

根据这个页面, 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>
<! - 其他插件在这里 - >
< 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>


Maven is having this problem and none of the solutions I found worked :(.

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 is generating

[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

解决方案

According to this page, https://code.google.com/p/appengine-maven-plugin/issues/detail?id=41 , you need to add the plugin not only in the <build><pluginManagement> section, but also in the <build><plugins> section. So you would need to extend your pom as follows:

<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>

这篇关于Maven GAE无法执行com.google.appengine目标:appengine-maven-plugin:1.9.12:devserver [...] NoSuchElementException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆