Actually, it seems as thought if I use a normal property value in the plugin
configuration vs. an escaped one everything works. I'm not sure I
understand why. . .
Solution:
Change: $\{db.driver\} in plugin configuration
TO: ${db.driver}
David
-Original Message-
From: David H. DeWolf [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 03, 2006 11:55 AM
To: users@maven.apache.org
Subject: Profile Properties affecting another Profile
I am unable to get profiles to cooperate with each other as I
would like.
Has anyone done something similar to the following:
1) setup one profile within my pom which includes
several integration-test plugins which need to
be executed on multiple environments.
2) setup several profiles within my
profiles.xml which specify the environment
information which this profile should use.
3) Configure the plugins in #1 above to utilize
profile properties (such as $\{db.driver\})
set in the profiles specified in #2
for their configuration.
I then activate the profiles by:
mvn -P itest -Denv=local
mvn -P itest -Denv=dev
mvn -P itest -Denv=test
Examples of the pom and profiles.xml are below.
Unfortunately the profile properties do not seem to be
available in for the plugins to use. A quote on the maven wiki
(http://docs.codehaus.org/display/MAVEN/Build+Profiles)
led me to believe this was doable, but I haven't found any
references to anyone doing something similar.
The reason I'm doing this is to avoid having to configure
each set of integration tests for each and every environment.
This seems to be much more rohbust than I need.
How are other people solving this problem?
Should what I'm trying to accomplish work?
Any suggestsion?
Thanks,
David
pom.xml:
=
. . .
profile
iditest/id
build
plugins
. . .integration test plugins here. . .
/plugins
/build
/profile
profiles.xml
=
profiles
profile
idlocal/id
activation
property
nameenv/name
valuelocal/value
/property
/activation
properties
db.drivercom.mysql.jdbc.Driver/db.driver
db.urljdbc:mysql://localhost:3306/db?autoReconnect=true/db.url
db.useruser/db.user
db.passpass/db.pass
/properties
/profile
. . .
/profiles
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]