You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by teknokrat <te...@yahoo.com> on 2007/08/17 10:42:40 UTC
how do I pass properties containing & chars
I am using ant 1.7. I need to pass urls as properties. Unfortunately
these have parameters in them i.e. -Dtest.url=http://x.y.z?a=b&c=d
ant barfs on these - is there any way this can be done
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: how do I pass properties containing & char
Posted by Peter Reilly <pe...@gmail.com>.
If you are using unix/linux, just quote the parameter:
>ant "-Dtest.url=http://x.y.z?a=b&c=d"
Buildfile: build.xml
y:
[echo] http://x.y.z?a=b&c=d
If you are using dos, it is probably impossible to get the stuff
though the quagmire that is cmd.
Use a property file: build.properties
test.url=http://x.y.z?a=b&c=d
Peter
It is probably the ant shell/or cmd script that is whining.
It would be difficult to get the shell script to pass everthing
through,
On 8/17/07, teknokrat <te...@yahoo.com> wrote:
> I am using ant 1.7. I need to pass urls as properties. Unfortunately
> these have parameters in them i.e. -Dtest.url=http://x.y.z?a=b&c=d
>
> ant barfs on these - is there any way this can be done
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: how do I pass properties containing & chars
Posted by Steve Loughran <st...@apache.org>.
teknokrat wrote:
> I am using ant 1.7. I need to pass urls as properties. Unfortunately
> these have parameters in them i.e. -Dtest.url=http://x.y.z?a=b&c=d
>
> ant barfs on these - is there any way this can be done
Not ant; your shell. escape them according to the specific rules of your
shell
--
Steve Loughran http://www.1060.org/blogxter/publish/5
Author: Ant in Action http://antbook.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org