Hello everyone.
I have defined in a parent POM some profiles and some properties,
then in the child profile i have defined some resources
that use those properties, it looks like:
parent POM:
<project>
...
...
<profiles>
<profile>
<id>local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gator.smtp.server>localhost</gator.smtp.server>
<gator.smtp.from>r...@localhost</gator.smtp.from>
<store-janitor.freememory>2048000</store-janitor.freememory>
<store-janitor.heapsize>66600000</store-janitor.heapsize>
</properties>
</profile>
<profile>
<id>gator</id>
<properties>
<gator.smtp.server>server.com.ni</gator.smtp.server>
<gator.smtp.from>[email protected]</gator.smtp.from>
<store-janitor.freememory>10737000</store-janitor.freememory>
<store-janitor.heapsize>526133000</store-janitor.heapsize>
</properties>
</profile>
</profiles>
</project>
The following is the child POM:
<build>
...
...
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/webapp/WEB-INF/properties</directory>
<filtering>true</filtering>
<targetPath>../gator/WEB-INF/properties</targetPath>
</resource>
</resources>
</build>
There is a file in src/main/webapp/WEB-INF/properties with the following:
# smtp properties
gator.smtp.server = ${gator.smtp.server}
gator.smtp.from = ${gator.smtp.from}
This configuration work perfectly on maven 2.0.7, the maven build
depending on the profile change the properties for his value. Now in
maven 2.0.9 and 2.1.0-M1 this configuration seems like is not working,
there is no error messages or warning.
The other issue is that i can not override a property defined in the POM
by a property from the command line.
--
Cheers.
Carlos Chávez.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]