构建吊索失败:无法执行目标org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test(default-integration-test)

use*_*536 8 eclipse build archetypes sling

我试图建立吊索因为我需要它在大学的项目.谁能告诉我,我怎么能解决这个错误?

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------

[INFO] Total time: 54.112s
[INFO] Finished at: Sun Mar 25 18:51:41 CEST 2012
[INFO] Final Memory: 68M/165M

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test (default-integration-test) on project sling-servlet-archetype: Execution default-integration-test of goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test failed: ${maven.home} is not specified as a directory: '/home/odin/Desktop/workspace/sling-builder/EMBEDDED'. -> [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/PluginExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :sling-servlet-archetype

    enter code here
Run Code Online (Sandbox Code Playgroud)

Bjö*_*lex 7

我对自己的项目有同样的问题 - 它似乎是一个m2eclipse问题,因为当我使用外部maven而不是嵌入式m2eclipse默认使用它时它会消失.

  • 我必须在此处提出更多评论,以便有人再次发生此问题.需要两个步骤才能解决问题.1.转到首选项 - > Maven-安装单击"添加"按钮添加已下载的外部Maven,然后单击"确定"或"应用"按钮以保存此更改.2.对于您当前的maven项目,您需要右键单击项目或pom.xml文件,选择"运行方式" - >"运行配置",找到当前的maven运行设置,底部有一个"maven Runtime"设置,为下拉列表选择之前添加的maven ,然后单击"应用"按钮使其生效. (3认同)

h0r*_*ru5 5

它的 m2e 嵌入式 mvn 设置了一个虚假的 maven.home-dir

https://bugs.eclipse.org/bugs/show_bug.cgi?id=341120

唯一已知的解决方法(如上所述)是使用外部 mvn