Created
January 5, 2011 19:00
-
-
Save jaydonnell/766799 to your computer and use it in GitHub Desktop.
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
| # an example for setting the classpath in a custom buildr task | |
| task :threadingtest => [:compile, :test] do | |
| # this will give us the project dependencies | |
| specs = (project.compile.dependencies + project.test.compile.dependencies).flatten | |
| # this turns them into the proper string representation | |
| cp = Buildr.artifacts(specs).each(&:invoke).map(&:name).join(File::PATH_SEPARATOR) | |
| # last we need to add our compiled classes | |
| cp = cp + ":" + path_to('target', 'classes') + ":" + path_to('target', 'test', 'classes') | |
| cmd = "java -cp #{cp} org.junit.runner.JUnitCore com.jaydonnell.javautils.MultiThreadedIT" | |
| system cmd | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment