You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Wouter Lievens <wo...@cmosis.com> on 2015/09/24 10:57:55 UTC

MRELEASE: Release only modules, not project itself

Hello,

I would like to run the release plugin (prepare/perform) for a top-level POM (packaging "pom") that has a big list of modules.
The top project itself doesn't need to be tagged, released and deployed, because it's there only to build the modules in good order.
So, I want the release plugin run over each module, and only on those modules.

Is this possible? Could this be added as a feature?

Best regards,
Wouter Lievens


------------------------------
Wouter Lievens
Senior Software Architect
CMOSIS bvba
Phone +32 3 260 17 58

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


Re: MRELEASE: Release only modules, not project itself

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

it is not possible to do a tag-per-project.
Several times we get this request, but for hierarchical (i.e. non-flat)  
multimodule projects it is impossible to do this atomically. And since  
this the most common structure, I didn't find it not important enough to  
solve the release with an aggregator pom.

I'd also like to add the purpose of the tag: IMHO having all modules as a  
tag for better(?) overview is not that important. It should be about  
(fast) reproducibility. A tag matches a release root, all it's modules  
should stay in sync. When one hits a bug, try to reproduce it with the  
tag, branch it, fix it and tag it again.
Also think about the complexity you must introduce when doing the  
release:perform. Right now: check out the tag and execute "mvn deploy".  
With an aggregator pom you have a challenge, though but doable.
Although the option sounds interesting, the release-plugin manages an  
important process, so let's not overcomplicate things, unless they really,  
really work.

thanks,
Robert

Op Thu, 24 Sep 2015 16:41:32 +0200 schreef Curtis Rueden  
<ct...@wisc.edu>:

> Hi Wouter,
>
> Is the top-level POM also the parent pom of the modules? Or only an
> aggregator?
>
> If it's the parent, then you have to release it [1], because consuming  
> the
> modules later will require the parent POM as a "dependency" of sorts in
> order to fully interpolate each module POM.
>
> If it's only the aggregator, then I agree with you that releasing it is
> unnecessary. But I don't have an answer regarding whether that is  
> possible.
> On the deployment side, it certainly doesn't hurt anything to release it,
> but from an SVN tagging perspective I see how it could be problematic. To
> avoid that problem, as a wild guess: maybe you could set
> suppressCommitBeforeTag [2] to true (and/or other similar configuration
> flags) in the aggregator, but false in the individual modules?
>
> Regards,
> Curtis
>
> [1] Unless you use a trick like the flatten-maven-plugin:
> http://www.mojohaus.org/flatten-maven-plugin/
>
> [2]
> http://maven.apache.org/maven-release/maven-release-plugin/prepare-mojo.html#suppressCommitBeforeTag
>
>
> On Thu, Sep 24, 2015 at 5:34 AM, Wouter Lievens  
> <wo...@cmosis.com>
> wrote:
>
>> First of all, the top-level pom has no real meaning. It just aggregates
>> the modules, and the "end deliverable" projects (that uses maven-shade  
>> to
>> build an executable jar etc) are among the modules. I take advantage of  
>> the
>> top-level pom's topological sorting of the modules that way, of course.
>>
>> Secondly, our SVN repo is set up with tags/trunk/branches per project  
>> (so
>> not at the root), and we use SVN externals to pull all (relevant)  
>> projects
>> into a workspace, which is where the top-level pom sits. In other words,
>> the top-level pom doesn't have a tags/trunk/branches hierarchy.
>>
>> Regards
>> Wouter
>>
>>
>> ----- Original Message -----
>> From: "Jeff MAURY" <je...@gmail.com>
>> To: "Maven Users List" <us...@maven.apache.org>
>> Sent: Thursday, September 24, 2015 12:28:49 PM
>> Subject: Re: MRELEASE: Release only modules, not project itself
>>
>> What is the problem with releasing the parent pom ?
>>
>> Jeff
>> Le 24 sept. 2015 10:58, "Wouter Lievens" <wo...@cmosis.com> a
>> écrit :
>>
>> > Hello,
>> >
>> > I would like to run the release plugin (prepare/perform) for a  
>> top-level
>> > POM (packaging "pom") that has a big list of modules.
>> > The top project itself doesn't need to be tagged, released and  
>> deployed,
>> > because it's there only to build the modules in good order.
>> > So, I want the release plugin run over each module, and only on those
>> > modules.
>> >
>> > Is this possible? Could this be added as a feature?
>> >
>> > Best regards,
>> > Wouter Lievens
>> >
>> >
>> > ------------------------------
>> > Wouter Lievens
>> > Senior Software Architect
>> > CMOSIS bvba
>> > Phone +32 3 260 17 58
>> >
>> > ---------------------------------------------------------------------
>> > 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
>>

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


Re: MRELEASE: Release only modules, not project itself

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

Is the top-level POM also the parent pom of the modules? Or only an
aggregator?

If it's the parent, then you have to release it [1], because consuming the
modules later will require the parent POM as a "dependency" of sorts in
order to fully interpolate each module POM.

If it's only the aggregator, then I agree with you that releasing it is
unnecessary. But I don't have an answer regarding whether that is possible.
On the deployment side, it certainly doesn't hurt anything to release it,
but from an SVN tagging perspective I see how it could be problematic. To
avoid that problem, as a wild guess: maybe you could set
suppressCommitBeforeTag [2] to true (and/or other similar configuration
flags) in the aggregator, but false in the individual modules?

Regards,
Curtis

[1] Unless you use a trick like the flatten-maven-plugin:
http://www.mojohaus.org/flatten-maven-plugin/

[2]
http://maven.apache.org/maven-release/maven-release-plugin/prepare-mojo.html#suppressCommitBeforeTag


On Thu, Sep 24, 2015 at 5:34 AM, Wouter Lievens <wo...@cmosis.com>
wrote:

> First of all, the top-level pom has no real meaning. It just aggregates
> the modules, and the "end deliverable" projects (that uses maven-shade to
> build an executable jar etc) are among the modules. I take advantage of the
> top-level pom's topological sorting of the modules that way, of course.
>
> Secondly, our SVN repo is set up with tags/trunk/branches per project (so
> not at the root), and we use SVN externals to pull all (relevant) projects
> into a workspace, which is where the top-level pom sits. In other words,
> the top-level pom doesn't have a tags/trunk/branches hierarchy.
>
> Regards
> Wouter
>
>
> ----- Original Message -----
> From: "Jeff MAURY" <je...@gmail.com>
> To: "Maven Users List" <us...@maven.apache.org>
> Sent: Thursday, September 24, 2015 12:28:49 PM
> Subject: Re: MRELEASE: Release only modules, not project itself
>
> What is the problem with releasing the parent pom ?
>
> Jeff
> Le 24 sept. 2015 10:58, "Wouter Lievens" <wo...@cmosis.com> a
> écrit :
>
> > Hello,
> >
> > I would like to run the release plugin (prepare/perform) for a top-level
> > POM (packaging "pom") that has a big list of modules.
> > The top project itself doesn't need to be tagged, released and deployed,
> > because it's there only to build the modules in good order.
> > So, I want the release plugin run over each module, and only on those
> > modules.
> >
> > Is this possible? Could this be added as a feature?
> >
> > Best regards,
> > Wouter Lievens
> >
> >
> > ------------------------------
> > Wouter Lievens
> > Senior Software Architect
> > CMOSIS bvba
> > Phone +32 3 260 17 58
> >
> > ---------------------------------------------------------------------
> > 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: MRELEASE: Release only modules, not project itself

Posted by Wouter Lievens <wo...@cmosis.com>.
First of all, the top-level pom has no real meaning. It just aggregates the modules, and the "end deliverable" projects (that uses maven-shade to build an executable jar etc) are among the modules. I take advantage of the top-level pom's topological sorting of the modules that way, of course.

Secondly, our SVN repo is set up with tags/trunk/branches per project (so not at the root), and we use SVN externals to pull all (relevant) projects into a workspace, which is where the top-level pom sits. In other words, the top-level pom doesn't have a tags/trunk/branches hierarchy.

Regards
Wouter


----- Original Message -----
From: "Jeff MAURY" <je...@gmail.com>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Thursday, September 24, 2015 12:28:49 PM
Subject: Re: MRELEASE: Release only modules, not project itself

What is the problem with releasing the parent pom ?

Jeff
Le 24 sept. 2015 10:58, "Wouter Lievens" <wo...@cmosis.com> a
écrit :

> Hello,
>
> I would like to run the release plugin (prepare/perform) for a top-level
> POM (packaging "pom") that has a big list of modules.
> The top project itself doesn't need to be tagged, released and deployed,
> because it's there only to build the modules in good order.
> So, I want the release plugin run over each module, and only on those
> modules.
>
> Is this possible? Could this be added as a feature?
>
> Best regards,
> Wouter Lievens
>
>
> ------------------------------
> Wouter Lievens
> Senior Software Architect
> CMOSIS bvba
> Phone +32 3 260 17 58
>
> ---------------------------------------------------------------------
> 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: MRELEASE: Release only modules, not project itself

Posted by Jeff MAURY <je...@gmail.com>.
What is the problem with releasing the parent pom ?

Jeff
Le 24 sept. 2015 10:58, "Wouter Lievens" <wo...@cmosis.com> a
écrit :

> Hello,
>
> I would like to run the release plugin (prepare/perform) for a top-level
> POM (packaging "pom") that has a big list of modules.
> The top project itself doesn't need to be tagged, released and deployed,
> because it's there only to build the modules in good order.
> So, I want the release plugin run over each module, and only on those
> modules.
>
> Is this possible? Could this be added as a feature?
>
> Best regards,
> Wouter Lievens
>
>
> ------------------------------
> Wouter Lievens
> Senior Software Architect
> CMOSIS bvba
> Phone +32 3 260 17 58
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>