[jira] [Commented] (MJAR-198) jar:jar without classifier replaces default jar
[ https://issues.apache.org/jira/browse/MJAR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16420958#comment-16420958 ] Archie Cobbs commented on MJAR-198: --- FYI, this broke my build, which used the jar plugin twice but with different {{finalName}} configurations (and no {{classifier}}'s). Not sure if that was intended or if my original configuration was somehow "unauthorized". Seems like the build should fail if the actual JAR file would get overridden, not if the classifier happens to be the same. That is, the conflict is at the actual filesystem level. > jar:jar without classifier replaces default jar > --- > > Key: MJAR-198 > URL: https://issues.apache.org/jira/browse/MJAR-198 > Project: Maven JAR Plugin > Issue Type: Bug >Affects Versions: 2.3.1, 2.3.2, 2.4, 2.5, 2.6 > Environment: Windows 8.1 Pro > JDK 1.8 45 > Maven 3.2.5 >Reporter: Elias Elmqvist Wulcan >Assignee: Karl Heinz Marbaise >Priority: Minor > Labels: newbie > Fix For: 3.0.0 > > Attachments: 0.tar, mvn.install.debug.txt > > > If I add an execution of jar:jar in a project of packaging jar and do not > configure a classifier for the additional jar, the additional jar will be > installed instead of the default jar. > Omitting a classifier in the configuration for the goal jar:jar is documented > to have the effect that the jar will not be attached and this is the behavior > that I want. Instead, the jar is attached and replaces the default jar. > AbstractJarMojo.java:254 checks nullness of classifier to decide whether to > attach or not. JarMojo.java:51 declares a default value the empty string for > classifier. Maybe the combination of these lines cause the bug. > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java?revision=1664111&view=markup > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/JarMojo.java?revision=1664111&view=markup -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MJAR-198) jar:jar without classifier replaces default jar
[ https://issues.apache.org/jira/browse/MJAR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16420979#comment-16420979 ] Karl Heinz Marbaise commented on MJAR-198: -- First it would be nice if you have issue open a new issue with a reference to this one...furthermore no discussions within jira issues..better use [users- or dev list|http://maven.apache.org/mail-lists.html] for such things. > jar:jar without classifier replaces default jar > --- > > Key: MJAR-198 > URL: https://issues.apache.org/jira/browse/MJAR-198 > Project: Maven JAR Plugin > Issue Type: Bug >Affects Versions: 2.3.1, 2.3.2, 2.4, 2.5, 2.6 > Environment: Windows 8.1 Pro > JDK 1.8 45 > Maven 3.2.5 >Reporter: Elias Elmqvist Wulcan >Assignee: Karl Heinz Marbaise >Priority: Minor > Labels: newbie > Fix For: 3.0.0 > > Attachments: 0.tar, mvn.install.debug.txt > > > If I add an execution of jar:jar in a project of packaging jar and do not > configure a classifier for the additional jar, the additional jar will be > installed instead of the default jar. > Omitting a classifier in the configuration for the goal jar:jar is documented > to have the effect that the jar will not be attached and this is the behavior > that I want. Instead, the jar is attached and replaces the default jar. > AbstractJarMojo.java:254 checks nullness of classifier to decide whether to > attach or not. JarMojo.java:51 declares a default value the empty string for > classifier. Maybe the combination of these lines cause the bug. > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java?revision=1664111&view=markup > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/JarMojo.java?revision=1664111&view=markup -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MJAR-198) jar:jar without classifier replaces default jar
[ https://issues.apache.org/jira/browse/MJAR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16516772#comment-16516772 ] J.Cranendonk commented on MJAR-198: --- Was an issue made for the comment Archie Cobbs mentioned? We have the same issue, broken build with multiple jar plugins configurations with different finalName's. I'm whitelisted, so can't reach the user or dev list, and google sends me here regarding this issue. What is the workaround? Adding classifier modifies the final name of the jar, instead of just using finalName, it becomes finalName-classifier.. > jar:jar without classifier replaces default jar > --- > > Key: MJAR-198 > URL: https://issues.apache.org/jira/browse/MJAR-198 > Project: Maven JAR Plugin > Issue Type: Bug >Affects Versions: 2.3.1, 2.3.2, 2.4, 2.5, 2.6 > Environment: Windows 8.1 Pro > JDK 1.8 45 > Maven 3.2.5 >Reporter: Elias Elmqvist Wulcan >Assignee: Karl Heinz Marbaise >Priority: Minor > Labels: newbie > Fix For: 3.0.0 > > Attachments: 0.tar, mvn.install.debug.txt > > > If I add an execution of jar:jar in a project of packaging jar and do not > configure a classifier for the additional jar, the additional jar will be > installed instead of the default jar. > Omitting a classifier in the configuration for the goal jar:jar is documented > to have the effect that the jar will not be attached and this is the behavior > that I want. Instead, the jar is attached and replaces the default jar. > AbstractJarMojo.java:254 checks nullness of classifier to decide whether to > attach or not. JarMojo.java:51 declares a default value the empty string for > classifier. Maybe the combination of these lines cause the bug. > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java?revision=1664111&view=markup > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/JarMojo.java?revision=1664111&view=markup -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MJAR-198) jar:jar without classifier replaces default jar
[ https://issues.apache.org/jira/browse/MJAR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16516780#comment-16516780 ] Karl Heinz Marbaise commented on MJAR-198: -- [~cranphin] Please do not use an closed issue. Please open an new one an make a reference to this... > jar:jar without classifier replaces default jar > --- > > Key: MJAR-198 > URL: https://issues.apache.org/jira/browse/MJAR-198 > Project: Maven JAR Plugin > Issue Type: Bug >Affects Versions: 2.3.1, 2.3.2, 2.4, 2.5, 2.6 > Environment: Windows 8.1 Pro > JDK 1.8 45 > Maven 3.2.5 >Reporter: Elias Elmqvist Wulcan >Assignee: Karl Heinz Marbaise >Priority: Minor > Labels: newbie > Fix For: 3.0.0 > > Attachments: 0.tar, mvn.install.debug.txt > > > If I add an execution of jar:jar in a project of packaging jar and do not > configure a classifier for the additional jar, the additional jar will be > installed instead of the default jar. > Omitting a classifier in the configuration for the goal jar:jar is documented > to have the effect that the jar will not be attached and this is the behavior > that I want. Instead, the jar is attached and replaces the default jar. > AbstractJarMojo.java:254 checks nullness of classifier to decide whether to > attach or not. JarMojo.java:51 declares a default value the empty string for > classifier. Maybe the combination of these lines cause the bug. > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java?revision=1664111&view=markup > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/JarMojo.java?revision=1664111&view=markup -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MJAR-198) jar:jar without classifier replaces default jar
[ https://issues.apache.org/jira/browse/MJAR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16518815#comment-16518815 ] Archie Cobbs commented on MJAR-198: --- I opened a new issue, MJAR-254. > jar:jar without classifier replaces default jar > --- > > Key: MJAR-198 > URL: https://issues.apache.org/jira/browse/MJAR-198 > Project: Maven JAR Plugin > Issue Type: Bug >Affects Versions: 2.3.1, 2.3.2, 2.4, 2.5, 2.6 > Environment: Windows 8.1 Pro > JDK 1.8 45 > Maven 3.2.5 >Reporter: Elias Elmqvist Wulcan >Assignee: Karl Heinz Marbaise >Priority: Minor > Labels: newbie > Fix For: 3.0.0 > > Attachments: 0.tar, mvn.install.debug.txt > > > If I add an execution of jar:jar in a project of packaging jar and do not > configure a classifier for the additional jar, the additional jar will be > installed instead of the default jar. > Omitting a classifier in the configuration for the goal jar:jar is documented > to have the effect that the jar will not be attached and this is the behavior > that I want. Instead, the jar is attached and replaces the default jar. > AbstractJarMojo.java:254 checks nullness of classifier to decide whether to > attach or not. JarMojo.java:51 declares a default value the empty string for > classifier. Maybe the combination of these lines cause the bug. > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java?revision=1664111&view=markup > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/JarMojo.java?revision=1664111&view=markup -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (MJAR-198) jar:jar without classifier replaces default jar
[ https://issues.apache.org/jira/browse/MJAR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14632720#comment-14632720 ] Karl Heinz Marbaise commented on MJAR-198: -- So i have [taken your example project|https://github.com/khmarbaise/mjar/tree/master/mjar-198] and have run it...So what i can observe is that maven-jar-plugin is executed two times... {code} [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ 0 --- [INFO] No sources to compile [INFO] [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ 0 --- [INFO] No tests to run. [INFO] [INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ 0 --- [INFO] Building jar: /Users/kama/ws-git/apache/mjar/mjar-198/target/0-1.0-SNAPSHOT.jar [INFO] [INFO] --- maven-jar-plugin:2.6:jar (executable) @ 0 --- [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 1.692 s [INFO] Finished at: 2015-07-19T09:25:58+02:00 [INFO] Final Memory: 16M/210M [INFO] {code} This is based on the build life cycle which already contains a definition of maven-jar-plugin (packaging jar). You can identify it at the line with {{default-jar}} in braces. If you simply add a supplemental execution this will result in the second execution {{executable}} of maven-jar-plugin. To configure things like the main class for the manifest correctly you can simply do this like the following without the need to configure a supplemental execution. {code:xml} maven-jar-plugin A {code} > jar:jar without classifier replaces default jar > --- > > Key: MJAR-198 > URL: https://issues.apache.org/jira/browse/MJAR-198 > Project: Maven JAR Plugin > Issue Type: Bug >Affects Versions: 2.3.1, 2.3.2, 2.4, 2.5, 2.6 > Environment: Windows 8.1 Pro > JDK 1.8 45 > Maven 3.2.5 >Reporter: Elias Elmqvist Wulcan >Priority: Minor > Labels: newbie > Attachments: 0.tar, mvn.install.debug.txt > > > If I add an execution of jar:jar in a project of packaging jar and do not > configure a classifier for the additional jar, the additional jar will be > installed instead of the default jar. > Omitting a classifier in the configuration for the goal jar:jar is documented > to have the effect that the jar will not be attached and this is the behavior > that I want. Instead, the jar is attached and replaces the default jar. > AbstractJarMojo.java:254 checks nullness of classifier to decide whether to > attach or not. JarMojo.java:51 declares a default value the empty string for > classifier. Maybe the combination of these lines cause the bug. > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java?revision=1664111&view=markup > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/JarMojo.java?revision=1664111&view=markup -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MJAR-198) jar:jar without classifier replaces default jar
[ https://issues.apache.org/jira/browse/MJAR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14633112#comment-14633112 ] Elias Elmqvist Wulcan commented on MJAR-198: That is very nice but the artifact is still attached and installed which is opposite of what the documentation says. {quote} classifier String Classifier to add to the artifact generated. If given, the artifact will be attached. _If this is not given,it will merely be written to the output directory according to the finalName._ {quote} A project using jar packaging and also building some intermediary jar files, will have its default jar overwritten by one of the intermediary jar files on install. If the intermediary jars are strange in some way, for example with special class path prefixes or special excludes, this behavior will cause depending projects to fail. > jar:jar without classifier replaces default jar > --- > > Key: MJAR-198 > URL: https://issues.apache.org/jira/browse/MJAR-198 > Project: Maven JAR Plugin > Issue Type: Bug >Affects Versions: 2.3.1, 2.3.2, 2.4, 2.5, 2.6 > Environment: Windows 8.1 Pro > JDK 1.8 45 > Maven 3.2.5 >Reporter: Elias Elmqvist Wulcan >Priority: Minor > Labels: newbie > Attachments: 0.tar, mvn.install.debug.txt > > > If I add an execution of jar:jar in a project of packaging jar and do not > configure a classifier for the additional jar, the additional jar will be > installed instead of the default jar. > Omitting a classifier in the configuration for the goal jar:jar is documented > to have the effect that the jar will not be attached and this is the behavior > that I want. Instead, the jar is attached and replaces the default jar. > AbstractJarMojo.java:254 checks nullness of classifier to decide whether to > attach or not. JarMojo.java:51 declares a default value the empty string for > classifier. Maybe the combination of these lines cause the bug. > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java?revision=1664111&view=markup > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/JarMojo.java?revision=1664111&view=markup -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MJAR-198) jar:jar without classifier replaces default jar
[ https://issues.apache.org/jira/browse/MJAR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15058685#comment-15058685 ] Nikolay Shustov commented on MJAR-198: -- Just hit the same issue which cost me a few hours of headache as my other modules compilation were failing as they relying on the installed jar's content (which was wrong). It was quite hard to figure out what's going on, especially because if I setup modules dependencies NOT through repository, everything worked fine. Got a very strange behavior, e.g. "mvn test" worked out fine but "mvn install" failed to compile the code. I'd vote for raising up the priority for that issue. > jar:jar without classifier replaces default jar > --- > > Key: MJAR-198 > URL: https://issues.apache.org/jira/browse/MJAR-198 > Project: Maven JAR Plugin > Issue Type: Bug >Affects Versions: 2.3.1, 2.3.2, 2.4, 2.5, 2.6 > Environment: Windows 8.1 Pro > JDK 1.8 45 > Maven 3.2.5 >Reporter: Elias Elmqvist Wulcan >Priority: Minor > Labels: newbie > Attachments: 0.tar, mvn.install.debug.txt > > > If I add an execution of jar:jar in a project of packaging jar and do not > configure a classifier for the additional jar, the additional jar will be > installed instead of the default jar. > Omitting a classifier in the configuration for the goal jar:jar is documented > to have the effect that the jar will not be attached and this is the behavior > that I want. Instead, the jar is attached and replaces the default jar. > AbstractJarMojo.java:254 checks nullness of classifier to decide whether to > attach or not. JarMojo.java:51 declares a default value the empty string for > classifier. Maybe the combination of these lines cause the bug. > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java?revision=1664111&view=markup > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/JarMojo.java?revision=1664111&view=markup -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MJAR-198) jar:jar without classifier replaces default jar
[ https://issues.apache.org/jira/browse/MJAR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15064380#comment-15064380 ] Karl Heinz Marbaise commented on MJAR-198: -- So after diving into the attached example i'm completely puzzled, cause the attached example uses {{finalName}} which will change only the name for {{target}} folder and not the filename which is used during the install/deploy part. If you really need to have different jars you need to use a classifier something [like this|http://maven.apache.org/plugins/maven-jar-plugin/examples/attached-jar.html]: {code:xml} ... ... org.apache.maven.plugins maven-jar-plugin 2.6 package jar client **/service/* ... ... {code} So the question is: What should happen if there is no classifier given and the plugin will be executed a second time? From my point of view it should fail the build in such cases... > jar:jar without classifier replaces default jar > --- > > Key: MJAR-198 > URL: https://issues.apache.org/jira/browse/MJAR-198 > Project: Maven JAR Plugin > Issue Type: Bug >Affects Versions: 2.3.1, 2.3.2, 2.4, 2.5, 2.6 > Environment: Windows 8.1 Pro > JDK 1.8 45 > Maven 3.2.5 >Reporter: Elias Elmqvist Wulcan >Priority: Minor > Labels: newbie > Attachments: 0.tar, mvn.install.debug.txt > > > If I add an execution of jar:jar in a project of packaging jar and do not > configure a classifier for the additional jar, the additional jar will be > installed instead of the default jar. > Omitting a classifier in the configuration for the goal jar:jar is documented > to have the effect that the jar will not be attached and this is the behavior > that I want. Instead, the jar is attached and replaces the default jar. > AbstractJarMojo.java:254 checks nullness of classifier to decide whether to > attach or not. JarMojo.java:51 declares a default value the empty string for > classifier. Maybe the combination of these lines cause the bug. > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java?revision=1664111&view=markup > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/JarMojo.java?revision=1664111&view=markup -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MJAR-198) jar:jar without classifier replaces default jar
[ https://issues.apache.org/jira/browse/MJAR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15065561#comment-15065561 ] Hudson commented on MJAR-198: - SUCCESS: Integrated in maven-plugins #4902 (See [https://builds.apache.org/job/maven-plugins/4902/]) [MJAR-198] jar:jar without classifier replaces default jar The maven-jar-plugin now will fail if you try to replace the original artifact in case of a second execution without defining a classifier. Improved documentation about the classifier. (khmarbaise: [http://svn.apache.org/viewvc/?view=rev&rev=1720976]) * maven-jar-plugin/src/it/MJAR-198 * maven-jar-plugin/src/it/MJAR-198/invoker.properties * maven-jar-plugin/src/it/MJAR-198/pom.xml * maven-jar-plugin/src/it/MJAR-198/src * maven-jar-plugin/src/it/MJAR-198/src/main * maven-jar-plugin/src/it/MJAR-198/src/main/java * maven-jar-plugin/src/it/MJAR-198/src/main/java/A.java * maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java * maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/JarMojo.java > jar:jar without classifier replaces default jar > --- > > Key: MJAR-198 > URL: https://issues.apache.org/jira/browse/MJAR-198 > Project: Maven JAR Plugin > Issue Type: Bug >Affects Versions: 2.3.1, 2.3.2, 2.4, 2.5, 2.6 > Environment: Windows 8.1 Pro > JDK 1.8 45 > Maven 3.2.5 >Reporter: Elias Elmqvist Wulcan >Assignee: Karl Heinz Marbaise >Priority: Minor > Labels: newbie > Fix For: 3.0.0 > > Attachments: 0.tar, mvn.install.debug.txt > > > If I add an execution of jar:jar in a project of packaging jar and do not > configure a classifier for the additional jar, the additional jar will be > installed instead of the default jar. > Omitting a classifier in the configuration for the goal jar:jar is documented > to have the effect that the jar will not be attached and this is the behavior > that I want. Instead, the jar is attached and replaces the default jar. > AbstractJarMojo.java:254 checks nullness of classifier to decide whether to > attach or not. JarMojo.java:51 declares a default value the empty string for > classifier. Maybe the combination of these lines cause the bug. > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java?revision=1664111&view=markup > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/JarMojo.java?revision=1664111&view=markup -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MJAR-198) jar:jar without classifier replaces default jar
[ https://issues.apache.org/jira/browse/MJAR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15065612#comment-15065612 ] Nikolay Shustov commented on MJAR-198: -- Thank you for the prompt fix. > jar:jar without classifier replaces default jar > --- > > Key: MJAR-198 > URL: https://issues.apache.org/jira/browse/MJAR-198 > Project: Maven JAR Plugin > Issue Type: Bug >Affects Versions: 2.3.1, 2.3.2, 2.4, 2.5, 2.6 > Environment: Windows 8.1 Pro > JDK 1.8 45 > Maven 3.2.5 >Reporter: Elias Elmqvist Wulcan >Assignee: Karl Heinz Marbaise >Priority: Minor > Labels: newbie > Fix For: 3.0.0 > > Attachments: 0.tar, mvn.install.debug.txt > > > If I add an execution of jar:jar in a project of packaging jar and do not > configure a classifier for the additional jar, the additional jar will be > installed instead of the default jar. > Omitting a classifier in the configuration for the goal jar:jar is documented > to have the effect that the jar will not be attached and this is the behavior > that I want. Instead, the jar is attached and replaces the default jar. > AbstractJarMojo.java:254 checks nullness of classifier to decide whether to > attach or not. JarMojo.java:51 declares a default value the empty string for > classifier. Maybe the combination of these lines cause the bug. > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java?revision=1664111&view=markup > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/JarMojo.java?revision=1664111&view=markup -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (MJAR-198) jar:jar without classifier replaces default jar
[ https://issues.apache.org/jira/browse/MJAR-198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15066229#comment-15066229 ] Elias Elmqvist Wulcan commented on MJAR-198: Thank you! > jar:jar without classifier replaces default jar > --- > > Key: MJAR-198 > URL: https://issues.apache.org/jira/browse/MJAR-198 > Project: Maven JAR Plugin > Issue Type: Bug >Affects Versions: 2.3.1, 2.3.2, 2.4, 2.5, 2.6 > Environment: Windows 8.1 Pro > JDK 1.8 45 > Maven 3.2.5 >Reporter: Elias Elmqvist Wulcan >Assignee: Karl Heinz Marbaise >Priority: Minor > Labels: newbie > Fix For: 3.0.0 > > Attachments: 0.tar, mvn.install.debug.txt > > > If I add an execution of jar:jar in a project of packaging jar and do not > configure a classifier for the additional jar, the additional jar will be > installed instead of the default jar. > Omitting a classifier in the configuration for the goal jar:jar is documented > to have the effect that the jar will not be attached and this is the behavior > that I want. Instead, the jar is attached and replaces the default jar. > AbstractJarMojo.java:254 checks nullness of classifier to decide whether to > attach or not. JarMojo.java:51 declares a default value the empty string for > classifier. Maybe the combination of these lines cause the bug. > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/AbstractJarMojo.java?revision=1664111&view=markup > http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-2.6/src/main/java/org/apache/maven/plugin/jar/JarMojo.java?revision=1664111&view=markup -- This message was sent by Atlassian JIRA (v6.3.4#6332)