OpenIMAJ:Maven MojoExecutionException

时间:2015-09-12 14:30:24

标签: java maven openimaj

我正在尝试按照此来源的步骤创建一个OpenIMAJ项目: http://www.openimaj.org/tutorial/getting-started-with-openimaj-using-maven.html

我跑了命令:

mvn -DarchetypeCatalog=http://maven.openimaj.org/archetype-catalog.xml archetype:generate

并选择openimaj-quickstart-archetype,groupID,artifactID,左版本为1.0-SNAPSHOT,这样包,并且能够成功创建一个新项目。

由archetype创建的默认项目包含一个小的“hello world”应用程序,我尝试通过以下方式编译和汇编:

cd trial2
mvn assembly:assembly

但构建失败,我收到以下错误:

F:\OpenImaj\trial2>mvn assembly:assembly
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building trial2 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-assembly-plugin:2.2-beta-5:assembly (default-cli) > package @ trial2 >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ trial2 ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory F:\OpenImaj\trial2\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ trial2 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ trial2 ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory F:\OpenImaj\trial2\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ trial2 ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ trial2 ---
[INFO] Surefire report directory: F:\OpenImaj\trial2\target\surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running mec.main_project.group1.AppTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ trial2 ---
[INFO]
[INFO] <<< maven-assembly-plugin:2.2-beta-5:assembly (default-cli) < package @ trial2 <<<
[INFO]
[INFO] --- maven-assembly-plugin:2.2-beta-5:assembly (default-cli) @ trial2 ---
[INFO] ------------------------------------------------------------------------

(突出显示构建失败)

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.188 s
[INFO] Finished at: 2015-09-12T19:39:52+05:30
[INFO] Final Memory: 12M/112M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:assembly (default-cli) on project trial2: Error reading assemblies: No assembly descriptors found. -> [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

F:\OpenImaj\trial2>

大多数解决方案建议我检查我的java_home变量。设置正确:

F:\OpenImaj\trial2>echo %java_home%
C:\Program Files\Java\jdk1.7.0_55

另外,我的java版本是:1.8.0_31

和maven版本:

F:\OpenImaj\trial2>mvn -version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T17:27:37+05:30)
Maven home: F:\Apache Maven\apache-maven-3.3.3-bin\apache-maven-3.3.3
Java version: 1.7.0_55, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_55\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "------", version: "6.3", arch: "amd64", family: "windows"

这种构建失败可能是什么问题?

非常感谢帮助.. 在此先感谢

编辑: 我正在尝试生成jar-with-dependencies.xml文件,这对我不起作用。

0 个答案:

没有答案