cd $ IJETTY_HOME / console
mvn clean install
这将在$ IJETTY_HOME / console / webapp / target中生成一个war文件,并在$ IJETTY_HOME / console / apk / target中生成apk(虽然我们提到过,你可能对此不感兴趣)。
但我得到了以下错误(...哦,我的上帝。我无法上传图片; 0)
**
[INFO] --- exec-maven-plugin:1.2:exec (generate-dex) @ console ---
Unable to access jarfile ${env.ANDROID_HOME}/platform-tools/lib/dx.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] I-Jetty :: Console Parent ......................... SUCCESS [0.241s]
[INFO] I-Jetty :: Console Webapp ......................... FAILURE [2.431s]
[INFO] I-Jetty :: Console Android Installer .............. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.122s
[INFO] Finished at: Thu Nov 08 19:33:47 KST 2012
[INFO] Final Memory: 14M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (generate-dex) on project console: Command execution failed. Process exited with an error: 1(Exit value: 1) -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :console**
我试过'用Eclipse构建'
最后,我得到了与之类似的跟随错误。
关于导入Maven项目,
exec-maven-plugin:1.2:exec(1个错误)
maven-antrun-plugin:1.6:run(1个错误)
maven-depoendency-plugin:2.3:unpack-dependencies(1个错误)
帮助我,PLZ。
我在Mac OS X Lion上安装了带有eclipse的maven插件1.3。
答案 0 :(得分:0)
最后,我自己解决了。
我错过了导出android sdk路径(导出ANDROID_HOME = / opt / android / android-sdk-linux_86)
我编辑了pom.xml
这
<artifactId>maven-android-plugin</artifactId>
<version>2.9.0-beta-5</version>
到
<artifactId>android-maven-plugin</artifactId>
<version>3.0.0</version>
感谢。