atom feed4 messages in org.apache.maven.usersRe: How does the jar plugin produce a...
FromSent OnAttachments
KARR, DAVIDNov 30, 2016 3:18 pm 
Laird NelsonNov 30, 2016 3:36 pm 
KARR, DAVIDNov 30, 2016 3:41 pm 
Adrien RivardDec 1, 2016 7:29 am 
Subject:Re: How does the jar plugin produce a "*-tests.jar" when I don't specify that?
From:Adrien Rivard (adri@gmail.com)
Date:Dec 1, 2016 7:29:46 am
List:org.apache.maven.users

Is he using "-Dmaven.test.skip=true" when building? This property skips the build of the tests jar , contrary do -DskipTests=true that skip the execution of the tests.

On Thu, Dec 1, 2016 at 12:41 AM, KARR, DAVID <dk0@att.com> wrote:

-----Original Message----- From: Laird Nelson [mailto:ljne@gmail.com] Sent: Wednesday, November 30, 2016 3:36 PM To: Maven Users List <use@maven.apache.org> Subject: Re: How does the jar plugin produce a "*-tests.jar" when I don't specify that?

On Wed, Nov 30, 2016 at 3:19 PM KARR, DAVID <dk0@att.com> wrote:

The POM for "artifact1" has two dependencies on "artifact2". One is the "default" artifact, and another is a jar artifact that is only used for unit tests.

…and that's the issue. See https://maven.apache.org/plugins/maven-jar-plugin/test-jar-mojo.html; note in particular the "classifier" property ( https://maven.apache.org/plugins/maven-jar-plugin/test-jar- mojo.html#classifier ).

Some other information is here: https://maven.apache.org/guides/mini/guide-attached-tests.html

Ok, thanks. That explains why I get "*-tests.jar". I still need to understand why that other developer is not getting that jar generated. More debugging to do.