ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ninju Bohra <ninju_bo...@yahoo.com>
Subject Re: Empty arguments on the command-line under windows
Date Thu, 01 Sep 2005 03:06:26 GMT

If you run ANT in verbose mode (-v) what does it
output as the string that is generated...?

On a side note, properties are immutable in ANT and so
you can shorten (actually eliminate) the <condition>
check on the registry.cache.dir and just make it:

  <property name="registry.cache.dir" value=""/>

because if registry.cache.dir is already set to any
value the <property> setting will be ignored, however
if registry.cache.dir has not been set it will be set
to a blank string

Later,

Ninju
--- Martin Senger <senger@ebi.ac.uk> wrote:

> My <java> task is (shortened):
> 
> <java classname="MosesGenerators"
> taskname="Service(s)"
>    classpathref="moses.build.classpath" fork="true"
> failonerror="true">
>    <arg value="-cacheDir"/>
>    <arg file="${registry.cache.dir}"/>
>    <arg value="-s"/>
> </java>
> 
> Before invoking it I set an empty value to
> ${registry.cache.dir} unless it
> is already set:
> 
> <condition property="registry.cache.dir" value="">
>    <not><isset property="registry.cache.dir"/></not>
> </condition>
> 
> If the value is indeed empty, I would expect that my
> java class gets three
> command-line arguments like this:
>    -cacheDir "" -s
> 
> And, indeed, it does - but only under linux. Under
> windows the empty
> argument disappears:
>    -cacheDir -s
> 
> This may be a native way how Windows deals with such
> situation, so Ant
> cannot do much about it. Could anybody conform this,
> or advise me how to
> make it work on both OS?
> 
>    Thanks you very much for your help,
>    Martin
> 
> -- 
> Martin Senger
>    email: martin.senger@gmail.com
>    skype: martinsenger
> consulting for:
>    International Rice Research Institute
>    Biometrics and Bioinformatics Unit
>    DAPO BOX 7777, Metro Manila
>    Philippines, phone: +63-2-580-5600 (ext.2324)
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 






		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message