9

我正在尝试构建 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
4

2 回答 2

10

我自己的一个项目也遇到了同样的问题——它似乎是一个 m2eclipse 问题,因为当我使用外部 maven 而不是默认情况下使用的嵌入式 m2eclipse 时,它​​就消失了。

于 2012-05-16T09:37:01.350 回答
5

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

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

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

于 2014-02-04T21:25:28.213 回答