目标
- 设置maven,将谷歌应用程序引擎应用程序部署到临时服务器
问题
- Maven正在为appengine java sdk查找本地存储库中不存在的目录
环境
- Eclipse Juno
- m2e 1.2.0
- 嵌入式谷歌应用引擎Java SDK 1.7.2(但我使用的是.m2存储库中的1.6.6)
日志输出
[INFO] Updating Google App Engine Server...
[DEBUG] execute AppCfg [--sdk_root=/home/jbanger/.m2/repository/com/google/appengine/appengine-java-sdk/1.6.6/appengine-java-sdk-1.6.6, --compile_encoding=UTF-8, --disable_prompt, update, /home/jbanger/work/projects/hgt/catalog/target/catalog-0.0.1-SNAPSHOT]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.909s
[INFO] Finished at: Thu Sep 20 12:20:15 EDT 2012
[INFO] Final Memory: 11M/165M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal net.kindleit:maven-gae-plugin:0.9.4:deploy (default-cli) on project catalog: Execution default-cli of goal net.kindleit:maven-gae-plugin:0.9.4:deploy failed: An API incompatibility was encountered while executing net.kindleit:maven-gae-plugin:0.9.4:deploy: java.lang.ExceptionInInitializerError: null
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>net.kindleit:maven-gae-plugin:0.9.4
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/jbanger/.m2/repository/net/kindleit/maven-gae-plugin/0.9.4/maven-gae-plugin-0.9.4.jar
[ERROR] urls[1] = file:/home/jbanger/.m2/repository/net/kindleit/gae-runtime/1.7.1/gae-runtime-1.7.1.pom
[ERROR] urls[2] = file:/home/jbanger/.m2/repository/com/google/appengine/appengine-api-1.0-sdk/1.7.1/appengine-api-1.0-sdk-1.7.1.jar
[ERROR] urls[3] = file:/home/jbanger/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar
[ERROR] urls[4] = file:/home/jbanger/.m2/repository/org/apache/geronimo/specs/geronimo-jpa_3.0_spec/1.1.1/geronimo-jpa_3.0_spec-1.1.1.jar
[ERROR] urls[5] = file:/home/jbanger/.m2/repository/javax/jdo/jdo2-api/2.3-eb/jdo2-api-2.3-eb.jar
[ERROR] urls[6] = file:/home/jbanger/.m2/repository/javax/transaction/transaction-api/1.1/transaction-api-1.1.jar
[ERROR] urls[7] = file:/home/jbanger/.m2/repository/org/datanucleus/datanucleus-core/1.1.5/datanucleus-core-1.1.5.jar
[ERROR] urls[8] = file:/home/jbanger/.m2/repository/com/google/appengine/orm/datanucleus-appengine/1.0.10/datanucleus-appengine-1.0.10.jar
[ERROR] urls[9] = file:/home/jbanger/.m2/repository/org/datanucleus/datanucleus-jpa/1.1.5/datanucleus-jpa-1.1.5.jar
[ERROR] urls[10] = file:/home/jbanger/.m2/repository/com/google/appengine/appengine-tools-sdk/1.7.1/appengine-tools-sdk-1.7.1.jar
[ERROR] urls[11] = file:/home/jbanger/.m2/repository/org/codehaus/plexus/plexus-archiver/2.2/plexus-archiver-2.2.jar
[ERROR] urls[12] = file:/home/jbanger/.m2/repository/org/codehaus/plexus/plexus-io/2.0.4/plexus-io-2.0.4.jar
[ERROR] urls[13] = file:/home/jbanger/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.7/plexus-utils-3.0.7.jar
[ERROR] urls[14] = file:/home/jbanger/.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar
[ERROR] urls[15] = file:/home/jbanger/.m2/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.jar
[ERROR] urls[16] = file:/home/jbanger/.m2/repository/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.jar
[ERROR] urls[17] = file:/home/jbanger/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[18] = file:/home/jbanger/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
[ERROR] urls[19] = file:/home/jbanger/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: Unable to find /home/jbanger/.m2/repository/com/google/appengine/appengine-java-sdk/1.6.6/appengine-java-sdk-1.6.6/lib/opt/tools/appengine-local-endpoints/v1
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal net.kindleit:maven-gae-plugin:0.9.4:deploy (default-cli) on project catalog: Execution default-cli of goal net.kindleit:maven-gae-plugin:0.9.4:deploy failed: An API incompatibility was encountered while executing net.kindleit:maven-gae-plugin:0.9.4:deploy: java.lang.ExceptionInInitializerError: null
-----------------------------------------------------
realm = plugin>net.kindleit:maven-gae-plugin:0.9.4
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:/home/jbanger/.m2/repository/net/kindleit/maven-gae-plugin/0.9.4/maven-gae-plugin-0.9.4.jar
urls[1] = file:/home/jbanger/.m2/repository/net/kindleit/gae-runtime/1.7.1/gae-runtime-1.7.1.pom
urls[2] = file:/home/jbanger/.m2/repository/com/google/appengine/appengine-api-1.0-sdk/1.7.1/appengine-api-1.0-sdk-1.7.1.jar
urls[3] = file:/home/jbanger/.m2/repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.1.1/geronimo-jta_1.1_spec-1.1.1.jar
urls[4] = file:/home/jbanger/.m2/repository/org/apache/geronimo/specs/geronimo-jpa_3.0_spec/1.1.1/geronimo-jpa_3.0_spec-1.1.1.jar
urls[5] = file:/home/jbanger/.m2/repository/javax/jdo/jdo2-api/2.3-eb/jdo2-api-2.3-eb.jar
urls[6] = file:/home/jbanger/.m2/repository/javax/transaction/transaction-api/1.1/transaction-api-1.1.jar
urls[7] = file:/home/jbanger/.m2/repository/org/datanucleus/datanucleus-core/1.1.5/datanucleus-core-1.1.5.jar
urls[8] = file:/home/jbanger/.m2/repository/com/google/appengine/orm/datanucleus-appengine/1.0.10/datanucleus-appengine-1.0.10.jar
urls[9] = file:/home/jbanger/.m2/repository/org/datanucleus/datanucleus-jpa/1.1.5/datanucleus-jpa-1.1.5.jar
urls[10] = file:/home/jbanger/.m2/repository/com/google/appengine/appengine-tools-sdk/1.7.1/appengine-tools-sdk-1.7.1.jar
urls[11] = file:/home/jbanger/.m2/repository/org/codehaus/plexus/plexus-archiver/2.2/plexus-archiver-2.2.jar
urls[12] = file:/home/jbanger/.m2/repository/org/codehaus/plexus/plexus-io/2.0.4/plexus-io-2.0.4.jar
urls[13] = file:/home/jbanger/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.7/plexus-utils-3.0.7.jar
urls[14] = file:/home/jbanger/.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar
urls[15] = file:/home/jbanger/.m2/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.jar
urls[16] = file:/home/jbanger/.m2/repository/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.jar
urls[17] = file:/home/jbanger/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
urls[18] = file:/home/jbanger/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
urls[19] = file:/home/jbanger/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
Number of foreign imports: 1
import: Entry[import from realm ClassRealm[maven.api, parent: null]]
-----------------------------------------------------
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal net.kindleit:maven-gae-plugin:0.9.4:deploy failed: An API incompatibility was encountered while executing net.kindleit:maven-gae-plugin:0.9.4:deploy: java.lang.ExceptionInInitializerError: null
更多日志数据
-----------------------------------------------------
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
... 20 more
Caused by: java.lang.ExceptionInInitializerError
at com.google.appengine.tools.util.Logging.initializeLogging(Logging.java:35)
at com.google.appengine.tools.admin.AppCfg.main(AppCfg.java:86)
at net.kindleit.gae.EngineGoalBase.runAppCfg(EngineGoalBase.java:242)
at net.kindleit.gae.UpdateGoal.execute(UpdateGoal.java:39)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
Caused by: java.lang.IllegalArgumentException: Unable to find /home/jbanger/.m2/repository/com/google/appengine/appengine-java-sdk/1.6.6/appengine-java-sdk-1.6.6/lib/opt/tools/appengine-local-endpoints/v1
at com.google.appengine.tools.info.SdkInfo._getLibs(SdkInfo.java:76)
at com.google.appengine.tools.info.SdkInfo.getLibsRecursive(SdkInfo.java:69)
at com.google.appengine.tools.info.SdkImplInfo.<clinit>(SdkImplInfo.java:44)
... 25 more
[ERROR]
[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/PluginContainerException
我尝试过的东西/更多信息
- 最初,appenginejavasdk是1.6.5,所以我转到1.6.6,问题也是一样的
- lib/opt/tools在sdk主页中,但appengine本地端点不在(请参见/home/jbanger/.m2/repository.com/google/appengine/appengine java sdk/1.6.6/appengine-java-sdk-1.6.6/lib/opt/tools/appengine local-endpoints/v1)
- 我看到eclipse在.m2存储库中创建了sdk目录(可能是通过maven),当时我用它来制作一个带有gae原型jsp的新maven项目
我找到了一个修复程序。我将maven gae插件版本回滚到0.9.2。