ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: how do I turn a path element into a property?
Date Wed, 14 Feb 2001 15:54:51 GMT
Jay Glanville <dickon@nortelnetworks.com> 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}" />
     </exec>


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}" />
     </exec>

Stefan

Mime
View raw message