You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Scott Goldstein <sd...@MailAndNews.com> on 2001/08/04 02:30:24 UTC
Dynamically Building Destination Directory
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."
------------------------------------------------------------