I am trying to set up a target that will compile the directory I ran ant
from along with any subdirectories. For instance if c:\dev is in my
classpath and I am in the c:\dev\foo directory, I want to compile all of
the .java files in foo and all of it's subdirectories.
<target name="compile">
<property name="src" value="${user.dir}"/>
<!-- ${dev_dir} is set up on the command line. It will be c:\dev in this
example.
<property name="build" value="${dev_dir}"/>
<javac srcdir="${src}" destdir="${build}"/>
</target>
This works, but it always compiles ALL of the files instead of just the
ones that changed.
The ant documentation for the javac task states:
Note: If you wish to compile only source-files located in some packages
below a common root you should not include these packages in the
srcdir-attribute. Use include/exclude-attributes or elements to filter for
these packages. If you include part of your package-structure inside the
srcdir-attribute (or nested src-elements) Ant will start to recompile your
sources every time you call it.
but, I can't seem to figure out what the documentation is talking about.
Can someone please point me in the right direction?
Thanks,
Phil
Using ant 1.4.1 and jdk 1.3.0
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>