You could switch activation of your profiles to properties and define the MyFaces with the 'not available' and the
reference-implementation wth the 'available' version.
Example:
<profiles>
<profile>
<id>myfaces</id>
<activation>
<property>
<name>!jsfri</name>
</property>
</activation>
<!-- Your MyFaces-specific stuff
</profile>
<profile>
<id>jsfri</id>
<activation>
<property>
<name>jsfri</name>
</property>
</activation>
<!-- Your stuff
</profile>
</profiles>
Now, if you would run 'mvn install', it should activate the myfaces-profile per default. If you want to activate the JSF
Reference-implementation you should run 'mvn -Djsfri=true'.
Hope this helped,
Roland
Saturday 10 June 2006 23:01, Wendy Smoak wrote:
I need help understanding this:
"If a profile that's embedded in PM is activated by a means other
than <activeByDefault/>, then all <activeByDefault/triggers are
suppressed." --
I have a profile that gets activated when JDK 1.5 is in use.
I need another profile (id=myfaces) to be active by default and bring
in the MyFaces JSF implementation and API jars. That is, 'mvn
install' should Just Work, and use MyFaces.
And then I need a way to say, "Don't use MyFaces, use the JSF
Reference Implementation from Sun instead." (Another profile with
id=jsfri)
Right now, I have the 'myfaces' profile set as activeByDefault, but it
gets suppressed by the rule quoted above, since the jdk15 profile was
activated by the use of JDK 1.5 to compile.
That means we always have to specify -Pmyfaces or -Pjsfri, or the
project won't compile.
Here's the pom in question:
*
Any ideas on how to get exactly one of the myfaces or jsfri profiles
activated?
Thanks,
To unsubscribe, e-mail: users-unsubscribe (AT) maven (DOT) apache.org
For additional commands, e-mail: users-help (AT) maven (DOT) apache.org