You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Todd McGrath <to...@yahoo.com> on 2000/07/06 17:52:18 UTC
quotes in Exec task
Hi,
I using an exec task and having problems with quotes.
I need to run this command: ss get "$/Gen II/JSP/" -R
-W
So, in my build.xml I have the following:
<exec dir="${web}" command="ss get \"$/Gen II/JSP/\"
-R -W" output="sslog.txt" />
See how I need the quotes around the $/Gen II/JSP/.
I'm getting this error:
BUILD CONFIG ERROR
Whitespace required before attributes.
build.xml:56: Whitespace required before attributes.
Exception in thread "main" build.xml:56: Whitespace
require before attributes.
at
org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:112)
at org.apache.tools.ant.Main.runBuild(Main.java,
Compiled Code)
at org.apache.tools.ant.Main.main(Main.java:106)
Any ideas?
Todd
__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/
Re: quotes in Exec task
Posted by Fergus Gallagher <Fe...@OrbisUK.com>.
XML allows double or single quote as attribute delimiters, so you can use
command='ss get "$/Gen II/JSP/" -R -W'
or (probably)
command="ss get '$/Gen II/JSP/' -R -W"
At 08:52 06/07/00 -0700, you wrote:
>Hi,
>
>I using an exec task and having problems with quotes.
>I need to run this command: ss get "$/Gen II/JSP/" -R
>-W
>
>So, in my build.xml I have the following:
>
><exec dir="${web}" command="ss get \"$/Gen II/JSP/\"
>-R -W" output="sslog.txt" />
>
>See how I need the quotes around the $/Gen II/JSP/.
>
>I'm getting this error:
>
>BUILD CONFIG ERROR
>
>Whitespace required before attributes.
>build.xml:56: Whitespace required before attributes.
>Exception in thread "main" build.xml:56: Whitespace
>require before attributes.
> at
>org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:112)
> at org.apache.tools.ant.Main.runBuild(Main.java,
>Compiled Code)
> at org.apache.tools.ant.Main.main(Main.java:106)
>
>
>Any ideas?
>
>Todd
>
>
>
>__________________________________________________
>Do You Yahoo!?
>Send instant messages & get email alerts with Yahoo! Messenger.
>http://im.yahoo.com/
--
Fergus Gallagher
Orbis
http://www.orbisuk.com/
+44-(0)20-8987 0717
RE: quotes in Exec task
Posted by Conor MacNeill <co...@m64.com>.
Todd,
Since the build file is XML, try using " rather than the \". I think
that will work. Also you may need to double up the $ character.
Conor
--
Conor MacNeill
Home: conor@m64.com
Work: conor@cortexebusiness.com.au
Web: www.cortexebusiness.com.au
> -----Original Message-----
> From: Todd McGrath [mailto:toddmcgrath@yahoo.com]
> Sent: Friday, 7 July 2000 1:52
> To: ant-dev@jakarta.apache.org
> Subject: quotes in Exec task
>
>
> Hi,
>
> I using an exec task and having problems with quotes.
> I need to run this command: ss get "$/Gen II/JSP/" -R
> -W
>
> So, in my build.xml I have the following:
>
> <exec dir="${web}" command="ss get \"$/Gen II/JSP/\"
> -R -W" output="sslog.txt" />
>
> See how I need the quotes around the $/Gen II/JSP/.
>
> I'm getting this error:
>
> BUILD CONFIG ERROR
>
> Whitespace required before attributes.
> build.xml:56: Whitespace required before attributes.
> Exception in thread "main" build.xml:56: Whitespace
> require before attributes.
> at
> org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:112)
> at org.apache.tools.ant.Main.runBuild(Main.java,
> Compiled Code)
> at org.apache.tools.ant.Main.main(Main.java:106)
>
>
> Any ideas?
>
> Todd
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Send instant messages & get email alerts with Yahoo! Messenger.
> http://im.yahoo.com/
>