Re: Maven trying to download '-sources.src' artifacts?
Turns out it was a problem with one of the indirect dependencies of my project. See http://stackoverflow.com/questions/12938815/maven-trying-to-download-sources-src-artifacts for the details. -- View this message in context: http://maven.40175.n5.nabble.com/Maven-trying-to-download-sources-src-artifacts-tp5726964p5727004.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Maven trying to download '-sources.src' artifacts?
Dear all, I have a Maven project that so far used to compile without problems. Today, when I run mvn clean package -U, I get: [ERROR] Failed to execute goal on project myproj: Could not resolve dependencies for project org.myorg.myproj:myproj:jar:1.0-SNAPSHOT: The following artifacts could not be resolved: javax.servlet:javax.servlet-api:src:sources:3.0.1, org.eclipse.jetty:jetty-servlet:src:sources:8.1.2.v20120308, org.eclipse.jetty:jetty-server:src:sources:8.1.2.v20120308, org.eclipse.jetty:jetty-webapp:src:sources:8.1.2.v20120308, commons-io:commons-io:src:sources:2.4: Could not find artifact javax.servlet:javax.servlet-api:src:sources:3.0.1 in MyRepo (http://maven.myorg.org:9001/nexus/content/repositories/myrepo/) -> [Help 1] I tried to with a fresh local Maven repository (rm -fr ~/.m2/repository) but that did not make any difference. Why does Maven try to find source/src artefacts? Any ideas where the problem might lie? I verified that my dependencies (as seen using mvn help:effective-pom) do not have any source classifiers. For example, the dependency on the jetty-server mentioned in the error message reads as follows: org.eclipse.jetty jetty-server 8.1.2.v20120308 compile I would be very happy to get any pointers or suggestions on how to get this issue resolved. Thanks, Kaspar P.S. I have cross-posted this answer to http://stackoverflow.com/questions/12938815/maven-trying-to-download-sources-src-artifacts also and will eventually post any resolution there. -- View this message in context: http://maven.40175.n5.nabble.com/Maven-trying-to-download-sources-src-artifacts-tp5726964.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Mvn test: how to get classpath when starting another VM?
Dear list, I have a unit test that uses Java's Runtime.exec() method to start another VM and execute code in it. I need this to test recovery from simulated power failure. The code that should run in the VM is a test case itself, from the same project. I do not know what classpath to pass to the exec command: Runtime.exec("java -classpath "\"" + System.getProperty("java.class.path") + "\" " + MyUnitTest.getCanonicalName()); This works from within Eclipse but not if I do a 'mvn test'. How can I obtain a classpath from Maven that I can use to start the separate VM? Thanks for any pointers, Kaspar P.S. What I want to do is write a unit test that runs some code which simulates a power failure by calling System.exit(). Then the unit test continues by restarting the app and checking that recovery works. To accomplish this, I wrote a unit test that uses – as described above – Runtime.exec() to launch the code that does some work and then exit()'s. But I don't manage get this to run due to the above classpath issues. -- View this message in context: http://www.nabble.com/Mvn-test%3A-how-to-get-classpath-when-starting-another-VM--tp23068442p23068442.html Sent from the Maven - Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org