ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bo Rasmussen" <krogenl...@hotmail.com>
Subject subant and empty filelist
Date Fri, 07 Nov 2003 12:58:54 GMT
Hi,

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 ?

Regards
-Bo




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message