Have a look at versions:update-properties... (you'd need version 1.0-alpha-2
or newer)

I'd structure things a little differently... but it might help you achieve
your end-goal.

2008/12/10 De Smet Ringo <[EMAIL PROTECTED]>

> Hello,
>
> [Repost from users list, hoping to get more in-depth answer here]
>
> I am busy creating an easy Maven2 setup for a 200+ module system, both
> targeted to an easier release and an easier development setup. It is a
> multi-level system, with common modules, service modules and presentation
> (web-ui) modules. I will use a simplification of this setup in this mail:
>
> pres.d -> srv.a -> common
>
> I also created a 'root' pom containing common build instructions and a
> property <ver-release>[9.10,9.11)</ver-release>. The root POM is released as
> version 9.10.0. All other modules refer to this versioned root POM as
> their parent POM.
>
> All modules in a release 9.10 (current release) have 9.10-SNAPSHOT as their
> version. When I create a release, I use the properties releaseVersion and
> developmentVersion to make builds numbered 9.10.0, 9.10.1, ... and then
> fallback to 9.10-SNAPSHOT during development. The dependencies on other
> internal modules are specified using the ver-release property. This means
> that every module depends on the latest released version of its
> dependencies, e.g.:
>
> pres.d:9.10-SNAPSHOT -> srv.a:9.10.3
> srv.a:9.10-SNAPSHOT -> common:9.10.2
>
> Making releases of modules gives me a complete versioned hierarchy since I
> create a module release containing a release-pom.xml with all the version
> ranges resolved to actual version. So far so good if you look at it from a
> release viewpoint.
>
> The problem arises trying to get my development setup in place. Developers
> usually have to change code spanning multiple modules in multiple layers.
> Let's assume that, to implement a certain feature, a developer needs to
> change pres.d, srv.a and common. In such a setup, I would like
> pres.d:9.10-SNAPSHOT to depend on srv.a:9.10-SNAPSHOT, and
> srv.a:9.10-SNAPSHOT to depend on common:9.10-SNAPSHOT.
>
> Well, since the indicated version is defined as aproperty, I created an
> active profile in my settings.xml and redeclared the ver-release property in
> there. Now comes the point where I think Maven is failing. Here is the
> output of "mvn dependency:resolve" of pres.d:
>
> [INFO] The following files have been resolved:
> [INFO] be.telenet.test:common:jar:9.10.4:compile
> [INFO] be.telenet.test:srv.a:jar:9.10-SNAPSHOT:compile
>
> The dependency resolution correctly resolved the dependency from pres.d on
> srv.a to 9.10-SNAPSHOT, but it seems to ignore my overridden property and
> resolved the dependency from srv.a on common to the latest resolved version.
> All deployed SNAPSHOT versions of the POMs contain the version property, so
> I would expect this property to resolve to my overridden value for the
> complete dependency chain.
>
> Where in the code are properties resolved to actual values when building
> Artifact objects? Any other comments?
>
> Ringo
>
>
> *************************************************************
>
> Dit e-mail bericht inclusief eventuele ingesloten bestanden kan informatie
> bevatten die vertrouwelijk is en/of beschermd door intellectuele
> eigendomsrechten. Dit bericht is uitsluitend bestemd voor de
> geadresseerde(n). Elk gebruik van de informatie vervat in dit bericht
> (waaronder de volledige of gedeeltelijke reproductie of verspreiding onder
> elke vorm) door andere personen dan de geadresseerde(n) is verboden. Indien
> u dit bericht per vergissing heeft ontvangen, gelieve de afzender hiervan te
> verwittigen en dit bericht te verwijderen.
>
> This e-mail and any attachment thereto may contain information which is
> confidential and/or protected by intellectual property rights and are
> intended for the sole use of the addressees. Any use of the information
> contained herein (including but not limited to total or partial reproduction
> or distribution in any form) by other persons than the addressees is
> prohibited. If you have received this e-mail in error, please notify the
> sender and delete its contents.
>
> Ce courriel et les annexes éventuelles peuvent contenir des informations
> confidentielles et/ou protégées par des droits de propriété intellectuelle.
> Ce message est adressé exclusivement à son (ses) destinataire(s). Toute
> utilisation du contenu de ce message (y compris la reproduction ou diffusion
> partielle ou complète sous toute forme) par une autre personne que le(s)
> destinataire(s) est formellement interdite. Si vous avez reçu ce message par
> erreur, veuillez prévenir l'expéditeur du message et en détruire le contenu.
>
> *************************************************************
>

Reply via email to