Danno said:
Do you know of a way of using FilterSets with the war, or jar task?
Yes you can specify a fileset. See these links:
http://ant.apache.org/manual/CoreTasks/jar.html or
http://ant.apache.org/manual/CoreTasks/war.html
However, typically I do a fresh ant build and then include everything
in the classes directory. In my make target I can fuss about which
classes and files to include and exclude. Here are my slightly edited
jar and make targets for another example apart from the ant manual.
<target name="jar" depends="init,clean,make">
<delete file="${jar.dir}/myjar.jar" />
<jar destfile="${jar.dir}/myjar.jar" basedir="./classes">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Main-Class" value="mypackage.MyMainClass"/>
<attribute name="Class-Path" value="." />
</manifest>
</jar>
</target>
<target name="make" depends="init">
<copy todir="${classes.dir}">
<fileset dir="${source.dir}">
<include name="**/*.properties" />
<include name="**/*.gif" />
<include name="**/*.jpg" />
<include name="**/*.png" />
<include name="**/*.txt" />
</fileset>
</copy>
<javac destdir="${classes.dir}" optimize="off" debug="on"
target="1.5" source="1.5">
<src path="${source.dir}" />
<exclude name="**/Test.java" />
<compilerarg line="-Xlint" />
</javac>
</target>
Cheers,
Dan Andrews
- - - - - - - - - - - - - - - - - - - - - - - -
Ansir Development Limited
www.ansir.ca
- - - - - - - - - - - - - - - - - - - - - - - -