[
https://issues.apache.org/jira/browse/MDEPLOY-197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14613518#comment-14613518
]
S L commented on MDEPLOY-197:
-----------------------------
Hi [~rfscholte],
thanks for the feedback.
I can't speak here for the deploy:deploy-file. However, the problem I reported
in MDEPLOY-198 shows a valid use-case where a developer may not want to upload
an artifact twice.
What happens is kind of simple. The default-deploy will be executed before the
java-doc and sources are build. Therefore the default-deploy will not upload
them and we simply can't put the generation of the files before the
default-deploy because it's automatically attached. Hence we either need to set
the generation of the java-doc to a different phase OR introduce an second
configuration of a deploy. However, when we create an additional configuration,
the artifacts will be uploaded twice (and the javadocs+sources).
When I add the configuration to skip the duplicate artifact, it will not be
uploaded at all because the default-deploy and the custom-deploy share the same
configuration (you can test this with my attached example).
I also think that it should be totally up the the pom-writer where he want's to
create javadoc and source's (e.g. in deploy).
I haven't tested with deploy:file but I would say it's kind of the same problem
here.
Maybe a more reliable test would be something like:
if the md5-sum of the artifact matches, skip the upload and not just skip it at
all, if the artifact is present...
> 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
> 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)