Uploaded image for project: 'Maven JAR Plugin'
  1. Maven JAR Plugin
  2. MJAR-198

jar:jar without classifier replaces default jar

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.3.1, 2.3.2, 2.4, 2.5, 2.6
    • 3.0.0
    • None
    • Windows 8.1 Pro
      JDK 1.8 45
      Maven 3.2.5

    Description

      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

      Attachments

        1. 0.tar
          6 kB
          Elias Elmqvist Wulcan
        2. mvn.install.debug.txt
          438 kB
          Elias Elmqvist Wulcan

        Issue Links

          Activity

            People

              khmarbaise Karl Heinz Marbaise
              e Elias Elmqvist Wulcan
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: