Created
May 7, 2012 10:50
-
-
Save gerjantd/2627213 to your computer and use it in GitHub Desktop.
Maven: dynamically build classpath containing all maven dependencies
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download | |
-------- | |
svn co https://src.springframework.org/svn/spring-samples/task-basic/trunk | |
(http://blog.springsource.org/2010/01/05/task-scheduling-simplifications-in-spring-3-0/) | |
Build | |
----- | |
mvn clean package | |
Run | |
--- | |
java -classpath `mvn dependency:build-classpath|grep -v "\["`:target/org.springframework.samples.task.basic-1.0.0-SNAPSHOT.jar org.springframework.samples.task.basic.annotation.AnnotationDemo | |
java -classpath `mvn dependency:build-classpath|grep -v "\["`:target/org.springframework.samples.task.basic-1.0.0-SNAPSHOT.jar org.springframework.samples.task.basic.xml.XmlDemo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment