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

please add property 'maven.jar.classifier'

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4
    • 2.5
    • None
    • None
    • Patch

    Description

      For maven-source-plugin, adding a classifier to the source jar file name is as simple as:

      1. setup property <maven.source.classifier>jdk6-sources</maven.source.classifier>
      2. setup the right version of Maven source plugin, e.g. version 2.2.1

      And that's enough.

      But to add a classifier to the binary jar file name, we must use the very verbose way of configuring the maven-jar-plugin, as below:

      <plugin>
      	<artifactId>maven-jar-plugin</artifactId>
      	<executions>
      		<execution>
      			<phase>package</phase>
      			<goals>
      				<goal>jar</goal>
      			</goals>
      			<configuration>
      				<classifier>jdk6</classifier>
      			</configuration>
      		</execution>
      	</executions>
      </plugin>
      

      By adding support for the maven.jar.classifier property, it would be much more straightforward and consistent.

      Attachments

        Activity

          People

            olamy Olivier Lamy
            ryenus ryenus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: