Home - Search - Site Map - Site Graph |  Contact
( Last Modified: 2009 June 22nd )

Maven Notes

Useful Maven commands:

-Dmaven.test.skip

skip the running tests for commands like mvn install.

mvn -Dtest=TestCircle test

Run a single test. Can also use patterns -Dtest=TestCi*le
Or comma separated lists -Dtest=TestSquare,TestCi*le

mvn -Dmaven.compiler.debug=true site

use to compile java code with debug information, Needed to run coberutura reports etc.

... | grep -e "FAILURE" -e ^Running.*Test | grep -B1 FAILURE

Use the above grep to filter the test output into a list similar to the following:

Running com.company.Test1
Tests run: 43, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 4.272 sec <<< FAILURE!
--
Running com.company.Test2
Tests run: 14, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.391 sec <<< FAILURE!
--
Running com.company.Tes3
Tests run: 47, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.298 sec <<< FAILURE!
--
Running com.company.Test4
Tests run: 14, Failures: 2, Errors: 1, Skipped: 0, Time elapsed: 14.307 sec <<< FAILURE!
--
Running com.company.Test5
Tests run: 21, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 10.947 sec <<< FAILURE!

( Page Created: 2009 June 22nd )