Hi Mick,

Mick Knutson wrote on Saturday, July 28, 2007 11:30 PM:

> I have over 50 modules in my project and they all have headers like:
> 
>     <groupId>org.delta.esp.dap.c2.services</groupId>
>     <version>1.0.0.0</version>
>     <artifactId>c2-ear</artifactId>
>     <packaging>ear</packaging>
>     <parent>
>         <groupId>org.delta.esp.dap</groupId>
>         <artifactId>c2</artifactId>
>         <version>1.0.0.0</version>
>     </parent>
> 
> 
> Now many of these modules I want to build independently from
> one another
> such as a grouping of org.delta.esp.dap.c2
> When I do this, I can't use ${project.version} for the entries.
> 
> So what can I do as a best practice instead of doing a
> site-wide search and
> replace to go from:
>         <version>1.0.0.0</version>
> 
> to
> 
>         <version>1.0.0.1</version>
> 
> Each time I want to increment the build number?

Use a master-pom (for your project) that contains all version numbers in a 
dependencyManagement section. If we are about to release, we simply increase 
the numbers in the master POM and release it before we release the individual 
artifacts afterwards one by one. You only have to take care that they will 
refer your new master-pom's version and that all deps in your POms are declared 
without version. For the master POM itself we use by default version "SNAPSHOT" 
only and have a real version umber for the release only (and turn it back toi 
SNAPSHOT as the next version number). This way unreleased artifacts will 
inherit the new version also if they're bleeding edge components or may refer 
to a special version of the master POM with fixed versions at a certain time. 
Works out quite well.

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to