Build Sling Failure: Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test (default-integration-test)
Asked Answered
B

2

9

im trying to build sling cause I need it for a project at the university. Can anyone tell me, how I can solve this error?

[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
Blakely answered 25/3, 2012 at 17:5 Comment(3)
What exactly are you trying to do?Squeak
Im just trying to build sling. I downloaded the sources from svn and now im trying to build it with maven.Blakely
You don't have to build Sling to use it. Have a look at a very simple sample project at svn.apache.org/repos/asf/sling/trunk/samples/espblog to see how to kick-start development.Squeak
S
10

I had the same issue with a project of my own - it seems to be an m2eclipse-issue, as it goes away when I use an external maven instead of the embedded one m2eclipse uses by default.

Syrinx answered 16/5, 2012 at 9:37 Comment(1)
I must put more comments here for someone occurred this issue again. Two steps need to resolved the issue. 1. Go to Preferences->Maven-Installation Click the "Add " button to add external Maven you had downloaded ,Then click the "Ok" or "Apply' button to save this change. 2. For you current maven project,you need to right click the project or pom.xml file ,choose "Run As"->"Run Configurations", find current maven run setting,a the bottom there's a "maven Runtime" setting , for the dropdown list to select the previous added maven ,Then click the "Apply" button to make it affect .Hereunto
L
5

its m2e-embedded mvn setting a bogus maven.home-dir

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

only known workaround (as mentioned above) is to use an external mvn

Lollygag answered 4/2, 2014 at 21:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.