ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: subant and empty filelist
Date Fri, 07 Nov 2003 21:03:48 GMT
> From: Bo Rasmussen []
> I'm trying to use import and subant to create a common set of targets
> in a common.xml file.
> In the common.xml file I have an empty fileset definition
> <fileset id="dependent_projects"/>
> and a common build target, that builds all dependent projects (as
> defined int the fileset dependent_projects
> <target name="build" depends="make dirs" description= "Build project">
>    <subant target="build" failonerror="no">
>       <filelist refid="dependent_projects"/>
>    </subant>
>    <antcall target="localbuild"/>
> </target>
> In addition to that I have a localbuild target which performs (tada)
> the build for the current project only.
> The idea is then to let build.xml import this common.xml. If they
> depend on other projects they override the dependent_projects
> fileset.
> The problem is that for lowest level project that don't depend on
> other projects the dependent_projects is not redefined. When run it
> gives an ANT error
>    [subant] No directory specified for filelist.
> which is actually true - but not what I want! In my head it simply
> means don't run any subant targets.
> I've tried to set the failonerror to no - but this doesn't always
> seem to work. Furthermore I would like to avoid the error message.
> Am I doing something wrong ?

I personally think <filelist> stinks ;-)

How about you use a <path> instead of a <filelist>. <subant> works great
with Paths (it was what it was designed to work with in the first place),
*and* a <path> can be empty!

<path id="dependent_projects" />

  <path refid="dependent_projects" />


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message