ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Goldstein <sdgol...@MailAndNews.com>
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">
		        <patternset>
		            <include name="*~"/>
		            <include name="*~jav"/>
		            <include name="*.bak"/>
		            <include name="*.class"/>
		            <include name="#*"/>
		        </patternset>
	        </fileset>
	    </delete>
    </target>

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 
C:\Work\website\WEB-INF\classes.

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

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!

Scott

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


Mime
View raw message