Uploaded image for project: 'Maven Deploy Plugin'
  1. Maven Deploy Plugin
  2. MDEPLOY-212

deploy-file incorrectly deploys attached artifacts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.8.2
    • 3.0.0-M1
    • deploy:deploy-file
    • None
    • Important

    Description

      When using the deploy-file goal in a Maven pom (not from the command-line), the deploy-file goal will attempt to additionally deploy all attached artifacts, instead of the individually specified file.

      The point of the deploy-file goal is to deploy the specified artifact and optionally the specified source, javadoc and other classified files.

      Due to this issue it will unfortunately attempt to deploy other artifacts, like -test.jars that may have been generated.

      The following lines in DeployFileMojo should be conditional, perhaps based on a property "includeAttachedArtifacts".

              List<Artifact> attachedArtifacts = project.getAttachedArtifacts();
      
              for ( Artifact attached : attachedArtifacts )
              {
                  deployableArtifacts.add( attached );
              }
      

      Attachments

        Activity

          People

            gboue Guillaume Boué
            brianoliver Brian Oliver
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: