Uploaded image for project: 'Maven Install Plugin'
  1. Maven Install Plugin
  2. MINSTALL-121

The packaging property should not be used for the file extension

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.2
    • Fix Version/s: 3.0.0-M1
    • Component/s: install:install-file
    • Labels:
      None

      Description

      I am using the install-file goal to install some OSGi bundles, Maven plugins, and Maven archetypes into my local repository. Those types have the following values for the packaging parameter:

      OSGi bundle = bundle
      Maven plugin = maven-plugin
      Maven archetype = maven-archetype

      I'm installing the archetype using the following command:
      mvn install:install-file -Dfile=my-archetype-1.0.jar -DgroupId=com.example -DartifactId=my-archetype -Dversion=1.0 -Dpackaging=maven-archetype -DgeneratePom=true

      That will copy that jar file to:
      .m2/repository/com/example/my-archetype/1.0/my-archetype-1.0.maven-archetype

      The file extension is wrong, should be jar, but at least the generated pom has the right packaging value. If I try to use archetype:crawl, it won't find my archetype because the file extension was not jar. I can change packaging to jar so the file extension is correct but now the generated pom has the wrong packaging value.

      The install-file goal should preserve the file extension of the original file and the packaging configuration should only be used for the generated pom.

        Attachments

          Activity

            People

            • Assignee:
              khmarbaise Karl Heinz Marbaise
              Reporter:
              fifalover Chris Seieroe
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: