[ 
https://issues.apache.org/jira/browse/MNG-6959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17155569#comment-17155569
 ] 

Rupert Madden-Abbott edited comment on MNG-6959 at 7/10/20, 4:01 PM:
---------------------------------------------------------------------

[~rfscholte] I agree that the ultimate goal is to produce an artifact but those 
artifacts aren't jars in all cases.

1. I have a project which only contains test sources. They are integration 
tests for a system which is built and deployed in multiple other separate 
repositories and poms. The build fails if I don't exclude the jar plugin. Here 
the artifact is the test results.
 2. I have a project which is producing a docker image using jib. The java 
classes are added straight to the image and no jar is needed. The build passes 
but creation of the jar is redundant. Here the artifact is the docker image.
 3. Maven doesn't have to be used only for Java so the output is not always 
going to be a jar.

I'm very open to different solutions but I am surprised to learn that a jar is 
considered necessary for any build. What is the purpose of the skipIfEmpty 
parameter in that case?


was (Author: rup...@madden-abbott.com):
[~rfscholte] I agree but those artifacts aren't jars in all cases.

1. I have a project which only contains test sources. They are integration 
tests for a system which is built and deployed in multiple other separate 
repositories and poms. The build fails if I don't exclude the jar plugin. Here 
the artifact is the test results.
2. I have a project which is producing a docker image using jib. The java 
classes are added straight to the image and no jar is needed. The build passes 
but creation of the jar is redundant. Here the artifact is the docker image.
3. Maven doesn't have to be used only for Java so the output is not always 
going to be a jar.

I'm very open to different solutions but I am surprised to learn that a jar is 
considered necessary for any build. What is the purpose of the skipIfEmpty 
parameter in that case?

> Add "maven.jar.skip" property
> -----------------------------
>
>                 Key: MNG-6959
>                 URL: https://issues.apache.org/jira/browse/MNG-6959
>             Project: Maven
>          Issue Type: Improvement
>            Reporter: Rupert Madden-Abbott
>            Assignee: Robert Scholte
>            Priority: Minor
>
> The following properties are available from various plugins:
>  * maven.test.skip
>  * maven.install.skip
>  * maven.deploy.skip
> For consistency, please can we also have maven.jar.skip?
> There is a skipIfEmpty parameter but there is no way to set it via a property.
> This is helpful in keeping a standard CI build script across multiple 
> projects e.g. running mvn install, and keeping build specific various in the 
> pom.xml.
> Current workaround is to configure the jar plugin with a phase of none but 
> this is less consistent with the method of skipping other default plugins.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to