Hello Martin, you can, using the condition task, set registry.cache.dir to "" only when running under windows.
Hopes this helps, Antoine > --- Ursprüngliche Nachricht --- > Von: Martin Senger <[EMAIL PROTECTED]> > An: Ant Users List <user@ant.apache.org> > Betreff: Re: Empty arguments on the command-line under windows > Datum: Thu, 1 Sep 2005 08:25:40 +0100 (BST) > > > This (condition task invocation) rewrites more simply : > > > > <property name="registry.cache.dir" value=""/> > > because ant only assigns a value to unexisting properties. > > > You are, of course, completely right (thanks also to Ninju Bohra who > pointed to this, as well). I know that but sometimes I forget. Thanks... > > > To solve your Windows problem, you can do : > > <property name="registry.cache.dir" value=""""/> > > this might lead Windows to understand that there is an empty argument > > > This is not bad (and I may use it, after all), but still it is not > OS-independent. Because linux takes literally what is there - so it takes > quotes as part of the parameters, windows does not. But at least, windows > let it as a parameter, so I can teach my program to take two double > quotes as an empty value. > This is what it does: > The Ant task is now: > > <property name="my.property" value=""""/> > > <java classname="TestArgs" taskname="testing" > classpathref="build.classpath" fork="true" failonerror="true"> > <arg value="-cacheDir"/> > <arg value="${my.property}"/> > <arg value="-dt"/> > </java> > > This is an output (of a simple program that prints its argumenst) under > windows, if I do not set my.property: > > [testing] 0: -cacheDir > [testing] 1: abc > [testing] 2: -dt > > And the same under linux: > > [testing] 0: -cacheDir > [testing] 1: "" > [testing] 2: -dt > > I have feeling (but I may be wrong) that this kind of > OS-interoperability should be solved by Ant... > > Thanks, Martin --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]