You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Lionel C." <lc...@mediametrie.fr> on 2008/10/30 11:06:19 UTC

Best Practices Maven release-plugin multimodule with module dependencies ?

Hi,

1- In my trunk, I've got a project like this
Parent 1.1.0-SNAPSHOT
|-Project1 0.0.5-SNAPSHOT (depends on Project2 0.0.3-SNAPSHOT)
|-Project2 0.0.3-SNAPSHOT 

2- After a release of the parent 1.1.0-SNAPSHOT I would like ti have in my
tag: 
Parent 1.1.0
|-Project1 0.0.5 (depends on Project2 0.0.3)
|-Project2 0.0.3 

And in my trunk
Parent 1.2.0-SNAPSHOT
|-Project1 0.0.6-SNAPSHOT (depends on Project2 0.0.4-SNAPSHOT)
|-Project2 0.0.4-SNAPSHOT 

But it seems it's not possible and de dependencies are not well managed at
the end I've:
Parent 1.1.0
|-Project1 0.0.5 (depends on Project2 0.0.3-SNAPSHOT)
|-Project2 0.0.3 
And in my trunk
Parent 1.2.0-SNAPSHOT
|-Project1 0.0.6-SNAPSHOT (depends on Project2 0.0.3-SNAPSHOT)
|-Project2 0.0.4-SNAPSHOT 

I'm a new maven user, in the example I didn't used the dependency manager
for the version in the  parent, I declare the dependence version in the
Project1 - pom.xml. I read in the BetterBuilds with Maven to used the
dependency manager with ${project.version} for the entire child version but
it's not what I want. I want each child to have is own life (release it
independently if needed)

For the moment, I defined properties in the parent-pom.xml which correspond
to version I mean:
 <properties>
  	<Project1.version>0.0.5-SNAPSHOT</Project1.version>
  	<Project2.version>0.0.3-SNAPSHOT</Project2.version>
 </properties>
Then I used ${xxx.version} in my project, I've to modify these properties
before a release but at least at the end I've what I want.

I'm pretty sure it's not the best practices but I didn't find a solution to
solve the version increment dependence.

Thanks in advance for your answer

Lionel
-- 
View this message in context: http://n2.nabble.com/Best-Practices-Maven-release-plugin-multimodule-with-module-dependencies---tp1397646p1397646.html
Sent from the maven users mailing list archive at Nabble.com.


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


Re: Best Practices Maven release-plugin multimodule with module dependencies ?

Posted by "Lionel C." <lc...@mediametrie.fr>.
Thanks Wim

There is only pom things inside the parent for other stuff I can inherite 
it from a company pom parent (for the moment the multimodule pom ineherite 
from this one etc..)
Our multimodule project correspond to a product and inside each product 
there is sub project. I would like the product be released in one "shot" 
but for further evolution be able to release subproject if needed and add 
new subproject with different version also.

The example I gave was very simple but in fact in most part of our 
multimodule projects there is at least 4 projects so I woul like to used 
the power of maven to release the product in 1 command line and not in 4.

It seems have a multimodule projects with different subproject version is 
not in maven best practices or it's not recommanded. Am I right? because 
it's a little bit weird for me 

Lionel
-- 
View this message in context: http://n2.nabble.com/Best-Practices-Maven-release-plugin-multimodule-with-module-dependencies---tp1397646p1402207.html
Sent from the maven users mailing list archive at Nabble.com.


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


Re: Best Practices Maven release-plugin multimodule with module dependencies ?

Posted by Wim Deblauwe <wi...@gmail.com>.
If the projects are released independent, then you probably better of not
using a multimodule structure. What things are defined in your parent? If
this is only pom things, then you are better of creating a project of pom
packaging and 2 separate projects.

regards,

Wim

2008/10/30 Lionel C. <lc...@mediametrie.fr>

>
> Hi,
>
> 1- In my trunk, I've got a project like this
> Parent 1.1.0-SNAPSHOT
> |-Project1 0.0.5-SNAPSHOT (depends on Project2 0.0.3-SNAPSHOT)
> |-Project2 0.0.3-SNAPSHOT
>
> 2- After a release of the parent 1.1.0-SNAPSHOT I would like ti have in my
> tag:
> Parent 1.1.0
> |-Project1 0.0.5 (depends on Project2 0.0.3)
> |-Project2 0.0.3
>
> And in my trunk
> Parent 1.2.0-SNAPSHOT
> |-Project1 0.0.6-SNAPSHOT (depends on Project2 0.0.4-SNAPSHOT)
> |-Project2 0.0.4-SNAPSHOT
>
> But it seems it's not possible and de dependencies are not well managed at
> the end I've:
> Parent 1.1.0
> |-Project1 0.0.5 (depends on Project2 0.0.3-SNAPSHOT)
> |-Project2 0.0.3
> And in my trunk
> Parent 1.2.0-SNAPSHOT
> |-Project1 0.0.6-SNAPSHOT (depends on Project2 0.0.3-SNAPSHOT)
> |-Project2 0.0.4-SNAPSHOT
>
> I'm a new maven user, in the example I didn't used the dependency manager
> for the version in the  parent, I declare the dependence version in the
> Project1 - pom.xml. I read in the BetterBuilds with Maven to used the
> dependency manager with ${project.version} for the entire child version but
> it's not what I want. I want each child to have is own life (release it
> independently if needed)
>
> For the moment, I defined properties in the parent-pom.xml which correspond
> to version I mean:
>  <properties>
>        <Project1.version>0.0.5-SNAPSHOT</Project1.version>
>        <Project2.version>0.0.3-SNAPSHOT</Project2.version>
>  </properties>
> Then I used ${xxx.version} in my project, I've to modify these properties
> before a release but at least at the end I've what I want.
>
> I'm pretty sure it's not the best practices but I didn't find a solution to
> solve the version increment dependence.
>
> Thanks in advance for your answer
>
> Lionel
> --
> View this message in context:
> http://n2.nabble.com/Best-Practices-Maven-release-plugin-multimodule-with-module-dependencies---tp1397646p1397646.html
> Sent from the maven users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>