You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by James CE Johnson <jc...@tragus.org> on 2002/12/17 17:05:56 UTC
I think I need some jelly help...
I've got the following postGoal but my j:when tests always fail.
This:
<postGoal name="war:webapp">
<j:scope>
<echo message="postGoal war:webapp (${database})"/>
<!-- this line neither helps nor hinders -->
<j:set var="database" value="${database}"/>
<j:choose>
<j:when test="${database=='oracle'}">
<echo message="The database is oracle"/>
</j:when>
<j:when test="${database=='hypersonic'}">
<echo message="The database is hypersonic"/>
</j:when>
<j:otherwise>
<echo message="Can't handle database (${database})"/>
</j:otherwise>
</j:choose>
</j:scope>
</postGoal>
Produces this:
war:webapp:
[echo] Assembling webapp automate
[copy] Copying 1 file to
/home/jcej/personal/jcej/Automate/target/automate/WEB-INF/classes
[copy] Copying 1 file to
/home/jcej/personal/jcej/Automate/target/webapps/automate.war
[echo] postGoal war:webapp (oracle)
[echo] Can't handle database (oracle)
[copy] Copying 1 file to
/home/jcej/personal/jcej/Automate/target/webapps/automate.war/WEB-INF/classes
If I add:
<j:set name="database" value="oracle"/>
prior to the j:choose then it works as expected.
What am I doing wrong?
Re: I think I need some jelly help...
Posted by James Strachan <ja...@yahoo.co.uk>.
From: "James CE Johnson" <jc...@tragus.org>
> > Try with -Ddatabase=oracle and see if that helps. I had hassles with
> > jelly and properties today.
>
> Yup. That fixed it. Now why is that any different than setting the
> property in my project.properties file? Is that a bug or a feature ;->
This sounds like a bug thats crept in lately. ConstantExpression instances
(i.e. Strings and such like) should just be expanded to their value by the
MavenJellyContext. They certainly used to be which solved many of these
problems.
James
-------
http://radio.weblogs.com/0112098/
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
Re: I think I need some jelly help...
Posted by James CE Johnson <jc...@tragus.org>.
> Try with -Ddatabase=oracle and see if that helps. I had hassles with
> jelly and properties today.
Yup. That fixed it. Now why is that any different than setting the
property in my project.properties file? Is that a bug or a feature ;->
> --
> dIon Gillard, Multitask Consulting
> Blog: http://www.freeroller.net/page/dion/Weblog
> Work: http://www.multitask.com.au
>
>
> "James CE Johnson" <jc...@tragus.org> wrote on 18/12/2002 03:47:26 AM:
>
>> > How is database being passed to maven?
>>
>> In a project.properties.
>>
>> I thought there might be an issue there with "property vs variable"
> which
>> is why I threw in the j:set. That didn't help though.
>>
>> > --
>> > dIon Gillard, Multitask Consulting
>> > Blog: http://www.freeroller.net/page/dion/Weblog
>> > Work: http://www.multitask.com.au
>> >
>> >
>> > "James CE Johnson" <jc...@tragus.org> wrote on 18/12/2002 03:05:56
>> AM:
>> >
>> >> I've got the following postGoal but my j:when tests always fail.
>> >>
>> >> This:
>> >>
>> >> <postGoal name="war:webapp">
>> >> <j:scope>
>> >> <echo message="postGoal war:webapp (${database})"/>
>> >> <!-- this line neither helps nor hinders -->
>> >> <j:set var="database" value="${database}"/>
>> >> <j:choose>
>> >> <j:when test="${database=='oracle'}">
>> >> <echo message="The database is oracle"/>
>> >> </j:when>
>> >> <j:when test="${database=='hypersonic'}">
>> >> <echo message="The database is hypersonic"/>
>> >> </j:when>
>> >> <j:otherwise>
>> >> <echo message="Can't handle database (${database})"/>
>> >> </j:otherwise>
>> >> </j:choose>
>> >> </j:scope>
>> >> </postGoal>
>> >>
>> >> Produces this:
>> >>
>> >> war:webapp:
>> >> [echo] Assembling webapp automate
>> >> [copy] Copying 1 file to
>> >> /home/jcej/personal/jcej/Automate/target/automate/WEB-INF/classes
>> >> [copy] Copying 1 file to
>> >> /home/jcej/personal/jcej/Automate/target/webapps/automate.war
>> >> [echo] postGoal war:webapp (oracle)
>> >> [echo] Can't handle database (oracle)
>> >> [copy] Copying 1 file to
>> >>
>> > /home/jcej/personal/jcej/Automate/target/webapps/automate.war/WEB-
>> INF/classes
>> >>
>> >>
>> >> If I add:
>> >> <j:set name="database" value="oracle"/>
>> >>
>> >> prior to the j:choose then it works as expected.
>> >>
>> >> What am I doing wrong?
Re: I think I need some jelly help...
Posted by di...@multitask.com.au.
Try with -Ddatabase=oracle and see if that helps. I had hassles with jelly
and properties today.
--
dIon Gillard, Multitask Consulting
Blog: http://www.freeroller.net/page/dion/Weblog
Work: http://www.multitask.com.au
"James CE Johnson" <jc...@tragus.org> wrote on 18/12/2002 03:47:26 AM:
> > How is database being passed to maven?
>
> In a project.properties.
>
> I thought there might be an issue there with "property vs variable"
which
> is why I threw in the j:set. That didn't help though.
>
> > --
> > dIon Gillard, Multitask Consulting
> > Blog: http://www.freeroller.net/page/dion/Weblog
> > Work: http://www.multitask.com.au
> >
> >
> > "James CE Johnson" <jc...@tragus.org> wrote on 18/12/2002 03:05:56 AM:
> >
> >> I've got the following postGoal but my j:when tests always fail.
> >>
> >> This:
> >>
> >> <postGoal name="war:webapp">
> >> <j:scope>
> >> <echo message="postGoal war:webapp (${database})"/>
> >> <!-- this line neither helps nor hinders -->
> >> <j:set var="database" value="${database}"/>
> >> <j:choose>
> >> <j:when test="${database=='oracle'}">
> >> <echo message="The database is oracle"/>
> >> </j:when>
> >> <j:when test="${database=='hypersonic'}">
> >> <echo message="The database is hypersonic"/>
> >> </j:when>
> >> <j:otherwise>
> >> <echo message="Can't handle database (${database})"/>
> >> </j:otherwise>
> >> </j:choose>
> >> </j:scope>
> >> </postGoal>
> >>
> >> Produces this:
> >>
> >> war:webapp:
> >> [echo] Assembling webapp automate
> >> [copy] Copying 1 file to
> >> /home/jcej/personal/jcej/Automate/target/automate/WEB-INF/classes
> >> [copy] Copying 1 file to
> >> /home/jcej/personal/jcej/Automate/target/webapps/automate.war
> >> [echo] postGoal war:webapp (oracle)
> >> [echo] Can't handle database (oracle)
> >> [copy] Copying 1 file to
> >>
> > /home/jcej/personal/jcej/Automate/target/webapps/automate.war/WEB-
> INF/classes
> >>
> >>
> >> If I add:
> >> <j:set name="database" value="oracle"/>
> >>
> >> prior to the j:choose then it works as expected.
> >>
> >> What am I doing wrong?
> >>
> >>
> >>
>
>
>
> --
> To unsubscribe, e-mail: <mailto:turbine-maven-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:turbine-maven-user-
> help@jakarta.apache.org>
>
> ForwardSourceID:NT0009A866
Re: I think I need some jelly help...
Posted by James CE Johnson <jc...@tragus.org>.
> How is database being passed to maven?
In a project.properties.
I thought there might be an issue there with "property vs variable" which
is why I threw in the j:set. That didn't help though.
> --
> dIon Gillard, Multitask Consulting
> Blog: http://www.freeroller.net/page/dion/Weblog
> Work: http://www.multitask.com.au
>
>
> "James CE Johnson" <jc...@tragus.org> wrote on 18/12/2002 03:05:56 AM:
>
>> I've got the following postGoal but my j:when tests always fail.
>>
>> This:
>>
>> <postGoal name="war:webapp">
>> <j:scope>
>> <echo message="postGoal war:webapp (${database})"/>
>> <!-- this line neither helps nor hinders -->
>> <j:set var="database" value="${database}"/>
>> <j:choose>
>> <j:when test="${database=='oracle'}">
>> <echo message="The database is oracle"/>
>> </j:when>
>> <j:when test="${database=='hypersonic'}">
>> <echo message="The database is hypersonic"/>
>> </j:when>
>> <j:otherwise>
>> <echo message="Can't handle database (${database})"/>
>> </j:otherwise>
>> </j:choose>
>> </j:scope>
>> </postGoal>
>>
>> Produces this:
>>
>> war:webapp:
>> [echo] Assembling webapp automate
>> [copy] Copying 1 file to
>> /home/jcej/personal/jcej/Automate/target/automate/WEB-INF/classes
>> [copy] Copying 1 file to
>> /home/jcej/personal/jcej/Automate/target/webapps/automate.war
>> [echo] postGoal war:webapp (oracle)
>> [echo] Can't handle database (oracle)
>> [copy] Copying 1 file to
>>
> /home/jcej/personal/jcej/Automate/target/webapps/automate.war/WEB-INF/classes
>>
>>
>> If I add:
>> <j:set name="database" value="oracle"/>
>>
>> prior to the j:choose then it works as expected.
>>
>> What am I doing wrong?
>>
>>
>>
Re: I think I need some jelly help...
Posted by di...@multitask.com.au.
How is database being passed to maven?
--
dIon Gillard, Multitask Consulting
Blog: http://www.freeroller.net/page/dion/Weblog
Work: http://www.multitask.com.au
"James CE Johnson" <jc...@tragus.org> wrote on 18/12/2002 03:05:56 AM:
> I've got the following postGoal but my j:when tests always fail.
>
> This:
>
> <postGoal name="war:webapp">
> <j:scope>
> <echo message="postGoal war:webapp (${database})"/>
> <!-- this line neither helps nor hinders -->
> <j:set var="database" value="${database}"/>
> <j:choose>
> <j:when test="${database=='oracle'}">
> <echo message="The database is oracle"/>
> </j:when>
> <j:when test="${database=='hypersonic'}">
> <echo message="The database is hypersonic"/>
> </j:when>
> <j:otherwise>
> <echo message="Can't handle database (${database})"/>
> </j:otherwise>
> </j:choose>
> </j:scope>
> </postGoal>
>
> Produces this:
>
> war:webapp:
> [echo] Assembling webapp automate
> [copy] Copying 1 file to
> /home/jcej/personal/jcej/Automate/target/automate/WEB-INF/classes
> [copy] Copying 1 file to
> /home/jcej/personal/jcej/Automate/target/webapps/automate.war
> [echo] postGoal war:webapp (oracle)
> [echo] Can't handle database (oracle)
> [copy] Copying 1 file to
>
/home/jcej/personal/jcej/Automate/target/webapps/automate.war/WEB-INF/classes
>
>
> If I add:
> <j:set name="database" value="oracle"/>
>
> prior to the j:choose then it works as expected.
>
> What am I doing wrong?
>
>
>
>
> --
> To unsubscribe, e-mail: <mailto:turbine-maven-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:turbine-maven-user-
> help@jakarta.apache.org>
>
> ForwardSourceID:NT0009A7AA