atom feed6 messages in org.apache.maven.usersRe: Where to keep test only files tha...
FromSent OnAttachments
Florian SchätzDec 22, 2016 6:33 am 
João CabritaDec 22, 2016 6:43 am 
Dirk OlmesDec 23, 2016 12:39 am 
Christian SchulteDec 23, 2016 12:48 am 
Florian SchätzDec 23, 2016 7:50 am 
Christian SchulteDec 23, 2016 1:08 pm 
Subject:Re: Where to keep test only files that are needed in multiple projects?
From:Dirk Olmes (
Date:Dec 23, 2016 12:39:36 am

On 12/22/2016 03:43 PM, João Cabrita wrote:

You can use the maven-jar-plugin's test-jar goal:

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.