Link to home
Start Free TrialLog in
Avatar of pdidominic
pdidominic

asked on

how to include a folder in JAR file using ANT

Hi,

Here is the folder hierarchy of my project. I want to include the folder "res" into the JAR file with the class files. I've use
   
                      <fileset dir="res"></fileset>

 but it only include the contents of the folder "res" not the whole folder res into JAR file :(

<target name="make-jar" depends="compile" description="">
        <jar destfile="${jar.file}">
        	  <fileset dir="${bin.dir}" includes="**/*.class"></fileset>
	          <fileset dir="res"></fileset>
        </jar>
</target>

Open in new window

ant.png
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Simply moving the res folder under src might do the trick without even using Ant
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial