Thursday, January 19, 2012

Maven Test Dependency

With the maven-jar-plugin's goal test-jar, it is possible to create testing dependencies.

When doing this it is important to include the dependency twice, once normally (main code) and again with <type>test-jar<type>. So long as the dependency is built first, maven will find the test code.

Note: Eclipse doesn't seem to care which if both dependencies are there, causing some confusion, but when you go to run mvn from the cli, it will care.

http://maven.apache.org/guides/mini/guide-attached-tests.html

No comments:

Post a Comment