I am making a war of a project but i want that classes within that war be picked from specified location and also a jar file A.jar to be picked from custom location i am doing something like this ….
<target name="war" depends="a-jar">
<war destfile="D:/JBOSSHOME/project.war" webxml="${project-location}/web/WEB-INF/web.xml">
<fileset dir="${project-location}/web" >
<exclude name="${project-location}/web/WEB-INF/lib/A.jar"/>
<exclude name="${project-location}/web/WEB-INF/classes/**/*.class"/>
</fileset>
<lib dir="${jarsLocation}"></lib>
<classes dir="D:/JBOSSHOME/project/build/classes"/>
</war>
</target>
but in the resultant war i am getting 2 A.jar files and also classes are getting copied from ${project-location}/web/WEB-INF/classes instead of the classes dir that i have provided…
Any help would be much appreciated…
The exclude shouldn’t include the root directory of your file set: