ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: how do I turn a path element into a property?
Date Wed, 14 Feb 2001 15:54:51 GMT
Jay Glanville <> wrote:

> and later on, in my task, I have the following external execute task
>     <exec executable="debugger">
>         <arg line="-classpath ${myclasspath}" />
>     </exec>
> Basically, I need to have ant replace ${myclasspath} with the value
> in the path reference "classpath".

First create a property with a value taken from your <path>

     <property name="myclasspath" refid="myclasspath" />
     <exec executable="debugger">
         <arg line="-classpath ${myclasspath}" />

Even better, let Ant translate that path to the correct system format
using the path attribute of arg:

     <property name="myclasspath" refid="myclasspath" />
     <exec executable="debugger">
         <arg value="-classpath" />
         <arg path="${myclasspath}" />


View raw message