Author
noob to ant need help please
Tai Lo
Greenhorn
Joined: Aug 30, 2010
Posts: 2
if i want to step out of the base directory in XML, how would I do that.
ie. ( basedir = /users/local/src/tests/files but I want /users/local/src/tests/)
I've tried <sysproperty key="thisVal" value="${basedir}/../"/> but that seems to fail. Any ideas would be great. thanks.
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3206
Hi Tai and welcome to Javaranch!
Have you tried ../../{${basedir}
Cheers, Martijn - Blog , Twitter , PCGen , Ikasan , My The Well-Grounded Java Developer book!
Tai Lo
Greenhorn
Joined: Aug 30, 2010
Posts: 2
thanks martijn. This is what i get with your recommendation
<property name = "test" value="../../{${basedir}"/>
<echo message = "this is test #${mb.test}"/>
:this is test #../../{/Users/taiLo/cvs/check
In this case I want /Users/TaiLo/cvs ~ does echoing the variable return the actual value of that variable?
Thanks for your help
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3206
Oh sorry! Completely mis-read your original question, let me look up some ANT docs and see if I can find something for you.
Peter Johnson
author
Bartender
Joined: May 14, 2008
Posts: 4489
posted Aug 31, 2010 09:55:57
0
basedir = /users/local/src/tests/files but I want /users/local/src/tests/
Assuming that build.xml is in /users/local/src/tests/files, you should be able to do:
<property name = "tests.dir" value=".." />
JBoss In Action
subject: noob to ant need help please