2013-07-05 63 views
3

我試圖讓一個Android應用程序建立在Jenkins上,但是它帶有一個模糊的錯誤消息。該應用程序在我的機器上使用Maven構建得很好,但它在Jenkins上不起作用。 Iv'e四處尋找解決方案,它說更新Android SDK,但我沒有解決問題。這是完整的堆棧跟蹤。在Jenkins上建立Maven的錯誤

注意:我將Google Play服務和Facebook SDK項目稱爲依賴關係。

mavenExecutionResult exceptions not empty message : Failed to execute goal 

com.jayway.maven.plugins.android.generation2:Android的Maven的插件:3.6.0:DEX (默認-DEX)項目LV2-geosafe:原因:堆棧跟蹤: org.apache.maven.lifecycle.LifecycleExecutionException:無法執行目標 com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:dex (default-dex)關於項目lv2-geosafe :at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor。執行(MojoExecutor.java:153) 在 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 在 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder。的java:84) 在 org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) 在 org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) 在 org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) 在org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)在 org.apache.maven.De faultMaven.execute(DefaultMaven.java:156)在 org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) 在sun.reflect.NativeMethodAccessorImpl.invoke0(本機方法)在 sun.reflect .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 在java.lang.reflect.Method.invoke(Method.java:597)在 有機codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) 在 org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) 在 org.jvnet.hudson。 maven3.agent.Maven3Main.launch(Maven3Main.java:15 8) at hudson.maven3Milder3Builder.call(Maven3Builder.java:98)at hudson.maven.Maven3Builder.call(Maven3Builder.java:64)at hudson.remoting.UserRequest.perform(UserRequest.java:118)在 hudson.remoting.UserRequest.perform(UserRequest.java:48)at hudson.remoting.Request $ 2.run(Request.java:326)at hudson.remoting.InterceptingExecutorService $ 1.call(InterceptingExecutorService.java:72) (FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138)at java.util.concurrent.ThreadPoolExecutor $ Worker。 runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)引起: org.apache.maven.plugin.MojoExecutionException:在 com.jayway.maven.plugins。 android.phase08preparepackage.DexMojo。runDex(DexMojo.java:382) 在 com.jayway.maven.plugins.android.phase08preparepackage.DexMojo.execute(DexMojo.java:145) 在 org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager。 java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 27 more引起者: com.jayway.maven.plugins.android.ExecutionException:ANDROID -040-001: 無法執行:命令=/bin/sh的-c CD /root/.hudson/jobs/lv2/workspace/lv2-geosafe & & /usr/local/jdk1.6.0_23/jre/ bin/java -Xmx1024M -jar /usr/local/an droid-sdk/platform-tools/lib/dx.jar --dex --output =/root/.hudson/jobs/lv2/workspace/lv2-geosafe/target/classes.dex /root/.m2/repository /com/google/code/gson/gson/2.2.2/gson-2.2.2.jar /root/.m2/repository/com/unboundid/unboundid-ldapsdk/2.3.3/unboundid-ldapsdk-2.3.3 .jar /root/.m2/repository/com/terrapages/mapapi/mapapi/1.0.0/mapapi-1.0.0.jar /root/.m2/repository/com/google/android/gms/google-play -services/2.3.0/google-play-services-2.3.0.jar /root/.hudson/jobs/lv2/workspace/lv2-util/target/lv2-util.jar /root/.m2/repository /com/google/android/support-v4/r7/support-v4-r7.jar /root/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final /hibernate-jpa-2.0-api-1.0.0.Final.jar /root /。 hudson/jobs/lv2/workspace/lv2-model/target/lv2-model.jar /root/.m2/repository/org/hibernate/hibernate-commons-annotations/3.2.0.Final/hibernate-commons-annotations- 3.2.0.Final.jar /root/.m2/repository/com/terrapages/ims/model/1.0.7/model-1.0.7.jar /root/.m2/repository/org/hibernate/hibernate-annotations /3.5.6-Final/hibernate-annotations-3.5.6-Final.jar /root/.m2/repository/com/github/avianey/facebook-android-api/3.0.1/facebook-android-api-3.0 .jar /root/.m2/repository/ch/acra/acra/4.4.0/acra-4.4.0.jar /root/.m2/repository/com/github/avianey/facebook-android-api /3.0.1/facebook-android-api-3.0.1.apklib /root/.hudson/jobs/lv2/workspace/lv2-api/target/lv2-api-1.0.2-SNAPSHOT.jar /root/.m2/repository/com/terrapages/ims/util/1.0.7/util-1.0.7.jar /root/.hudson/jobs/lv2/workspace/lv2-geosafe/target/classes /root/.m2/repository/com/google/android/gms/google-play-services/2.3.0/google-play -services-2.3.0.apklib /root/.m2/repository/com/terrapages/ims/api/1.0.7/api-1.0.7.jar, 結果= 1在 com.jayway.maven.plugins .android.CommandExecutor $ Factory $ DefaultCommandExecutor.executeCommand(CommandExecutor.java:246) at com.jayway.maven.plugins.android.phase08preparepackage.DexMojo.runDex(DexMojo.java:378) ... 30多個通道停止完成:失敗

回答

0

那麼,挖入你的堆棧跟蹤,你看到這條線:

引起:com.jayway.maven.plugins.android.ExecutionException:ANDROID-040-001:無法執行:Command =/bin/sh -c cd /root/.hudson/jobs/lv2/workspace/ lv2-geosafe & & /usr/local/jdk1.6.0_23/jre/bin/java -Xmx1024M -jar /usr/local/android-sdk/platform-tools/lib/dx.jar --dex --output =/root/.hudson/jobs/lv2/workspace/lv2-geosafe/target/classes.dex ...很多jar文件,結果= 1

如果執行所述命令(包括jar文件列表我在上面省略了,但在終端中不包括「,Result = 1」),您可能會收到有關此命令失敗的更多信息。也許你沒有和Android SDK在/ usr/local/android-sdk?