Possible to specify version from a properties file
We have more than 100 modules in our project. Each pom includes teh parent pom using the cordinates including teh version number. Is there any way to centralize the version number, maybe in a properties file/profile/something. So that if the version changes, this will be the only place where we need to change the version. ( Every pom would refer to this version number using some kind of indirection - like ${project.version} ) We would liek to avoid having to put the version number in every pom. --sony
Re: Possible to specify version from a properties file
AFAIK maven2 when processing module pom before anything else first resolves any parent reference, so parent version has to be specified explicitly. To have parent version explicitly specified and to easily update it, maybe thishttp://mojo.codehaus.org/versions-maven-plugin/examples/update-parent.htmlwill work for you. Regards, Stevo. On Fri, Dec 4, 2009 at 2:14 AM, Sony Antony sony.ant...@gmail.com wrote: We have more than 100 modules in our project. Each pom includes teh parent pom using the cordinates including teh version number. Is there any way to centralize the version number, maybe in a properties file/profile/something. So that if the version changes, this will be the only place where we need to change the version. ( Every pom would refer to this version number using some kind of indirection - like ${project.version} ) We would liek to avoid having to put the version number in every pom. --sony
Re: Possible to specify version from a properties file
For Maven 2.x you need to specify the parent's version. For Maven 3 that will change I believe. Not sure if it is already done i 3.0 (alpha). You can read about this in Jason's blog post (under 'Responding to … being completely wrong'): http://www.sonatype.com/people/2009/11/maven-3x-paving-the-desire-lines-part-one-2/ /Anders On Fri, Dec 4, 2009 at 02:14, Sony Antony sony.ant...@gmail.com wrote: We have more than 100 modules in our project. Each pom includes teh parent pom using the cordinates including teh version number. Is there any way to centralize the version number, maybe in a properties file/profile/something. So that if the version changes, this will be the only place where we need to change the version. ( Every pom would refer to this version number using some kind of indirection - like ${project.version} ) We would liek to avoid having to put the version number in every pom. --sony