You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Yann Albou (JIRA)" <ji...@codehaus.org> on 2008/11/25 15:36:19 UTC

[jira] Created: (MNG-3869) Adding a phase called 'pre-deploy'

Adding a phase called  'pre-deploy'
-----------------------------------

                 Key: MNG-3869
                 URL: http://jira.codehaus.org/browse/MNG-3869
             Project: Maven 2
          Issue Type: New Feature
          Components: Plugins and Lifecycle
    Affects Versions: 2.1.0-M1, 2.0.9, 2.0.8, 2.0.10, 3.0-alpha-1
            Reporter: Yann Albou


Our company policy mandates, for each release, the deployment of the following artifacts, alongside the usual ones (jar, war, ear):
* for each module:
  - sources.jar
  - javadocs.jar  
* for each EAR:
  - a zip assembly

We use the plugins maven-source-plugin, maven-javadoc-plugin and maven-assembly-plugin, all binded to the package phase.

However all these artifacts are only really needed when releasing, ie when calling the deploy phase. Generating them in the package phase slows down unnecessarily the developer's builds.

We tried to bind the plugins to the deploy phase but the default deploy:deploy goal is always executed before any other goals and the artifacts aren't deployed.

The obvious solution would be to have a "pre-deploy" phase where we could generate these release artifacts, and have them deployed normally in the deploy phase.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] Created: (MNG-3869) Adding a phase called 'pre-deploy'

Posted by Nick Stolwijk <ni...@gmail.com>.
I didn't look to which list it was send. I thought it was a mail to
the user mailing list. (Where it should belong. :) )

Just close the issue.

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Tue, Nov 25, 2008 at 3:52 PM, Nick Stolwijk <ni...@gmail.com> wrote:
>> However all these artifacts are only really needed when releasing, ie when calling the deploy phase.
>
> If you change this to:
>
>> However all these artifacts are only really needed when releasing, ie when calling the release plugin.
>
> The release plugin uses a release profile, thus you can bind specific
> plugins only to a release. Calling mvn deploy is not the same as a
> release, as this will only deploy the current SNAPSHOT version. A
> release takes multiple steps: tagging, changing versions numbers,
> checking dependencies, and as last step a deploy to the release
> repository. (Which is a different one than your snapshot repository.)
>
> Take a look at the release plugin:
>
> http://maven.apache.org/plugins/maven-release-plugin/
>
> Hth,
>
> Nick Stolwijk
> ~Java Developer~
>
> Iprofs BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> www.iprofs.nl
>
>
>
> On Tue, Nov 25, 2008 at 3:36 PM, Yann Albou (JIRA) <ji...@codehaus.org> wrote:
>> Adding a phase called  'pre-deploy'
>> -----------------------------------
>>
>>                 Key: MNG-3869
>>                 URL: http://jira.codehaus.org/browse/MNG-3869
>>             Project: Maven 2
>>          Issue Type: New Feature
>>          Components: Plugins and Lifecycle
>>    Affects Versions: 2.1.0-M1, 2.0.9, 2.0.8, 2.0.10, 3.0-alpha-1
>>            Reporter: Yann Albou
>>
>>
>> Our company policy mandates, for each release, the deployment of the following artifacts, alongside the usual ones (jar, war, ear):
>> * for each module:
>>  - sources.jar
>>  - javadocs.jar
>> * for each EAR:
>>  - a zip assembly
>>
>> We use the plugins maven-source-plugin, maven-javadoc-plugin and maven-assembly-plugin, all binded to the package phase.
>>
>> However all these artifacts are only really needed when releasing, ie when calling the deploy phase. Generating them in the package phase slows down unnecessarily the developer's builds.
>>
>> We tried to bind the plugins to the deploy phase but the default deploy:deploy goal is always executed before any other goals and the artifacts aren't deployed.
>>
>> The obvious solution would be to have a "pre-deploy" phase where we could generate these release artifacts, and have them deployed normally in the deploy phase.
>>
>>
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
>> -
>> For more information on JIRA, see: http://www.atlassian.com/software/jira
>>
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [jira] Created: (MNG-3869) Adding a phase called 'pre-deploy'

Posted by Nick Stolwijk <ni...@gmail.com>.
> However all these artifacts are only really needed when releasing, ie when calling the deploy phase.

If you change this to:

> However all these artifacts are only really needed when releasing, ie when calling the release plugin.

The release plugin uses a release profile, thus you can bind specific
plugins only to a release. Calling mvn deploy is not the same as a
release, as this will only deploy the current SNAPSHOT version. A
release takes multiple steps: tagging, changing versions numbers,
checking dependencies, and as last step a deploy to the release
repository. (Which is a different one than your snapshot repository.)

Take a look at the release plugin:

http://maven.apache.org/plugins/maven-release-plugin/

Hth,

Nick Stolwijk
~Java Developer~

Iprofs BV.
Claus Sluterweg 125
2012 WS Haarlem
www.iprofs.nl



On Tue, Nov 25, 2008 at 3:36 PM, Yann Albou (JIRA) <ji...@codehaus.org> wrote:
> Adding a phase called  'pre-deploy'
> -----------------------------------
>
>                 Key: MNG-3869
>                 URL: http://jira.codehaus.org/browse/MNG-3869
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: Plugins and Lifecycle
>    Affects Versions: 2.1.0-M1, 2.0.9, 2.0.8, 2.0.10, 3.0-alpha-1
>            Reporter: Yann Albou
>
>
> Our company policy mandates, for each release, the deployment of the following artifacts, alongside the usual ones (jar, war, ear):
> * for each module:
>  - sources.jar
>  - javadocs.jar
> * for each EAR:
>  - a zip assembly
>
> We use the plugins maven-source-plugin, maven-javadoc-plugin and maven-assembly-plugin, all binded to the package phase.
>
> However all these artifacts are only really needed when releasing, ie when calling the deploy phase. Generating them in the package phase slows down unnecessarily the developer's builds.
>
> We tried to bind the plugins to the deploy phase but the default deploy:deploy goal is always executed before any other goals and the artifacts aren't deployed.
>
> The obvious solution would be to have a "pre-deploy" phase where we could generate these release artifacts, and have them deployed normally in the deploy phase.
>
>
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
> -
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


