ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Bullington <shockr...@yahoo.com>
Subject RE: A String property value
Date Fri, 24 Aug 2001 20:43:43 GMT
Bill,

I tried your test and received the following error:

C:\>ant -Darg1="boo hoo" show
hoo""=="" was unexpected at this time.

However, if I run with no spaces, there is no
problems.
C:\sptst>ant -Darg1="boohoo" show
Buildfile: build.xml

show:
     [echo] arg1 + boohoo
     [echo] space + c:/Program Files/
     [echo] file1 + i exist

BUILD SUCCESSFUL

Total time: 1 second

BTW,  I am using the exact same version of Java as
you.  Your script does give me the idea that I could
use a command file to write a date to a file, then
call ant.  Not the most elegant solution, but the
easiest for the client to tolarate.

Thanks,
Jim

--- Bill.J.Fellows@mail.sprint.com wrote:
> Hey Jim
> Do either of the last two solutions work for the 11
> May build?
> /bill
> 
>   <property name="space" value="c:/Program Files/"  
> />
>   <property file="myfile.txt" />
>   <target name="show" >
>      <echo message="arg1 + ${arg1} " />
>      <echo message="space + ${space}" />
>      <echo message="file1 + ${file1}" />
>   </target>
> 
> C:\>cat myfile.txt
> file1=i exist
> 
> C:\>ant -Darg1="boo hoo" show
> Buildfile: build.xml
> 
> show:
>      [echo] arg1 + boo hoo
>      [echo] space + c:/Program Files/
>      [echo] file1 + i exist
> 
> BUILD SUCCESSFUL
> 
> Total time: 1 second
> 
> C:\>ant -version
> Ant version 1.3 compiled on August 5 2001
> 
> C:\>java -version
> java version "1.3.1"
> Java(TM) 2 Runtime Environment, Standard Edition
> (build 1.3.1-b24)
> Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed
> mode)
> 
> 
> -----Original Message-----
> From: shockride [mailto:shockride@yahoo.com]
> Sent: Friday, August 24, 2001 2:14 PM
> To: ant-user
> Cc: shockride
> Subject: A String property value
> 
> 
> I am looking for any way to add a string with spaces
> to a property.  The only solution that I can think
> of
> at this moment is to write an ant task that does
> some
> wierd conversion.  This, obviously, is not what I
> want
> to tell my client.
> 
> To refresh... Ant 1.3 (March 2, 2001) will allow
> spaces if you quote them.
> ex.  -Dlastdate="August 24, 2001"
> 
> Ant 1.3 (May 11, 2001) which happens to be included
> with Weblogic 6.1 will not work (with or without
> quotes).
> 
> Has anyone been able to input spaces, somehow???
> 
> --Jim
> 


=====
Support anti-Spam legislation.
Join the fight http://www.cauce.org/

__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

Mime
View raw message