cziegeler 01/11/22 03:14:19 Modified: . build.xml Log: Added binary distribution Revision Changes Path 1.96 +109 -3 xml-cocoon2/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/build.xml,v retrieving revision 1.95 retrieving revision 1.96 diff -u -r1.95 -r1.96 --- build.xml 2001/11/22 09:22:00 1.95 +++ build.xml 2001/11/22 11:14:19 1.96 @@ -8,6 +8,7 @@ by Stefano Mazzocchi <[EMAIL PROTECTED]> + Carsten Ziegeler <[EMAIL PROTECTED]> Installing the build tools @@ -1066,7 +1067,7 @@ <!-- =================================================================== --> <!-- Creates the source distribution --> <!-- =================================================================== --> - <target name="dist-src" depends="package, webapp, docs, javadocs" + <target name="dist-src" depends="docs, javadocs" description="Prepares the source distribution"> <!-- Simply copy all and add the html docs --> <mkdir dir="${dist.root}"/> @@ -1167,6 +1168,81 @@ </target> <!-- =================================================================== --> + <!-- Creates the source distribution --> + <!-- =================================================================== --> + <target name="dist-bin" depends="package, webapp, docs, javadocs" + description="Prepares the binary distribution"> + <!-- Copy webapp and the html docs --> + <mkdir dir="${dist.root}"/> + <mkdir dir="${dist.bin.dir}"/> + <mkdir dir="${dist.bin.dir}/webapp"/> + <mkdir dir="${dist.bin.dir}/docs"/> + <mkdir dir="${dist.bin.dir}/docs/apidocs"/> + + <copy todir="${dist.bin.dir}/webapp"> + <fileset dir="${build.war}"/> + </copy> + + <!-- Fix for web.xml, cocoon.xconf and sitemap.xmap --> + <copy file="${webapp.dir}/cocoon.xconf" tofile="${dist.bin.dir}/webapp/cocoon.xconf" filtering="off" overwrite="yes"/> + <copy file="${webapp.dir}/sitemap.xmap" tofile="${dist.bin.dir}/webapp/sitemap.xmap" filtering="off" overwrite="yes"/> + <copy file="${webapp.dir}/WEB-INF/web.xml" tofile="${dist.bin.dir}/webapp/WEB-INF/web.xml" filtering="off" overwrite="yes"/> + + <!-- And now the jars --> + <copy todir="${dist.bin.dir}/webapp/WEB-INF/lib"> + <fileset dir="${lib.dir}"/> + </copy> + <copy file="${build.dir}/${name}.jar" tofile="${dist.bin.dir}/webapp/WEB-INF/lib/${name}-${version}.jar"/> + + <copy todir="${dist.bin.dir}/docs"> + <fileset dir="${build.docs}"/> + </copy> + <copy todir="${dist.bin.dir}/docs/apidocs"> + <fileset dir="${build.javadocs}"/> + </copy> + + <copy todir="${dist.bin.dir}"> + <fileset dir="${docs.dir}"> + <include name="changes.xml, todo.xml"/> + </fileset> + </copy> + + <copy todir="${dist.bin.dir}" filtering="on"> + <fileset dir="."> + <include name="README"/> + <include name="LICENSE*"/> + <include name="INSTALL"/> + <include name="WARNING"/> + <include name="KEYS"/> + </fileset> + </copy> + + <!-- Build the war file --> + <jar jarfile="${dist.bin.dir}/${name}.war" basedir="${dist.bin.dir}/webapp" includes="**"/> + </target> + + <!-- =================================================================== --> + <!-- Packages the binary distribution as .zip --> + <!-- =================================================================== --> + <target name="dist-bin-zip" depends="dist-bin" + description="* Generates the binary distribution as a .zip file"> + <zip zipfile="${dist.target}/${dist.name}-bin.zip" + basedir="${dist.root}/bin"/> + </target> + + <!-- =================================================================== --> + <!-- Packages the binary distribution with .tar.gzip --> + <!-- =================================================================== --> + <target name="dist-bin-tgz" depends="dist-bin" + description="* Generates the binary distribution as a .tar.gz file"> + <tar tarfile="${dist.target}/${dist.name}-bin.tar" + basedir="${dist.root}/bin" + longfile="gnu"/> + <gzip zipfile="${dist.target}/${dist.name}-bin.tar.gz" + src="${dist.target}/${dist.name}-bin.tar"/> + </target> + + <!-- =================================================================== --> <!-- Creates the distribution --> <!-- =================================================================== --> <target name="dist" depends="package, webapp, docs, javadocs" description="Prepares the distribution"> @@ -1252,7 +1328,7 @@ <!-- =================================================================== --> <target name="dist-zip" depends="dist" description="* Generates the distribution as a .zip file"> <zip zipfile="${dist.target}/${dist.name}.zip" - basedir="${dist.target}" + basedir="${dist.root}" includes="${dist.name}/**"/> </target> @@ -1261,7 +1337,7 @@ <!-- =================================================================== --> <target name="dist-tgz" depends="dist" description="* Generates the distribution as a .tar.gz file"> <tar tarfile="${dist.target}/${dist.name}.tar" - basedir="${dist.target}" + basedir="${dist.root}" includes="${dist.name}/**" longfile="gnu"/> <gzip zipfile="${dist.target}/${dist.name}.tar.gz" @@ -1269,6 +1345,30 @@ </target> <!-- =================================================================== --> + <!-- Build all distributions --> + <!-- =================================================================== --> + <target name="dists-info" depends="init"> + <echo>**********************************************</echo> + <echo>*</echo> + <echo>* Build all distributions:</echo> + <echo>* - source distribution for windows/unix.</echo> + <echo>* - binary distribution for windows/unix.</echo> + <echo>*</echo> + <echo>* This may take a while...</echo> + <echo>*</echo> + <echo>***********************************************</echo> + <echo/> + </target> + + <!-- =================================================================== --> + <!-- Build all distributions --> + <!-- =================================================================== --> + <target name="dists" + depends="dists-info, dist-bin-tgz, dist-bin-zip, dist-src-tgz, dist-src-zip" + description="* Generates all distributions (source/binary)"> + </target> + + <!-- =================================================================== --> <!-- Clean targets --> <!-- =================================================================== --> <target name="clean" depends="init" description="* Cleans the build directories"> @@ -1280,6 +1380,12 @@ <delete file="${dist.target}/${Name}-${version}.tar.gz"/> <delete file="${dist.target}/${Name}-${version}.tar"/> <delete file="${dist.target}/${Name}-${version}.zip"/> + <delete file="${dist.target}/${Name}-${version}-src.tar.gz"/> + <delete file="${dist.target}/${Name}-${version}-src.tar"/> + <delete file="${dist.target}/${Name}-${version}-src.zip"/> + <delete file="${dist.target}/${Name}-${version}-bin.tar.gz"/> + <delete file="${dist.target}/${Name}-${version}-bin.tar"/> + <delete file="${dist.target}/${Name}-${version}-bin.zip"/> <delete dir="${dist.root}"/> </target>
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]