You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by em...@free.fr on 2003/10/15 16:36:48 UTC
How to check in a property is setted
Hi there,
Ho ca I check if a property is setted in project.properties (or
~/build.properties...).
This is not working :
<j:if test="${msl.dir == null}"> ... </j:if>
Thx,
-emmanuel
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to check in a property is setted
Posted by Dominik Dahlem <Do...@cs.tcd.ie>.
I had the same problem a while ago. I solved it with reading the
properties in a jelly variable
<j:set var="mslDir" value="${msl.dir}" />
You can then ckeck if it is set to null.
Hope that helps,
Dominik
On Wed, 2003-10-15 at 15:36, emmanuel.boudrant@free.fr wrote:
> Hi there,
>
> Ho ca I check if a property is setted in project.properties (or
> ~/build.properties...).
>
> This is not working :
>
> <j:if test="${msl.dir == null}"> ... </j:if>
>
> Thx,
> -emmanuel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to check in a property is setted [found]
Posted by em...@free.fr.
No, it's
<j:if test="${context.getVariable('msl.dir') == null}">
Thx,
-emmanuel
Selon khote <kh...@mminternet.com>:
> <j:if test="${empty(msl.dir) == 'true'}" >
> <j:if test="${empty(msl.dir) != 'true'}" >
>
> <j:if test="${!empty(msl.dir) == 'true'}" >
>
>
>
> ----- Original Message -----
> From: "Marc Portier" <mp...@outerthought.org>
> To: "Maven Users List" <us...@maven.apache.org>
> Sent: Wednesday, October 15, 2003 7:51 AM
> Subject: Re: How to check in a property is setted
>
>
> > not sure, (quite new to maven too)
> >
> > I've been checking some existing jelly code the last days and have seen
> > this construct quite often:
> >
> > <j:if test="${!empty(msl.dir)}">
> >
> > sounds like it is your way to go?
> >
> > regards,
> > -marc=
> >
> >
> > emmanuel.boudrant@free.fr wrote:
> > >
> > > Hi there,
> > >
> > > Ho ca I check if a property is setted in project.properties (or
> > > ~/build.properties...).
> > >
> > > This is not working :
> > >
> > > <j:if test="${msl.dir == null}"> ... </j:if>
> > >
> > > Thx,
> > > -emmanuel
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> >
> > --
> > Marc Portier http://outerthought.org/
> > Outerthought - Open Source, Java & XML Competence Support Center
> > Read my weblog at http://radio.weblogs.com/0116284/
> > mpo@outerthought.org mpo@apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to check in a property is setted
Posted by khote <kh...@mminternet.com>.
<j:if test="${empty(msl.dir) == 'true'}" >
<j:if test="${empty(msl.dir) != 'true'}" >
<j:if test="${!empty(msl.dir) == 'true'}" >
----- Original Message -----
From: "Marc Portier" <mp...@outerthought.org>
To: "Maven Users List" <us...@maven.apache.org>
Sent: Wednesday, October 15, 2003 7:51 AM
Subject: Re: How to check in a property is setted
> not sure, (quite new to maven too)
>
> I've been checking some existing jelly code the last days and have seen
> this construct quite often:
>
> <j:if test="${!empty(msl.dir)}">
>
> sounds like it is your way to go?
>
> regards,
> -marc=
>
>
> emmanuel.boudrant@free.fr wrote:
> >
> > Hi there,
> >
> > Ho ca I check if a property is setted in project.properties (or
> > ~/build.properties...).
> >
> > This is not working :
> >
> > <j:if test="${msl.dir == null}"> ... </j:if>
> >
> > Thx,
> > -emmanuel
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
>
> --
> Marc Portier http://outerthought.org/
> Outerthought - Open Source, Java & XML Competence Support Center
> Read my weblog at http://radio.weblogs.com/0116284/
> mpo@outerthought.org mpo@apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How to check in a property is setted
Posted by Marc Portier <mp...@outerthought.org>.
not sure, (quite new to maven too)
I've been checking some existing jelly code the last days and have seen
this construct quite often:
<j:if test="${!empty(msl.dir)}">
sounds like it is your way to go?
regards,
-marc=
emmanuel.boudrant@free.fr wrote:
>
> Hi there,
>
> Ho ca I check if a property is setted in project.properties (or
> ~/build.properties...).
>
> This is not working :
>
> <j:if test="${msl.dir == null}"> ... </j:if>
>
> Thx,
> -emmanuel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
--
Marc Portier http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at http://radio.weblogs.com/0116284/
mpo@outerthought.org mpo@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: How to check in a property is setted
Posted by Vincent Massol <vm...@pivolis.com>.
Emmanuel,
The problem is that jelly script interprets the dot (".") as the
execution of a method call.
Thus what you are really asking is:
if (msl.getDir() == null)
See the other answers for how to do it.
Thanks
-Vincent
> -----Original Message-----
> From: emmanuel.boudrant@free.fr [mailto:emmanuel.boudrant@free.fr]
> Sent: 15 October 2003 16:37
> To: users@maven.apache.org
> Subject: How to check in a property is setted
>
>
>
> Hi there,
>
> Ho ca I check if a property is setted in project.properties (or
> ~/build.properties...).
>
> This is not working :
>
> <j:if test="${msl.dir == null}"> ... </j:if>
>
> Thx,
> -emmanuel
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org