You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Toto Laricot <to...@gmail.com> on 2006/06/11 01:48:02 UTC
Inheriting properties from the parent POM
Hi all,
I use a filter to inject properties in a config file. Because the properties
file to use depend on the environment, I defined several profiles.
i.e.:
<filters>
<filter>${db-properties}</filter>
</filters>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
And:
<profiles>
<profile>
blahblah
<properties>
<db-properties>src/main/filters/dev-env.properties</db-properties>
</properties>
</profile>
</profiles>
Now, this works fine when I put the <profiles> and <filters> definitions in
the same POM; but when I move the <profiles> section to the parent POM files
(because I would like to keep all profile-related information in the same
place), the properties are not passed to the child POM.
I would like to keep all profile-related information in the same place
Is there a way I can pass properties from a parent POM to a child?
Or is there a better way to deal with this situation?
Thanks for your help,
Theo.