I have a Java web application. I am deploying this as a war using ant file onto Tomcat server. I could successfully do that.Please find below build.xml Now the challenge is i have 100000 images in my application under web folder which gets copied to war root folder.
If i create a war with 100000 images in the root folder of war file, it would be big headache.
Every time i change anything in JSP or java code, new war again would copy those 100000 images in war folder which takes more then 1 hour to build the war file.
How can i make sure that my images folder in war not getting copied again and again with every deployment ?
<!-- setting classpath -->
<path id="base.class.path">
    <pathelement location="lib/joda-time-1.6.1.jar" />
    <pathelement location="lib/fedExTrackingWebService.jar" />
    ....
    .....
</path>
 <property file="build.properties"/>
    <path id="classpath">
        <fileset dir="${lib.dir}"/>
    </path>
    <target name="clean">
        <echo>Cleaning the ${build.dir}</echo>
        <delete dir="${build.dir}"/>
        <delete dir="${dist.dir}"/>
    </target>
    <target name="init" depends="clean">
        <echo>Creating the build directory</echo>
        <mkdir dir="${build.dir}/WEB-INF/classes"/>
        <mkdir dir="${build.dir}/WEB-INF/lib"/>
        <mkdir dir="${dist.dir}"/>
    </target>
    <target name="compile" depends="init">
        <echo>Compile the source files</echo>
        <javac srcdir="${src.dir}" destdir="${build.dir}/WEB-INF/classes">
            <classpath refid="base.class.path"/>                
        </javac>
    </target>
    <target name="copy" depends="compile">
        <copy todir="${build.dir}/WEB-INF">
            <fileset dir="${web.dir.webinf}/WEB-INF"/>
        </copy>
        <copy todir="${build.dir}">
            <fileset dir="${web.dir}"/>
        </copy>
        <copy todir="${build.dir}/WEB-INF/lib">
            <fileset dir="${lib.dir}">
                            </fileset>
        </copy>
    </target>
    <target name="war">
        <echo>Building the war file</echo>
        <war destfile="${dist.dir}/${ant.project.name}.war" webxml="${build.dir}/WEB-INF/web.xml">
            <fileset dir="${build.dir}"/>
        </war>
    </target>
    <target name="deploy_local" depends="war">
        <echo>Deploying .war to local Tomcat</echo>
        <copy todir="${tomcat.dir}/webapps">
            <fileset dir="${dist.dir}">
                <include name="${ant.project.name}.war"/>
            </fileset>
        </copy>
    </target> 
 
    