[jira] Commented: (MNG-3869) Adding a phase called 'pre-deploy'

Posted by "Yann Albou (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=158638#action_158638 ] 

Yann Albou commented on MNG-3869:
---------------------------------

The problem using a profile is that all developpers will need to explicitly define the profile when they will do "mvn deploy".
If they forget then no zip, no sources or no javadocs jar file in the remote repository.

Except if it exists a way to automatically activate a profile depending on a goal ?

> Adding a phase called  'pre-deploy'
> -----------------------------------
>
>                 Key: MNG-3869
>                 URL: http://jira.codehaus.org/browse/MNG-3869
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: Plugins and Lifecycle
>    Affects Versions: 2.0.8, 2.0.9, 2.0.10, 2.1.0-M1, 3.0-alpha-1
>            Reporter: Yann Albou
>            Assignee: Brett Porter
>
> Our company policy mandates, for each release, the deployment of the following artifacts, alongside the usual ones (jar, war, ear):
> * for each module:
>   - sources.jar
>   - javadocs.jar  
> * for each EAR:
>   - a zip assembly
> We use the plugins maven-source-plugin, maven-javadoc-plugin and maven-assembly-plugin, all binded to the package phase.
> However all these artifacts are only really needed when releasing, ie when calling the deploy phase. Generating them in the package phase slows down unnecessarily the developer's builds.
> We tried to bind the plugins to the deploy phase but the default deploy:deploy goal is always executed before any other goals and the artifacts aren't deployed.
> The obvious solution would be to have a "pre-deploy" phase where we could generate these release artifacts, and have them deployed normally in the deploy phase.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3869) Adding a phase called 'pre-deploy'

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=158659#action_158659 ] 

Brett Porter commented on MNG-3869:
-----------------------------------

a little convoluted, but you can do this:

- set the deploy plugin skip configuration to ${skip.deploy}
- set the property skip.deploy to true by default and false in the deployment profile
- add an enforcer/antrun fail to fail the build in the deploy phase if skip.deploy was set to make it clearer what happened

a simpler alternative is to just add the fail to the deploy phase if the profile wasn't enabled, but that will only fail after deployment and remind them to try again.

generally, deployment is done by a centralised server (CI) rather than individuals so that the configuration can be applied consistently.

> Adding a phase called  'pre-deploy'
> -----------------------------------
>
>                 Key: MNG-3869
>                 URL: http://jira.codehaus.org/browse/MNG-3869
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: Plugins and Lifecycle
>    Affects Versions: 2.0.8, 2.0.9, 2.0.10, 2.1.0-M1, 3.0-alpha-1
>            Reporter: Yann Albou
>            Assignee: Brett Porter
>
> Our company policy mandates, for each release, the deployment of the following artifacts, alongside the usual ones (jar, war, ear):
> * for each module:
>   - sources.jar
>   - javadocs.jar  
> * for each EAR:
>   - a zip assembly
> We use the plugins maven-source-plugin, maven-javadoc-plugin and maven-assembly-plugin, all binded to the package phase.
> However all these artifacts are only really needed when releasing, ie when calling the deploy phase. Generating them in the package phase slows down unnecessarily the developer's builds.
> We tried to bind the plugins to the deploy phase but the default deploy:deploy goal is always executed before any other goals and the artifacts aren't deployed.
> The obvious solution would be to have a "pre-deploy" phase where we could generate these release artifacts, and have them deployed normally in the deploy phase.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-3869) Adding a phase called 'pre-deploy'

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter closed MNG-3869.
-----------------------------

      Assignee: Brett Porter
    Resolution: Won't Fix

this won't work, since the artifacts also need to be installed for deploy to recognise them, unless you do this by hand, which would be much more configuration.

The correct way to address this situation is to use a profile for these plugins and only activate that profile at the same time that you run the deploy phase

> Adding a phase called  'pre-deploy'
> -----------------------------------
>
>                 Key: MNG-3869
>                 URL: http://jira.codehaus.org/browse/MNG-3869
>             Project: Maven 2
>          Issue Type: New Feature
>          Components: Plugins and Lifecycle
>    Affects Versions: 2.0.8, 2.0.9, 2.0.10, 2.1.0-M1, 3.0-alpha-1
>            Reporter: Yann Albou
>            Assignee: Brett Porter
>
> Our company policy mandates, for each release, the deployment of the following artifacts, alongside the usual ones (jar, war, ear):
> * for each module:
>   - sources.jar
>   - javadocs.jar  
> * for each EAR:
>   - a zip assembly
> We use the plugins maven-source-plugin, maven-javadoc-plugin and maven-assembly-plugin, all binded to the package phase.
> However all these artifacts are only really needed when releasing, ie when calling the deploy phase. Generating them in the package phase slows down unnecessarily the developer's builds.
> We tried to bind the plugins to the deploy phase but the default deploy:deploy goal is always executed before any other goals and the artifacts aren't deployed.
> The obvious solution would be to have a "pre-deploy" phase where we could generate these release artifacts, and have them deployed normally in the deploy phase.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira