ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Genter" <rgen...@silverlink.com>
Subject RE: arg and jvmarg
Date Fri, 11 Apr 2008 15:01:11 GMT
> From: Dave Pawson [mailto:dave.pawson@gmail.com] 
> Sent: Friday, April 11, 2008 7:35 AM
> To: Ant Users List
> Subject: Re: arg and jvmarg
> 
> On 11/04/2008, Rick Genter <rgenter@silverlink.com> wrote:
> > > From: Dave Pawson [mailto:dave.pawson@gmail.com]
> >  > Sent: Friday, April 11, 2008 1:02 AM
> >  > To: Ant Users List
> >  > Subject: Re: arg and jvmarg
> >
> > >
> >  > Thanks Joe. I can see the logic, although 'line=' seems to
> >  > make more sense from
> >  > a user view? "-o filename"
> >
> >
> > 'line=' doesn't work if any of your arguments contain spaces, since
> >  internally 'line=' breaks the arguments on whitespace boundaries.
> 
> I seem to have found just the opposite?
> line="-o filename" works fine, but as was pointed out,
> if I want to use value I have to use two arg elements?

Your example has 2 arguments: '-o' and 'filename'. I recommend reading
the documentation for the command line processor you are using for how
it processes command lines and what the definition of an 'argument' is.

'line=' won't work if your filename has an embedded space. 'line=' does
simple parsing, splitting the arguments on space boundaries. 'line=-o
C:\Documents and Settings\user\My Documents\filename.out' generates 5
arguments:

-o
C:\Documents
and
Settings\user\My
Doucments\filename.out

which is almost certainly *NOT* what was wanted.

'value=' explicitly specifies exactly one argument. Specifying

<arg value="-o"/>
<arg value="C:\Documents and Settings\user\My Documents\filename.out"/>

will behave as expected.
--
Rick Genter
Principal Software Engineer
Silverlink Communications
rgenter@silverlink.com
www.silverlink.com

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


Mime
View raw message