ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Exec args and quotes
Date Thu, 16 Nov 2000 16:06:42 GMT
Javier Keller <jkeller@spm.de> wrote:

> I was having the same problem, and I manage to solve it using one
> element for each argument:
> 
> 	<exec executable="${home}/bin/isrenamestore.cmd">
> 		<arg value="-debug" />
> 		<arg value="-server=eCS" />
> 		<arg value="-oldStoreName=Store" />
> 	</exec>
> 
> All the following examples fail (under NT with JDK 1.3).
> 
> Example 1
> 	<exec executable="${home}/bin/isrenamestore.cmd">
> 		<arg value="-debug -server=eCS -oldStoreName=Store"/>
> 	</exec>
> 

here you are passing >>-debug -server=eCS -oldStoreName=Store<< as a
single argument (and as opposed to your working solution). Using

<arg line="-debug -server=eCS -oldStoreName=Store"/>

should work as well.

> Example 2 (without an equal sign in the attribute)
> 		<arg value="-debug -ldsjf"/>

same as above, using the line attribute instead of value should work.

> Example 3: (notice the whitespace in the attribute value)
> 		<arg value=" -debug -ldsjf"/>

and once again.

The difference between line and value is that Ant will pass the
argument to value to the command as an single argument, using quotes
to prevent it from being broken into tokens. The argument to line will
be split into tokens which are passed as separate arguments.

Do you think we could clarify the documentation of <arg> to explain
the difference between the line and value attributes? If so, do you
have a suggestion how to word that?

Stefan

Mime
View raw message