You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Do...@gmx.de on 2008/03/11 11:24:40 UTC

How to reference a collection of properties

 I would like to REUSE elements defined in my Parent POM. For example, I
> defined all developers of the company, writing down the first and last
> name, email adress and company name of each developer. Now, for each
> individual project, I would like to use the id of a developer as a reference to the
> information given in the parent pom, and that when the project's website is
> build by using "mvn site" that the site displays ALL information for this
> developer. Otherwise, I would have to re-type a lot of  information - as
> some developers work in all projects, I would have LOTS of redundant
> information which greatly increases maintenance. 
> --> Is there a way to avoid redundant definitions in the POM inheritance
> hierarchies?

I did some research on the problem described above. It seems what I really want is to "reference a collection of properties", as described here:
http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide (posting on bottom of page).

Using one property variable, I would like to reference an entire tree of settings, in my case the settings for a certain developer. Is there any way to do this? I tried:

<developers>
${developers.developer.id.MYID1}
${developers.developer.id.MYID4}
${developers.developer.id.MYID7}
</developers>

or
<developers>
${developers.developer.0}
${developers.developer.3}
${developers.developer.7}
</developers>

or 
<developers>
developer>${developers.developer.0}</developer>
developer>${developers.developer.3}</developer>
developer>${developers.developer.7}</developer>
</developers>

... and so on.


But all failed! :-( Any ideas if something like that is possible in Maven 2.08 or later?

Thanks in advance,

Stefanie
-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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