ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Aikens" <paik...@gmail.com>
Subject Exclude a single build.xml from a fileset of build.xmls
Date Fri, 29 Aug 2008 18:27:36 GMT
I have a folder structure similar to the following:
${basedir}
|--build
|--project1
|------subproject1
|----------build
|------subproject2
|----------build
|------subproject3
|----------build
|--project2
|------subproject1
|----------build
|------subproject2
|----------build

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="root.build.dir" value="${basedir}/build"/>
	    <fileset dir="${basedir}" includes="**/build.xml"
excludes="${basedir}/build/**"/>
	</subant>
    </target>
</project>

-- 
SELECT * FROM users WHERE clue > 0

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


Mime
View raw message