ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Spaces in a command line arg
Date Tue, 25 Feb 2003 21:51:29 GMT
Just use value="" instead of line="", as Conor advised. This is the Ant
way... (whatever that means). --DD

-----Original Message-----
From: David Clements [] 
Sent: Tuesday, February 25, 2003 3:35 PM
To: 'Ant Users List'
Subject: RE: Spaces in a command line arg

I am using the exec task to launch InstallShiels Multiplatform.  The path in
${productImportDirectory} has a space in it.  Neither single or double
quotes worked.  However if I use a
combinatio of both single and double quotes things are working great.
<exec executable="${ISMPDirectory}\ismpc.exe" dir="${ISMPDirectory}" >
            <arg line='"${ISMPFile}"'/>
            <arg line ='-alias IS_PRD=${productImportDirectory}'/>
            <arg line ='-alias IS_INSTALLFILES="C:\vgdev\testing
            <arg line="-xsl"/>
            <arg line='"${basedir}\..\ismp\omitInactiveComponents.xsl"'/>
            <arg line="-build"/>

 [exec] Initializing InstallShield MultiPlatform 4.5...
 [exec] Searching for Java(tm) Virtual Machine...
 [exec] Verifying Jview 1.1.4 by Microsoft
 [exec] .
 [exec] Verifying Jview 1.1.4 by Microsoft
 [exec] ........Setting alias IS_PRD to C:\vgdev\testing
 [exec] illegal command line argument : tmp\current\NEWINSTALL\SiteScope\19\

 [exec] Running InstallShield MultiPlatform 4.5...

 [exec] Result: -3

Hope this helps,


> -----Original Message-----
> From: Conor MacNeill [] 
> Sent: Saturday, February 22, 2003 1:12 AM
> To: Ant Users List
> Subject: Re: Spaces in a command line arg
> David Clements wrote:
> > Is there a way to get ant to escape possible space in an 
> <arg> to and 
> > <exec> call?
> > 
> > 
> If you use the <arg value=""> approach with an entry per 
> argument, rather 
> than all arguments in the <arg line=""> style, it should 
> quote arguments 
> with spaces. If this doesn't work for you, please give us 
> more detils on how 
> it fails.
> Conor
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message