On 12/22/2016 03:43 PM, João Cabrita wrote:
> You can use the maven-jar-plugin's test-jar goal:
> https://maven.apache.org/plugins/maven-jar-plugin/test-jar-mojo.html
> 
> That creates a second jar with the same coordinates but a 'test' classifier
> that you can add as a test scoped dependency on myproject-application.

That's the approach I use here, too.

Bear in mind that this test scoped jar does not have any dependencies.
So, if your test code uses e.g. commons-lang then just including the
test scoped dependency in another project is not enough - you'll have to
include commson-lang there, too.

-dirk


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to