Dennis,

I think what you want to do is move the <filters> definition into each
profile itself, rather than referencing a property in the "non-profiled"
build. At least that's how I am doing it, and it works fine. Not sure if it
is best-practice or not... So your pom would like like this:

<project>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<profiles>
<profile>
<id>env-dho</id>
<activation>
<property>
<name>env</name>
<value>dho</value>
</property>
</activation>
<build>
<filters>
<filter>src/main/filters/env-dho/filter.properties</filter>
</filters>
</build>
</profile>
<profile>
<id>env-dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<filters>
<filter>src/main/filters/env-dev/filter.properties</filter>
</filters>
</build>
</profile>
</profile

Hope that helps,

Greg Case

Reply via email to