You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "christofer.dutz@c-ware.de" <ch...@c-ware.de> on 2013/02/09 19:13:23 UTC

How to tell release:perform only to deploy specific modules

Hi,

this is a relatively special case and I am sort of running out of options.

I am trying to setup a build that it allows minor releases of individual projects (I don't want to get into a discussion about if this is a good thing ... please).

Now I am using release:prepare to prepare the release by providing version numbers for all modules in the project. This is working great.

Unfortunately I would like to invoke release:perform and use mavens "-projects" property to limit the reactor to a specific subset of artifacts. Otherwise the build would try to deploy artifacts that have been previously released and would instantly fail. Unfortunately the "-projects" is only picked up by the main maven process, the setting is not passed to the spawned "deploy" maven build in the checkout-directory.

How could I configure the build to act as I want? I have noticed the "additionalArguments" property in the release.properties, and was thinking about putting my "-projects" in there, but I guess this would be applied to several executions and not only the "deploy" build in the separate checkout.

Chris

Re: How to tell release:perform only to deploy specific modules

Posted by Curtis Rueden <ct...@wisc.edu>.
Hi Chris,

> Unfortunately I would like to invoke release:perform and use mavens
> "-projects" property to limit the reactor to a specific subset of
> artifacts. Otherwise the build would try to deploy artifacts that have
> been previously released and would instantly fail.

This probably does not completely solve your problem, but my team had a
vaguely similar issue with incremental deployment [1], and decided to write
a script that deploys only changed artifacts:


https://github.com/scijava/scijava-common/blob/master/bin/incremental-deploy.sh

Maybe it is useful to you.

Regards,
Curtis

[1]
http://mail-archives.apache.org/mod_mbox/maven-users/201205.mbox/%3CCADN69ynMmyS-V%2BeROd44Z1qeCKZvJBfc828fumphsvvmnx8Wrg%40mail.gmail.com%3E


On Sat, Feb 9, 2013 at 12:13 PM, christofer.dutz@c-ware.de <
christofer.dutz@c-ware.de> wrote:

> Hi,
>
> this is a relatively special case and I am sort of running out of options.
>
> I am trying to setup a build that it allows minor releases of individual
> projects (I don't want to get into a discussion about if this is a good
> thing ... please).
>
> Now I am using release:prepare to prepare the release by providing version
> numbers for all modules in the project. This is working great.
>
> Unfortunately I would like to invoke release:perform and use mavens
> "-projects" property to limit the reactor to a specific subset of
> artifacts. Otherwise the build would try to deploy artifacts that have been
> previously released and would instantly fail. Unfortunately the "-projects"
> is only picked up by the main maven process, the setting is not passed to
> the spawned "deploy" maven build in the checkout-directory.
>
> How could I configure the build to act as I want? I have noticed the
> "additionalArguments" property in the release.properties, and was thinking
> about putting my "-projects" in there, but I guess this would be applied to
> several executions and not only the "deploy" build in the separate checkout.
>
> Chris
>

AW: How to tell release:perform only to deploy specific modules

Posted by "christofer.dutz@c-ware.de" <ch...@c-ware.de>.
First of all ... thank you for replying. Hopefully I will be able to post some stuff that doesn't scare the crap out of normal Maven users one day ;-)

Well I doubt that I will be able to convince them. This build is a very special case and they do have valid reasons for this.
I do know that I will probably never have to setup a build like this again, but in this case the solution is the best solution for that particular case. They are aware of the problems that come with this and are sort of begging me to finish automating the build-system for them.

I already had the Idea of creating a custom deploy mojo, inspired by the maven release:perform mojo, but would really like to automate this without a custom plugin.

I did do some research but couldn't find a way to actually do a checkout of a tag to some place and then trigger a Maven build there. I know the checkout is not the problem here, but more the triggering of a separate Maven build ... how could I configure such a thing from the Maven commandline?

And thanks again for your help ... it's greatly appreciated.

Chris



-----Ursprüngliche Nachricht-----
Von: Robert Scholte [mailto:rfscholte@apache.org] 
Gesendet: Dienstag, 12. Februar 2013 17:36
An: Maven Users List
Betreff: Re: How to tell release:perform only to deploy specific modules

Hi Chris,

Since you're well aware that you're fighting the release procedure as expected by the maven-release-plugin, I'd suggest not to use release:perform As described on the "perform a release"-page[1] this goal does just 2
things:
- Checkout from an SCM URL with optional tag
- Run the predefined Maven goals to release the project (by default, deploy site-deploy) These are steps you can do with or without Maven.

Robert

ps. Maybe you can convince your team if you can show them how easy a release:perform is when the structure better fits the release cycle.
btw. additionalArguments is filled with arguments[2]

[1]
http://maven.apache.org/maven-release/maven-release-plugin/examples/perform-release.html
[2]
http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#arguments

Op Sat, 09 Feb 2013 19:13:23 +0100 schreef christofer.dutz@c-ware.de
<ch...@c-ware.de>:

> Hi,
>
> this is a relatively special case and I am sort of running out of 
> options.
>
> I am trying to setup a build that it allows minor releases of 
> individual projects (I don't want to get into a discussion about if 
> this is a good thing ... please).
>
> Now I am using release:prepare to prepare the release by providing 
> version numbers for all modules in the project. This is working great.
>
> Unfortunately I would like to invoke release:perform and use mavens 
> "-projects" property to limit the reactor to a specific subset of 
> artifacts. Otherwise the build would try to deploy artifacts that have 
> been previously released and would instantly fail. Unfortunately the 
> "-projects" is only picked up by the main maven process, the setting 
> is not passed to the spawned "deploy" maven build in the checkout-directory.
>
> How could I configure the build to act as I want? I have noticed the 
> "additionalArguments" property in the release.properties, and was 
> thinking about putting my "-projects" in there, but I guess this would 
> be applied to several executions and not only the "deploy" build in 
> the separate checkout.
>
> Chris

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


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


Re: How to tell release:perform only to deploy specific modules

Posted by Robert Scholte <rf...@apache.org>.
Hi Chris,

Since you're well aware that you're fighting the release procedure as  
expected by the maven-release-plugin,
I'd suggest not to use release:perform
As described on the "perform a release"-page[1] this goal does just 2  
things:
- Checkout from an SCM URL with optional tag
- Run the predefined Maven goals to release the project (by default,  
deploy site-deploy)
These are steps you can do with or without Maven.

Robert

ps. Maybe you can convince your team if you can show them how easy a  
release:perform is when the structure better fits the release cycle.
btw. additionalArguments is filled with arguments[2]

[1]  
http://maven.apache.org/maven-release/maven-release-plugin/examples/perform-release.html
[2]  
http://maven.apache.org/maven-release/maven-release-plugin/perform-mojo.html#arguments

Op Sat, 09 Feb 2013 19:13:23 +0100 schreef christofer.dutz@c-ware.de  
<ch...@c-ware.de>:

> Hi,
>
> this is a relatively special case and I am sort of running out of  
> options.
>
> I am trying to setup a build that it allows minor releases of individual  
> projects (I don't want to get into a discussion about if this is a good  
> thing ... please).
>
> Now I am using release:prepare to prepare the release by providing  
> version numbers for all modules in the project. This is working great.
>
> Unfortunately I would like to invoke release:perform and use mavens  
> "-projects" property to limit the reactor to a specific subset of  
> artifacts. Otherwise the build would try to deploy artifacts that have  
> been previously released and would instantly fail. Unfortunately the  
> "-projects" is only picked up by the main maven process, the setting is  
> not passed to the spawned "deploy" maven build in the checkout-directory.
>
> How could I configure the build to act as I want? I have noticed the  
> "additionalArguments" property in the release.properties, and was  
> thinking about putting my "-projects" in there, but I guess this would  
> be applied to several executions and not only the "deploy" build in the  
> separate checkout.
>
> Chris

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