Properly build WAR and install $IDP_HOME
[java-idp.git] / build.xml
index 3a83aa2..9cb2855 100755 (executable)
--- a/build.xml
+++ b/build.xml
 \r
        <!-- Removes previously compiled files -->\r
        <target name="clean-compile">\r
-               <delete dir="${build.dir}" />\r
+               <delete dir="${build.dir}" />
+               <delete dir="${dist.dir}" />\r
        </target>\r
 \r
        <!-- Removes all build generated content -->\r
 
                <jar destfile="${dist.dir}/${jar.name}" whenempty="fail">
                        <fileset dir="${classpathres.dir}" />
-                       <fileset dir="${metainf.dir}" />
+                       <zipfileset dir="${metainf.dir}" prefix="META-INF/"/>
                        <zipfileset dir="${core-classes.dir}" />
                </jar>
 
                        </filterset>
                </copy>
 \r
-               <jar destfile="${dist.dir}/${war.name}" whenempty="fail">\r
-                       <fileset dir="${classpathres.dir}" />
-                       <fileset dir="${metainf.dir}" />
-                       <fileset dir="${webinf-temp.dir}" />
-                       <fileset dir="${webpages.dir}" />
-                       <zipfileset dir="${lib.dir}" prefix="/WEB-INF/lib/" />
-                       <zipfileset file="${dist.dir}/${jar.name}" prefix="/WEB-INF/lib/" />\r
+               <jar destfile="${dist.dir}/${war.name}" whenempty="fail">
+                       <zipfileset dir="${classpathres.dir}" prefix="WEB-INF/classes/" />
+                       <zipfileset dir="${webinf-temp.dir}" prefix="WEB-INF/" />
+                       <zipfileset dir="${webpages.dir}" prefix="" />
+                       <zipfileset dir="${lib.dir}" prefix="WEB-INF/lib/" />
+                       <zipfileset file="${dist.dir}/${jar.name}" prefix="WEB-INF/lib/" />\r
                </jar>\r
 \r
        </target>