You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dhananjay Nene <dh...@cash-tech.com> on 2006/11/22 18:35:18 UTC

How to Release a parent project without releasing each child project

The current maven release behaviour seems to force me to release a 
sub-project and increment its version number even if there is no code 
change done whatsover for the project.

I have a parent project (say A) with child projects (say B and C). The 
pom for A lists B and C as modules. Let us assume that each of them has 
been released with a 1.1 version.

If I change only files in the project B (and make no changes whatsoever 
to any files in C), I would like the subsequent release numbers for A 
and C to be incremented to 1.2 and B to stay at 1.1.  Can someone help 
how to achieve that ?

Dhananjay
---------------------------------------------------
Things I tried and did not work :
(a) Changed the pom.xml in B to use version number 1.1 instead of 
1.2-SNAPSHOT (which was what it got incremented to when the earlier 
release was performed).
(b) Made the "next" version number for B when releasing 1.1-SNAPSHOT to 
be 1.2 instead of 1.2-SNAPSHOT (the latter is the default value)
(c) Trying to first do a release for C and then for A
(d) Explicitly documenting the dependency in A's 1.2-SNAPSHOT pom.xml 
onto B as "1.1" and not "1.2-SNAPSHOT"



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


Re: How to Release a parent project without releasing each child project

Posted by Dhananjay Nene <dh...@cash-tech.com>.
Eric, (and other readers)

I am a little confused and maybe I am missing something.

Earlier I had a large bunch of "leaf projects" (basically a large number of
logical components) each one of them was an independent CVS module, and
they inherited their properties from a separate parents (and these parents
from other grandparents). I worked for hours to able to try to get the 
release
plugin work with such a structure. I eventually gave up after realising 
that the
release plugin functionality required that the "parent" (not the multi 
module)
had to be the parent directory for each of the "leaf projects" (and not 
some other
directory that one referenced using relative paths) and that was the 
only way
I figured I could make the release plugin work.

As of now the "higher level project" is the CVS module and it is 
simultaneously
the parent and a multimodule. If I nest the "leaf projects" inside the 
multimodule
and move the parent into a peer directory I cannot get the release 
plugin to work
though I can address the parent and inherit from the same using a 
relative path.
If I decide to keep the "higher level project" as the parent but move 
the multi-module
responsibility to another project, I cannot figure out how I can address 
the
component modules using relative paths from the multi-module.

I am also unable to easily fold a lot of such "leaf projects" into a 
single "metaproject"
since each leaf project is a very substantial piece of functionality 
(avg. size of 100000
lines of code) and large enough to require to be tracked as a project in 
its own right
with a fairly sophisticated set of dependencies across them.

Not sure if I am making sense. Not sure if I misunderstood something. 
Any light
that could be shed on this situation would be most helpful.

Dhananjay

Eric Redmond wrote:
> Let be clear here... its releasing all of them NOT because it is a 
> parent of
> the other two, but because they are MODULES of the "parent" (acutally
> multi-module). When a project is contains module projects, you are
> effectively asking Maven to propogate any actions on the multi-module 
> pom to
> each of its modules. The simplest way to get the bahavior you want is to
> create two projects: a multi-module, containing B and C as modules, and a
> parent from which they may inherit.
>
> Eric
>
> On 11/22/06, Dhananjay Nene <dh...@cash-tech.com> wrote:
>>
>> Sorry - I made a mistake - the scenario documented below should've 
>> read :
>>
>> If I change only files in the project C (and make no changes whatsoever
>> to any files in B).
>>
>> Dhananjay Nene wrote:
>> > The current maven release behaviour seems to force me to release a
>> > sub-project and increment its version number even if there is no code
>> > change done whatsover for the project.
>> >
>> > I have a parent project (say A) with child projects (say B and C). The
>> > pom for A lists B and C as modules. Let us assume that each of them
>> > has been released with a 1.1 version.
>> >
>> > <statement-in-error>If I change only files in the project B (and make
>> > no changes whatsoever to any files in C)</statement-in-error>, I would
>> > like the subsequent release numbers for A and C to be incremented to
>> > 1.2 and B to stay at 1.1.  Can someone help how to achieve that ?
>> >
>> > Dhananjay
>> > ---------------------------------------------------
>> > Things I tried and did not work :
>> > (a) Changed the pom.xml in B to use version number 1.1 instead of
>> > 1.2-SNAPSHOT (which was what it got incremented to when the earlier
>> > release was performed).
>> > (b) Made the "next" version number for B when releasing 1.1-SNAPSHOT
>> > to be 1.2 instead of 1.2-SNAPSHOT (the latter is the default value)
>> > (c) Trying to first do a release for C and then for A
>> > (d) Explicitly documenting the dependency in A's 1.2-SNAPSHOT pom.xml
>> > onto B as "1.1" and not "1.2-SNAPSHOT"
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > 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: How to Release a parent project without releasing each child project

