There are many questions on this topic but none of the answers are solving my problem. Starting this thread again to get fresh input.
I tried two different approaches for excluding B-dir and all its contents under A-dir/subdir. But none work. FYI, a-dir is under dir.src 1)
<copy todir="${dir.classes}" excludes="A-dir/**/B-dir/**"> <fileset dir="${dir.src}" > <exclude name="**/*.java"/> </fileset> </copy>
2)
<copy todir="${dir.classes}"> <fileset dir="${dir.src}" > <exclude name="**/*.java"/> <exclude name="A-dir/**/B-dir/**"/> </fileset> </copy>
I tried deleting all old jars and do a clean compile like someone suggested. But that doesn't help either.
Description. Alters the default excludes for all subsequent processing in the build, and prints out the current default excludes if desired.
A FileSet is a group of files. These files can be found in a directory tree starting in a base directory and are matched by patterns taken from a number of PatternSets and Selectors. PatternSets can be specified as nested <patternset> elements.
A path element is one "thing." That think may be one file or a whole path. But it doesn't do wildcards like fileset does. This is explained fairly well in path like structures. reply. /build.xml:372: java.net.UnknownHostException: root +ant.
Ant uses an xml file for its configuration. The default file name is build. xml . Ant builds are based on three blocks: tasks, targets and extension points. A task is a unit of work which should be performed and constitutes of small atomic steps, for example compile source code or create Javadoc.
I think it should probably be:
<copy todir="${dir.classes}"> <fileset dir="${dir.src}" > <exclude name="**/*.java"/> <exclude name="**/A-dir/**/B-dir/**"/> </fileset> </copy>
Note the **/A-dir/**
instead of A-dir/**
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With