Java

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Trouble with profile activation

    5 answers - 1087 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    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,
  • No.1 | | 2256 bytes | |

    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
  • No.2 | | 496 bytes | |

    6/12/06, Roland Asmann <Roland.Asmann (AT) cfc (DOT) atwrote:

    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.

    Thanks! This works perfectly. I made one small change, using the
    property 'jsf' so that !jsf means MyFaces, and jsf=ri means the RI.
    That way when someone writes a third JSF implementation, we can
    support it.
  • No.3 | | 881 bytes | |

    Be carefull with that, then you'd also need to add the <value>-tag for the property, but I that's documented
    pretty well I believe

    Roland

    Monday 12 June 2006 15:20, Wendy Smoak wrote:
    6/12/06, Roland Asmann <Roland.Asmann (AT) cfc (DOT) atwrote:
    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.

    Thanks! This works perfectly. I made one small change, using the
    property 'jsf' so that !jsf means MyFaces, and jsf=ri means the RI.
    That way when someone writes a third JSF implementation, we can
    support it.

    To unsubscribe, e-mail: users-unsubscribe (AT) maven (DOT) apache.org
    For additional commands, e-mail: users-help (AT) maven (DOT) apache.org
  • No.4 | | 648 bytes | |

    6/12/06, Roland Asmann <Roland.Asmann (AT) cfc (DOT) atwrote:
    Be carefull with that, then you'd also need to add the <value>-tag for the property, but I that's documented
    pretty well I believe

    Right, that's what I meant. (I think.)

    For MyFaces: <name>!jsf</name>

    For JSF RI: <name>jsf</name><value>ri</value>

    Are you saying I need a <valuefor the MyFaces profile?

    Thanks,
    Wendy

    To unsubscribe, e-mail: users-unsubscribe (AT) maven (DOT) apache.org
    For additional commands, e-mail: users-help (AT) maven (DOT) apache.org
  • No.5 | | 1039 bytes | |

    No, I meant that you need one for the RI, just like you did. ;-)
    I just said it, because in my example you could only have 2 profiles, since I left the <valueout.

    Roland

    Monday 12 June 2006 15:40, Wendy Smoak wrote:
    6/12/06, Roland Asmann <Roland.Asmann (AT) cfc (DOT) atwrote:
    Be carefull with that, then you'd also need to add the <value>-tag for
    the property, but I that's documented pretty well I believe

    Right, that's what I meant. (I think.)

    For MyFaces: <name>!jsf</name>

    For JSF RI: <name>jsf</name><value>ri</value>

    Are you saying I need a <valuefor the MyFaces profile?

    Thanks,
    Wendy

    To unsubscribe, e-mail: users-unsubscribe (AT) maven (DOT) apache.org
    For additional commands, e-mail: users-help (AT) maven (DOT) apache.org

    To unsubscribe, e-mail: users-unsubscribe (AT) maven (DOT) apache.org
    For additional commands, e-mail: users-help (AT) maven (DOT) apache.org

Re: Trouble with profile activation


max 4000 letters.
Your nickname that display:
In order to stop the spam: 3 + 2 =
QUESTION ON "Java"

EMSDN.COM