maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <>
Subject [jira] [Commented] (MDEPLOY-198) deploy:deploy in some cases upload a file twice
Date Sat, 04 Jul 2015 19:13:04 GMT


Robert Scholte commented on MDEPLOY-198:

Now you describe your *real* issue: you want to be able to specify attachments only for {{deploy}}
(and not for {{install}}).

{quote}I as a pom-creator should be allowed to set the execution of my plugin's to whatsoever
phase (in this case deploy).{quote}
And you can, but you still have to respect the default lifecycle.
You already noticed that the deploy-plugin is always called first, no matter the order of
plugins, since that how it is defined in the lifecycle for all packaging types.
So your hack was to introduce introduce an extra execution block for the deploy-plugin. 

Now regarding the twice-upload: executions aren't aware of each other, so it's not possible
to detect this within the plugin. (which implies that in the end I will close this as won't

I still want to state that after the package-phase the project should be for transfer, either
{{install}} or {{deploy}}. 
I also think that it is up to the end user to decide if he/she wants to {{install}} the sources
and javadoc, and not the pom-creator.

If you still want control over the do/don't attach of these files, here are some options:
- (preferred) make use the skip parameter of both plugins. You could introduce your own property
to set them both at once.
- Use a profile where for the attachment plugins. It's up to you to active it by default or
- (hack, not verified) keep the execution-block in the deploy-plugin. In its global configuration
set skip to true, in the execution block to false.

> deploy:deploy in some cases upload a file twice
> -----------------------------------------------
>                 Key: MDEPLOY-198
>                 URL:
>             Project: Maven Deploy Plugin
>          Issue Type: Bug
>          Components: deploy:deploy
>    Affects Versions: 2.8.2
>            Reporter: S L
>            Priority: Minor
>         Attachments:
> This is a similar issue to MDEPLOY-197 and if you feel that is this is the same problem
feel free to close it as duplicate.
> However, in some cases when using the maven-deploy-plugin the artificat will be uploaded
twice. Example will be attached.
> In my example I craft sources & javadoc in the deploy-phase and have an additional
maven-deploy-plugin-definition which also be be executed in deploy. However the default-deploy
will upload the final artifact as well as my custom tailored maven-deploy-plugin-definition
and therefore the artifcat will be uploaded twice.
> In the zip there is also the build log where I replaced all sensitive information.

This message was sent by Atlassian JIRA

View raw message