ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Goldstein <>
Subject Dynamically Building Destination Directory
Date Sat, 04 Aug 2001 00:30:24 GMT
I have a build file in each subdirectory of my project so that I can build 
individual subdirectories.

In the build files, I have the following target.

    <target name="clean" depends="init">
        <delete verbose="true">
	        <fileset dir="${destDir}" defaultexcludes="no">
		            <include name="*~"/>
		            <include name="*~jav"/>
		            <include name="*.bak"/>
		            <include name="*.class"/>
		            <include name="#*"/>

This was very simple when my src directory tree was the same as my class 
directory tree.  However, that has now changed.

Suppose my sources are in the directory C:\Work\src and my classes are in 

So, if I was running the clean target in directory 
C:\Work\src\com\company\foo, I would want to delete the classes in 

Is there a way to build this destination directory dynamically from the source 
directory?  In other words, how can I go from C:\Work\src\com\company\foo to 
C:\Work\website\WEB-INF\classes\com\company\foo using XML.

Thanks for the help!


"Just a mirror for the sun...
 My smiling eyes are just a mirror for the sun."

View raw message