Posted by Eric Redmond <er...@gmail.com>.
Let be clear here... its releasing all of them NOT because it is a parent of
the other two, but because they are MODULES of the "parent" (acutally
multi-module). When a project is contains module projects, you are
effectively asking Maven to propogate any actions on the multi-module pom to
each of its modules. The simplest way to get the bahavior you want is to
create two projects: a multi-module, containing B and C as modules, and a
parent from which they may inherit.

Eric

On 11/22/06, Dhananjay Nene <dh...@cash-tech.com> wrote:
>
> Sorry - I made a mistake - the scenario documented below should've read :
>
> If I change only files in the project C (and make no changes whatsoever
> to any files in B).
>
> Dhananjay Nene wrote:
> > The current maven release behaviour seems to force me to release a
> > sub-project and increment its version number even if there is no code
> > change done whatsover for the project.
> >
> > I have a parent project (say A) with child projects (say B and C). The
> > pom for A lists B and C as modules. Let us assume that each of them
> > has been released with a 1.1 version.
> >
> > <statement-in-error>If I change only files in the project B (and make
> > no changes whatsoever to any files in C)</statement-in-error>, I would
> > like the subsequent release numbers for A and C to be incremented to
> > 1.2 and B to stay at 1.1.  Can someone help how to achieve that ?
> >
> > Dhananjay
> > ---------------------------------------------------
> > Things I tried and did not work :
> > (a) Changed the pom.xml in B to use version number 1.1 instead of
> > 1.2-SNAPSHOT (which was what it got incremented to when the earlier
> > release was performed).
> > (b) Made the "next" version number for B when releasing 1.1-SNAPSHOT
> > to be 1.2 instead of 1.2-SNAPSHOT (the latter is the default value)
> > (c) Trying to first do a release for C and then for A
> > (d) Explicitly documenting the dependency in A's 1.2-SNAPSHOT pom.xml
> > onto B as "1.1" and not "1.2-SNAPSHOT"
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
>


-- 
Eric Redmond
http://codehaus.org/~eredmond

Re: How to Release a parent project without releasing each child project

Posted by Dhananjay Nene <dh...@cash-tech.com>.
Sorry - I made a mistake - the scenario documented below should've read :

If I change only files in the project C (and make no changes whatsoever 
to any files in B).

Dhananjay Nene wrote:
> The current maven release behaviour seems to force me to release a 
> sub-project and increment its version number even if there is no code 
> change done whatsover for the project.
>
> I have a parent project (say A) with child projects (say B and C). The 
> pom for A lists B and C as modules. Let us assume that each of them 
> has been released with a 1.1 version.
>
> <statement-in-error>If I change only files in the project B (and make 
> no changes whatsoever to any files in C)</statement-in-error>, I would 
> like the subsequent release numbers for A and C to be incremented to 
> 1.2 and B to stay at 1.1.  Can someone help how to achieve that ?
>
> Dhananjay
> ---------------------------------------------------
> Things I tried and did not work :
> (a) Changed the pom.xml in B to use version number 1.1 instead of 
> 1.2-SNAPSHOT (which was what it got incremented to when the earlier 
> release was performed).
> (b) Made the "next" version number for B when releasing 1.1-SNAPSHOT 
> to be 1.2 instead of 1.2-SNAPSHOT (the latter is the default value)
> (c) Trying to first do a release for C and then for A
> (d) Explicitly documenting the dependency in A's 1.2-SNAPSHOT pom.xml 
> onto B as "1.1" and not "1.2-SNAPSHOT"
>
>
>
> ---------------------------------------------------------------------
> 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