我已经搜索了几天,找不到解决问题的方法。有没有办法用eclipse创建一个黑莓maven项目。我需要这个以获得持续的集成支持。
我找到的唯一解决方案是错误的(请参阅 Peter Butkovic 的回答),我找不到任何方法来修复它们......
提前致谢...
修改的 这是maven输出:
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.hello.bb:hellobb:jar:1.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 44, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-eclipse-plugin is missing. @ line 32, column 12
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building HelloBB 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ hellobb ---
[INFO] Deleting D:\work\blackberry_ws\MTest\target
[INFO]
[INFO] --- maven-antrun-plugin:1.3:run (OS_Environment_Validation) @ hellobb ---
[INFO] Executing tasks
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ hellobb ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ hellobb ---
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to D:\work\blackberry_ws\MTest\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ hellobb ---
[debug] execute contextualize
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory D:\work\blackberry_ws\MTest\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ hellobb ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ hellobb ---
[INFO] No tests to run.
[INFO] Surefire report directory: D:\work\blackberry_ws\MTest\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ hellobb ---
[INFO] Building jar: D:\work\blackberry_ws\MTest\target\hellobb-1.0.jar
[INFO]
[INFO] --- maven-antrun-plugin:1.3:run (App_Creation_Deployment) @ hellobb ---
[INFO] Executing tasks
[mkdir] Created dir: D:\work\blackberry_ws\MTest\target\app-binary
[jar] Building jar: D:\work\blackberry_ws\MTest\target\hellobb.jar
[echo] Generating the BlackBerry App....
[echo] Preverifying....
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.081s
[INFO] Finished at: Tue Nov 27 11:25:52 FET 2012
[INFO] Final Memory: 9M/110M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (App_Creation_Deployment) on project hellobb: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "preverify" (in directory "D:\work\blackberry_ws\MTest\target\app-binary"): CreateProcess error=2, The system cannot find the file specified -> [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
编辑2
顺便说一下。如果我将项目导入Eclipse,IDE会给我这个错误:Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-antrun-plugin:1.3:run
(execution: OS_Environment_Validation, phase: validate)
答案 0 :(得分:2)