I am trying to use a plugin to load a web application in a local Jetty container from inside Eclipse. This seems to work for other people with exactly the same pom.xml, but I get this error:
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.0.3:start (default-cli) on project wsc: Failed to resolve dependency: C:\Program Files\Java\lib\tools.jar -> [Help 1]
How do i solve this? The project uses jdk1.7.0 as the "JRE System Library". I run Eclipse with "-vm", and even JAVA_HOME is set to the JDK path.
Any ideas? I have been doing this research for some time and am embarrassed about this. Documentation including tools.jar as a dependency did not help me.
Important: This seems to work outside of Eclipse, for example. a mvn -P local cargo:start.
Program exit at start from Eclipse:
[INFO] Scanning for projects...
[INFO]
[INFO]
[INFO] Building Web Services Computing 0.0.1-SNAPSHOT
[INFO]
[INFO]
[INFO]
[INFO]
[INFO] BUILD FAILURE
[INFO]
[INFO] Total time: 1.324s
[INFO] Finished at: Sat Oct 22 19:10:18 CEST 2011
[INFO] Final Memory: 15M/107M
[INFO]
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.0.3:start (default-cli) on project wsc: Failed to resolve dependency: C:\Program Files\Java\lib\tools.jar -> [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
Dependency tree output (also started with Eclipse):
[INFO] --- maven-dependency-plugin:2.1:tree (default-cli) @ wsc ---
[INFO] de.tum.ibis.wsc:wsc:war:0.0.1-SNAPSHOT
[INFO] +- junit:junit:jar:3.8.1:test
[INFO] \- javax.servlet:servlet-api:jar:2.5:compile
[INFO] ------------------------------------------------------------------------