> On Jun 22, 2021, at 2:29 PM, Andres Almiray <aalmi...@gmail.com> wrote:
> 
> Ralph,
> 
> Once you move test code to their own Maven module they become a top level 
> module, that is, they have a life of their own as any other top level module.
> 
> In contrast -tests jars are not top level, but a “variant” (that’s why they 
> have a classifier) of their owning top level module. 
> 
> Test jars must be published to a repository in order to be consumed, just 
> like any other jar, variant or not. The only difference (at least that I can 
> see) is that test jars may be downloaded using the coordinates of the owning 
> module (plus test classifier) and their release cycle is tightly coupled with 
> their owning module.
> 
> But if you take away the owning relationship you’re left with, well, just 
> another regular Maven module.
> 
> Personally I prefer the use of explicit dependencies and modules, barely make 
> use of test jar support, but I do recognize others feel differently about 
> them and prefer the workflow enables by such jars and conventions


Well, I see that Maven now recommends not generating jars with the tests 
classifier - 
https://maven.apache.org/plugins/maven-jar-plugin/examples/create-test-jar.html.
 

I am not sure when that was changed to be the recommended approach but given 
that it is I can at least give it a shot. I’m still concerned that the Maven 
compiler plugin 
won’t understand what is happening but I can only determine that by testing it.

Ralph




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to