Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-1251

attachArtifact doesn't allow to attach an artifact with different type and no assembly

    XMLWordPrintableJSON

Details

    Description

      Use case: a project triggers a plugin which generates several files. I want to put all these files in a zip file and install it when calling install.
      So I bind my plugin to the package phase, I keep the project packaging as pom, and then i tri to do soemthing like projectHelper.attachArtifact( project, "zip", null, toFile ); in my execute() method

      this fails in 2 places:

      • empty or null classifier is disallowed by AttachedArtifact
      • then AttachedArtifact inherits the parent's ArtifactHandler which then will return "pom" as extension instead of "zip" (the type) .

      Thus my artifact ends up being installed in finalName-forcedClassifier.pom instead of finalName.zip...
      Blocks my webstart plugin development,

      Note that project.attachArtifact() looks empty...

      Attachments

        Activity

          People

            jdcasey John Dennis Casey
            lacostej Jerome Lacoste
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h Original Estimate - 1h
                1h
                Remaining:
                Time Spent - 1h Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - 1h Remaining Estimate - 1h
                1h