Here's a little experiment that reduces the problem to its simplest case. Suppose for argument's sake I'm not jarring any class files. Here's a passage that works: <fileset id="sub.resources.fileset.for.jar" dir="${main.java.dir}" * includes="**/*.java"* /> <jar destfile="${target.dir}/${jarArtifactName}.jar"> <fileset refid="sub.resources.fileset.for.jar" /> </jar>
But suppose I change just one small thing. From this: includes="**/*.java" To *this*: includes="**/*.xml" Suddenly now, the jar task collapses the directory structure. On Tue, Jan 20, 2009 at 3:25 PM, Mitch Gitman <mgit...@gmail.com> wrote: > I'm using a fileset as a nested element of the jar Ant task. When the > fileset consists of .class files or .java files, the archiving takes place > correctly: > * com > * mycompany > * myproject > * SomeClass.class > > But when the fileset consists of some other kind of file, like XML files or > properties files, the archiving collapses the directory structure: > * com.mycompany.myproject > * SomeProperties.properties > > Why is the jar task doing this collapsing and how do I avoid it? >