ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: Exclude a single build.xml from a fileset of build.xmls
Date Mon, 01 Sep 2008 04:52:08 GMT
The include and exclude values in <fileset> are relative to its dir-attribute. That means
that an <fileset dir="foo" excludes="foo/bar"/> wouldnt work whereas <... ="bar"/>
Have you tried your exclude without the ${basedir} ?


Von: Patrick Aikens []
Gesendet: Fr 29.08.2008 20:27
An: Ant Users List
Betreff: Exclude a single build.xml from a fileset of build.xmls

I have a folder structure similar to the following:

Hopefully this won't get too convoluted...
I want to execute a target (for this example, assume "clean") in a
build.xml inside ${basedir}/build which calls targets of the same name
in a list of build.xml files inside a "build" subfolder of each
subproject.  In order to not enter a recursive build cycle, I need to
exclude the build.xml in ${basedir}/build from the subant fileset
(since that's the build.xml that's kicking all this off in the first
place).  The one hiccup is that it need to be independent of the name
and count of folders at the "project" level.

I've tried several ways to do this exclusion, but none seem to work.
One example:
Note: the ${basedir} used below is the parent of the topmost build
subfolder, as noted in the list above.
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="subant" default="subant1" basedir="..">
    <target name="subant1">
        <subant target="clean">
            <property name="" value="${basedir}/build"/>
            <fileset dir="${basedir}" includes="**/build.xml"

SELECT * FROM users WHERE clue > 0

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

View raw message