[ 
https://jira.codehaus.org/browse/MDEPLOY-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Scholte closed MDEPLOY-163.
----------------------------------

    Resolution: Won't Fix
      Assignee: Robert Scholte

The {{deploy-file}} is meant for direct invocation, meaning from cmdline and 
not as part of the build lifecycle. If you want to add additional artifacts 
during deploy, you should use 
[build-helper:attach-artifact|http://mojo.codehaus.org/build-helper-maven-plugin/attach-artifact-mojo.html].
 It binds to the correct phase and requires a minimum of configuration.
                
> Maven Deploy Plugin Deploys Attached Sources A Second Time
> ----------------------------------------------------------
>
>                 Key: MDEPLOY-163
>                 URL: https://jira.codehaus.org/browse/MDEPLOY-163
>             Project: Maven Deploy Plugin
>          Issue Type: Bug
>          Components: deploy:deploy-file
>    Affects Versions: 2.7
>         Environment: 64 Bit Linux
>            Reporter: Jonathon Golden
>            Assignee: Robert Scholte
>
> This happens in a jar pom where I have attached sources to the jar thus:
> {code:xml}
> <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-source-plugin</artifactId>
>       <executions>
>               <execution>
>                       <id>attach-sources-</id>
>                       <phase>compile</phase>
>                       <goals>
>                               <goal>jar-no-fork</goal>
>                       </goals>
>               </execution>
>       </executions>
> </plugin>
> {code}
> When running the deploy phase this will result in the source jar being 
> deployed to the repository (nexus in my case) in the normal fashion.
> I also had in the same pom (I've since moved it to another module to 
> workaround this bug) deployment of additional configuration artifacts thus:
> {code:xml}
> <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-deploy-plugin</artifactId>
>       <executions>
>               <execution>
>                       <id>deploy-REDACTED</id>
>                       <phase>deploy</phase>
>                       <configuration>
>                               <groupId>REDACTED</groupId>
>                               <artifactId>REDACTED</artifactId>
>                               <version>${project.version}</version>
>                               <file>REDACTED</file>
>                               <packaging>xml</packaging>
>                               <generatePom>true</generatePom>
>                               <repositoryId>nexus</repositoryId>
>                               
> <url>http://nexus:8081/content/repositories/${deployment.repository.suffix}</url>
>                       </configuration>
>                       <goals>
>                               <goal>deploy-file</goal>
>                       </goals>
>               </execution>
>       </executions>
> </plugin>
> {code}
> When the deploy-file goal executes it will succeed to deploy the xml file but 
> for some reason it is also attempting to upload the jar sources a second time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to