[
https://issues.apache.org/jira/browse/MDEPLOY-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14635505#comment-14635505
]
Robert Scholte edited comment on MDEPLOY-197 at 7/21/15 6:06 PM:
-----------------------------------------------------------------
Hi,
Could this please be reopened? I have come across this issue in a different
scenario. The scenario I have is the following:
1. I have release artifacts inside nexus and the releases repository does not
allow redeployments of artifacts.
2. These release artifacts were not uploaded with sources and javadocs at the
time of the release.
3. I would like to upload sources and javadocs by syncing to the tag in SCM,
and running the following maven command:
{noformat}
mvn -e org.apache.maven.plugins:maven-source-plugin:2.4:jar
org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file
-Dfile=${project.build.directory}/${project.artifactId}-${project.version}-sources.jar
-DrepositoryId=deployment
-Durl=http://nexus-ip:8081/nexus/content/repositories/releases
-DgroupId=${project.groupId} -DartifactId=${project.artifactId}
-Dversion=${project.version} -Dclassifier=sources -Dpackaging=jar
-DgeneratePom=false
{noformat}
Note, I am running this against a multi module project and so hence the reason
for using $\{project....} properties.
The result of running the command above is that the sources JAR is created and
uploaded successfully, but the build fails as maven attempts to deploy the same
sources JAR a second time which gets rejected by nexus as the repository is set
to not allow redeployments.
Any suggestions or thoughts? Is there another way that I could deploy sources
and javadocs to existing artifacts inside nexus?
Thanks,
Omar
was (Author: omar952):
Hi,
Could this please be reopened? I have come across this issue in a different
scenario. The scenario I have is the following:
1. I have release artifacts inside nexus and the releases repository does not
allow redeployments of artifacts.
2. These release artifacts were not uploaded with sources and javadocs at the
time of the release.
3. I would like to upload sources and javadocs by syncing to the tag in SCM,
and running the following maven command:
mvn -e org.apache.maven.plugins:maven-source-plugin:2.4:jar
org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy-file
-Dfile=${project.build.directory}/${project.artifactId}-${project.version}-sources.jar
-DrepositoryId=deployment
-Durl=http://nexus-ip:8081/nexus/content/repositories/releases
-DgroupId=${project.groupId} -DartifactId=${project.artifactId}
-Dversion=${project.version} -Dclassifier=sources -Dpackaging=jar
-DgeneratePom=false
Note, I am running this against a multi module project and so hence the reason
for using ${project....} properties.
The result of running the command above is that the sources JAR is created and
uploaded successfully, but the build fails as maven attempts to deploy the same
sources JAR a second time which gets rejected by nexus as the repository is set
to not allow redeployments.
Any suggestions or thoughts? Is there another way that I could deploy sources
and javadocs to existing artifacts inside nexus?
Thanks,
Omar
> deploy:deploy-file in some cases upload a file twice
> ----------------------------------------------------
>
> Key: MDEPLOY-197
> URL: https://issues.apache.org/jira/browse/MDEPLOY-197
> Project: Maven Deploy Plugin
> Issue Type: Bug
> Components: deploy:deploy-file
> Affects Versions: 2.8.2
> Reporter: Jeffrey Dang
> Assignee: Robert Scholte
> Priority: Trivial
> Labels: easyfix
> Attachments: added_file_check.patch
>
> Original Estimate: 5m
> Remaining Estimate: 5m
>
> In org/apache/maven/plugin/deploy/DeployFileMojo.java,
> When executing, deploy will be called on the file specified by deploy-file
> goal.
> Afterward, deploy will be called on project.getAttachedArtifacts().
> The specified deploy file can be included in the attached artifacts.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)