[
http://jira.codehaus.org/browse/MJAR-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=188581#action_188581
]
Rodrigo Ruiz commented on MJAR-20:
----------------------------------
Hi Paul,
My patch adds a configuration option "createEmptyArchive" that can be set to
true for forcing the jar creation. I see two ways of preventing what you
describe:
1. Set the property default value to true. This means keeping the current
default behaviour, allowing the developer to modify it at will.
2. Forcing its value to true when the classifier is null (main jar). This means
changing the body of the isCreateEmptyArchive() method to:
protected boolean isCreateEmptyArchive() {
return createEmptyArchive || getClassifier() == null;
}
I would prefer the second option, because I think this is what most people
would expect as the default behaviour (no test jar if there are no tests).
> Don't create empty jars
> -----------------------
>
> Key: MJAR-20
> URL: http://jira.codehaus.org/browse/MJAR-20
> Project: Maven 2.x Jar Plugin
> Issue Type: Improvement
> Affects Versions: 2.0
> Reporter: Carlos Sanchez
> Priority: Minor
> Attachments: MJAR-20-02.patch, MJAR-20.patch
>
>
> Creating empty jars is confusing, it should just print a warning
> use case:
> parent pom attaching test jar, some subprojects may not have tests, why
> create jars for them?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira