Making paths in Ant script relative

I am creating Ant xml file while generating the runnable jar of plugin. As it is having all absolute path I want to make it relative. Because I want to add creation of jar as hudson job and automate it.

I am new to Ant scripting. So could anyone help me out. Few lines in the files look like below.

<Target>   
<zipfileset excludes="META-INF/*.SF" src="D:/00Tools/Catch_Plus_1.10.0/eclipse/plugins/org.eclipse.core.contenttype_3.4.100.v20110423-0524.jar"/>
        <zipfileset excludes="META-INF/*.SF" src="D:/00Tools/Tools_1.10.0/eclipse/plugins/org.eclipse.equinox.app_1.3.100.v20110321.jar"/>
        <fileset dir="D:/casdev/ffm-mks1/sw-tools-development/tools/plugins/com.xyz.tools.support/bin"/>
        <fileset dir="D:/casdev/ffm-mks1/sw-tools-development/tools/plugins/com.xyz.tools.extlib/bin"/>
        <zipfileset excludes="META-INF/*.SF" src="D:/casdev/ffm-mks1/sw-tools-development/tools/plugins/com.xyz.tools.extlib/core/dbloggerclient.jar"/>

</Target>

I want this to be relative to my hudson job.

Answers


Set the optional ${basedir} property of the project element and put your paths in relative to the basedir. Besides, use to check the properties.


Need Your Help

Setup project with managed custom actions. Big heck of a headache

wix windows-installer installshield setup-project orca

I'm trying to create a setup project and I can't believe how painful it could be. Non of the tools that I've tried to use, haven't satisfy me.