You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by sergiu gordea <gs...@ifit.uni-klu.ac.at> on 2005/05/11 16:23:52 UTC

j:if ...

 Hi all,
 
I have a little problem.
We used ant in our project and now we migrated to maven.

I read that the ant "unless" is replaced with "j:if", but  it seems that
tha "test" attribute must have a boolean value

<j:if test="true" ...

How can I check in maven if a file exists?

 I need to write something like

<j:if test="file.exists">
    <ant:copy file="file" to="destination">
</j:if>

Which is the correct syntax? Where can I find more jelly script examples?

 Thanks in advance,

 Sergiu


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: j:if ...

Posted by Steve Molloy <sm...@convera.com>.
You might want to have a look at the available tag...
http://jakarta.apache.org/commons/jelly/libs/util/tags.html#util:available

Steve

On Wed, 2005-11-05 at 17:36 +0200, Arik Kfir wrote:

> Gladly :)
> 
> 
> sergiu gordea wrote:
> 
> > Arik Kfir wrote:
> >
> >> Hi
> >>
> >>
> >> Try this (the "u" is from "jelly:util" namespace):
> >>
> >>
> >>    <u:file var="f" name="/${my.file.property.name}/myfile.jar/"/>
> >>    <j:if test="${f.exists()}">
> >>       ...
> >>    </j:if>
> >
> >
> > Thanks a lot,
> >
> > Sergiu
> >
> >>
> >>
> >> sergiu gordea wrote:
> >>
> >>>
> >>> Hi all,
> >>>
> >>> I have a little problem.
> >>> We used ant in our project and now we migrated to maven.
> >>>
> >>> I read that the ant "unless" is replaced with "j:if", but  it seems 
> >>> that
> >>> tha "test" attribute must have a boolean value
> >>>
> >>> <j:if test="true" ...
> >>>
> >>> How can I check in maven if a file exists?
> >>>
> >>> I need to write something like
> >>>
> >>> <j:if test="file.exists">
> >>>    <ant:copy file="file" to="destination">
> >>> </j:if>
> >>>
> >>> Which is the correct syntax? Where can I find more jelly script 
> >>> examples?
> >>>
> >>> Thanks in advance,
> >>>
> >>> Sergiu
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> 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: j:if ...

Posted by Arik Kfir <ar...@gmail.com>.
Gladly :)


sergiu gordea wrote:

> Arik Kfir wrote:
>
>> Hi
>>
>>
>> Try this (the "u" is from "jelly:util" namespace):
>>
>>
>>    <u:file var="f" name="/${my.file.property.name}/myfile.jar/"/>
>>    <j:if test="${f.exists()}">
>>       ...
>>    </j:if>
>
>
> Thanks a lot,
>
> Sergiu
>
>>
>>
>> sergiu gordea wrote:
>>
>>>
>>> Hi all,
>>>
>>> I have a little problem.
>>> We used ant in our project and now we migrated to maven.
>>>
>>> I read that the ant "unless" is replaced with "j:if", but  it seems 
>>> that
>>> tha "test" attribute must have a boolean value
>>>
>>> <j:if test="true" ...
>>>
>>> How can I check in maven if a file exists?
>>>
>>> I need to write something like
>>>
>>> <j:if test="file.exists">
>>>    <ant:copy file="file" to="destination">
>>> </j:if>
>>>
>>> Which is the correct syntax? Where can I find more jelly script 
>>> examples?
>>>
>>> Thanks in advance,
>>>
>>> Sergiu
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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: j:if ...

Posted by sergiu gordea <gs...@ifit.uni-klu.ac.at>.
Arik Kfir wrote:

> Hi
>
>
> Try this (the "u" is from "jelly:util" namespace):
>
>
>    <u:file var="f" name="/${my.file.property.name}/myfile.jar/"/>
>    <j:if test="${f.exists()}">
>       ...
>    </j:if>

Thanks a lot,

 Sergiu

>
>
> sergiu gordea wrote:
>
>>
>> Hi all,
>>
>> I have a little problem.
>> We used ant in our project and now we migrated to maven.
>>
>> I read that the ant "unless" is replaced with "j:if", but  it seems that
>> tha "test" attribute must have a boolean value
>>
>> <j:if test="true" ...
>>
>> How can I check in maven if a file exists?
>>
>> I need to write something like
>>
>> <j:if test="file.exists">
>>    <ant:copy file="file" to="destination">
>> </j:if>
>>
>> Which is the correct syntax? Where can I find more jelly script 
>> examples?
>>
>> Thanks in advance,
>>
>> Sergiu
>>
>>
>> ---------------------------------------------------------------------
>> 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: j:if ...

Posted by Arik Kfir <ar...@gmail.com>.
Hi


Try this (the "u" is from "jelly:util" namespace):


    <u:file var="f" name="/${my.file.property.name}/myfile.jar/"/>
    <j:if test="${f.exists()}">
       ...
    </j:if>


sergiu gordea wrote:

>
> Hi all,
>
> I have a little problem.
> We used ant in our project and now we migrated to maven.
>
> I read that the ant "unless" is replaced with "j:if", but  it seems that
> tha "test" attribute must have a boolean value
>
> <j:if test="true" ...
>
> How can I check in maven if a file exists?
>
> I need to write something like
>
> <j:if test="file.exists">
>    <ant:copy file="file" to="destination">
> </j:if>
>
> Which is the correct syntax? Where can I find more jelly script examples?
>
> Thanks in advance,
>
> Sergiu
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>