On 28 June 2011 12:25, Adam Gibbons <[email protected]> wrote: > if you added a "shared pom" to all your projects you can specify the parent > version as a variable in the shared pom, then you only need to change it in
WRONG! variable substitution cannot take place in the following XPath coordinates /project/groupId /project/artifactId /project/version /project/parent/groupId /project/parent/artifactId /project/parent/version As the properties to substitute in cannot be known until after those values have been solidified. Versionless parent is about using inheritance and the relativePath to mean that you inherit the version from the parent at the specified relative path, and you always have to check-out with the parent or you cannot build. It has not been implemented for 3.0 it may be on the cards for 3.1 -Stephen P.S. You might think that you can do property substitution in the above XPaths, but: 1. it only works as a side-effect of a bug if you are using properties defined on the CLI 2. your build will work but your artifacts will be installed with the "literal" value not the expanded value, esp when you go to do a release, as the property values will not get passed through to the forked release build > one place. Not the answer you were looking for I know, just thought it might > help... > > > On 28 June 2011 12:21, Lucas Persson <[email protected]> wrote: > >> >> Hi >> Sorry if this has been discussed before but I can not really find a >> satisfying solution for this. >> >> I have read several pre-announcement for Maven 3 indicating support for >> "version less parent":"Those of you who have worked in multi-module >> < >> http://tomionsoftware.blogspot.com/2005/12/maven-2-how-to-multiple-module-flat.html >> > >> or multi-pom projects in Maven2 might have asked themselves, why do I >> have to specify the parent version in every sub module. Maven 3 will >> remove this redundancy and add version-less parent elements." >> >> Is this really shipped in Maven 3.0.x? I can not really find any info >> about it. >> >> Anyway what is the best practice for when having several >> multi-module/aggregation project? E.g >> - Product (super pom) >> -- Component 1 (aggregation pom) >> --- project 1 >> --- project 2 >> --- project 3 >> -- Component 2 (aggregation pom) >> --- project 4 >> --- project 5 >> --- project 6 >> >> >> The closest I can come with still needs to hardcode the version in >> "Product" and in "Component 1" and "Component 2". >> This can't not really be good. Why should I have to update several files >> when I want to change the version number for my build? >> It is the same product I am building. >> >> >> Thanks >> Lucas >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
