ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lybarger <mlybar...@gmail.com>
Subject Re: ordered fileset or selective filelist
Date Wed, 06 Jul 2005 12:59:57 GMT
I've got a macrodef, and am calling it as you mentioned, I just can't seem 
to figure out how to conditionally call the subant only if hte file 
exists...?

<macrodef name="subproject"> 
<attribute name="filename" default="NOT SET"/> 
<sequential>
<available file="@{filename}" property="file.found"/>
<subant>
<buildpath>
<pathelement location="@{filename}"/>
</buildpath>
</subant>
</sequential> 
</macrodef> 

<target name="default4">
<subproject filename="foo.xml"/>
<subproject filename="bar.xml"/>
<subproject filename="baz.xml"/>
</target>


On 7/5/05, Juergen Hermann <jh@web.de> wrote:
> 
> On Tue, 5 Jul 2005 10:29:34 -0400, Mark Lybarger wrote:
> ><subant>
> ><filelist dir=".">
> ><file name="foo.xml"/>
> ><file name="bar.xml"/>
> ><file name="baz.xml"/>
> ></filelist>
> ></subant>
> 
> use macrodef (define a <subproject> macro that conditionally calls 
> subant),
> and just list the macro calls in order.
> 
> 
> Ciao, J├╝rgen
> 
> 
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message