vgritsenko 2002/06/11 13:24:13
Modified: . Tag: cocoon_2_0_3_branch build.xml
Log:
Backport some changes from the head (comments, local lib dir)
Revision Changes Path
No revision
No revision
1.196.2.5 +123 -84 xml-cocoon2/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/build.xml,v
retrieving revision 1.196.2.4
retrieving revision 1.196.2.5
diff -u -r1.196.2.4 -r1.196.2.5
--- build.xml 9 Jun 2002 12:47:47 -0000 1.196.2.4
+++ build.xml 11 Jun 2002 20:24:12 -0000 1.196.2.5
@@ -123,6 +123,9 @@
<!-- Indentify Classpath -->
<!-- =================================================================== -->
<path id="classpath">
+ <fileset dir="./lib/local">
+ <include name="*.jar"/>
+ </fileset>
<fileset dir="./lib/core">
<include name="*.jar"/>
</fileset>
@@ -132,6 +135,9 @@
</path>
<path id="anttasks.classpath">
+ <fileset dir="./lib/local">
+ <include name="*.jar"/>
+ </fileset>
<fileset dir="./lib/core">
<include name="*.jar"/>
</fileset>
@@ -144,6 +150,9 @@
</path>
<path id="scratchpad.classpath">
+ <fileset dir="./lib/local">
+ <include name="*.jar"/>
+ </fileset>
<fileset dir="./lib/core">
<include name="*.jar"/>
</fileset>
@@ -270,7 +279,7 @@
<!-- =================================================================== -->
<!-- Try other builds that could go into this core build -->
<!-- =================================================================== -->
- <target name="try" depends="init" description="Builds to try before including in
main build">
+ <target name="try" depends="init">
<ant target="${try.task}" antfile="build-t.xml"/>
</target>
@@ -278,7 +287,7 @@
<!-- Installs Cocoon war file in a specified directory -->
<!-- =================================================================== -->
<target name="installwar" depends="init"
- description="* Installs the war package in a specified directory">
+ description="Installs the WAR package (without the scratchpad) in a
specified directory">
<taskdef name="user-input" classname="UserInputTask"
classpath="./tools/anttasks"/>
<property name="include.webapp.libs" value="true"/>
@@ -292,7 +301,7 @@
<!-- Installs Cocoon war with scratchpad stuff in a specified directory -->
<!-- =================================================================== -->
<target name="installscratchpadwar" depends="init"
- description="* Installs the war package in a specified directory">
+ description="Installs the WAR package (with the scratchpad) in a
specified directory">
<echo message=" This contains SCRATCHPAD BUILDS. It is not guaranteed to
work."/>
<echo message=" You have been warned. "/>
@@ -318,8 +327,7 @@
<!-- =================================================================== -->
<!-- Test for optional components -->
<!-- =================================================================== -->
- <target name="optional-tests" depends="init"
- description="Tests for optional classes missing to the environment">
+ <target name="optional-tests" depends="init">
<!-- A simple task to test for a class -->
<taskdef name="class-available" classname="ClassAvailableTask"
@@ -483,7 +491,7 @@
<!-- =================================================================== -->
<!-- Macro for optional warnings -->
<!-- =================================================================== -->
- <target name="op-warning" description="General waring target (used by other
targets)" unless="omit.opt.warnings">
+ <target name="op-warning" unless="omit.opt.warnings">
<echo>**********************************************</echo>
<echo>*</echo>
<echo>* Classes of the optional package ${thing} are not </echo>
@@ -500,18 +508,20 @@
<!-- =================================================================== -->
<!-- Warnings -->
<!-- =================================================================== -->
- <target name="bsf-warn" unless="bsf.present" depends="optional-tests"
- description="Outputs a warning if com.ibm.bsf.* classes are missing during
compilation">
+
+ <!-- Outputs a warning if com.ibm.bsf.* classes are missing during compilation -->
+ <target name="bsf-warn" unless="bsf.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="BSF"/>
<param name="recovery"
value="Get the BSF package from
http://oss.software.ibm.com/developerworks/projects/bsf/ and place the jar in the
lib/optional dir"/>
- <param name="message"
+ <param name="message"
value="BSF is required for the script action."/>
</antcall>
</target>
- <target name="rhino-warn" unless="rhino.interpreter.present"
depends="optional-tests"
- description="Outputs a warning if org.mozilla.javascript.* classes are
missing during compilation">
+
+ <!-- Outputs a warning if org.mozilla.javascript.* classes are missing during
compilation -->
+ <target name="rhino-warn" unless="rhino.interpreter.present"
depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="Rhino"/>
<param name="recovery"
@@ -519,9 +529,10 @@
<param name="message"
value="Rhino is required for the scripts and XSP in Javascript."/>
</antcall>
- </target>
- <target name="python-warn" unless="python.present" depends="optional-tests"
- description="Outputs a warning if org.python.* classes are missing during
compilation">
+ </target>
+
+ <!-- Outputs a warning if org.python.* classes are missing during compilation -->
+ <target name="python-warn" unless="python.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="jython"/>
<param name="recovery"
@@ -529,9 +540,10 @@
<param name="message"
value="Jython is required for the scripts in Python."/>
</antcall>
- </target>
- <target name="jfor-warn" unless="jfor.present" depends="optional-tests"
- description="Outputs a warning if org.jfor.jfor.* classes are missing during
compilation">
+ </target>
+
+ <!-- Outputs a warning if org.jfor.jfor.* classes are missing during compilation
-->
+ <target name="jfor-warn" unless="jfor.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="JFOR"/>
<param name="recovery"
@@ -539,9 +551,10 @@
<param name="message"
value="JFOR is required for the fo2rtf serializer."/>
</antcall>
- </target>
- <target name="xmldb-warn" unless="xmldb.present" depends="optional-tests"
- description="Outputs a warning if org.xmldb.api.* classes are missing during
compilation">
+ </target>
+
+ <!-- Outputs a warning if org.xmldb.api.* classes are missing during compilation
-->
+ <target name="xmldb-warn" unless="xmldb.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="XMLDB"/>
<param name="recovery"
@@ -550,8 +563,9 @@
value="XMLDB is required for the xmldb and xmldbcollection
generator."/>
</antcall>
</target>
- <target name="xt-warn" unless="xt.present" depends="optional-tests"
- description="Outputs a warning if com.jclark.xsl.* classes are missing during
compilation">
+
+ <!-- Outputs a warning if com.jclark.xsl.* classes are missing during compilation
-->
+ <target name="xt-warn" unless="xt.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="XT"/>
<param name="recovery"
@@ -560,8 +574,9 @@
value="XT is required for the xt transformer."/>
</antcall>
</target>
- <target name="php-warn" unless="php.present" depends="optional-tests"
- description="Outputs a warning if net.php.* classes are missing during
compilation">
+
+ <!-- Outputs a warning if net.php.* classes are missing during compilation -->
+ <target name="php-warn" unless="php.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="PHP"/>
<param name="recovery"
@@ -569,9 +584,10 @@
<param name="message"
value="PHP is required for the php generator."/>
</antcall>
- </target>
- <target name="naming-warn" unless="naming.present" depends="optional-tests"
- description="Outputs a warning if javax.naming.* classes are missing during
compilation">
+ </target>
+
+ <!-- Outputs a warning if javax.naming.* classes are missing during compilation
-->
+ <target name="naming-warn" unless="naming.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="JNDI"/>
<param name="recovery"
@@ -579,9 +595,10 @@
<param name="message"
value="JNDI is required for the ldap generator and the parentcm
generator."/>
</antcall>
- </target>
- <target name="svg-warn" unless="svg.present" depends="optional-tests"
- description="Outputs a warning if org.apache.batik.* classes are missing
during compilation">
+ </target>
+
+ <!-- Outputs a warning if org.apache.batik.* classes are missing during
compilation -->
+ <target name="svg-warn" unless="svg.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="Batik"/>
<param name="recovery"
@@ -589,9 +606,10 @@
<param name="message"
value="Batik is required for the svg serializers."/>
</antcall>
- </target>
- <target name="fop-warn" unless="fop.present" depends="optional-tests"
- description="Outputs a warning if org.apache.fop.* classes are missing during
compilation">
+ </target>
+
+ <!-- Outputs a warning if org.apache.fop.* classes are missing during compilation
-->
+ <target name="fop-warn" unless="fop.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="FOP"/>
<param name="recovery"
@@ -599,9 +617,10 @@
<param name="message"
value="FOP is required for the fo2pdf, fo2ps and fo2pcl serializer."/>
</antcall>
- </target>
- <target name="tidy-warn" unless="tidy.present" depends="optional-tests"
- description="Outputs a warning if org.w3c.tidy.* classes are missing during
compilation">
+ </target>
+
+ <!-- Outputs a warning if org.w3c.tidy.* classes are missing during compilation
-->
+ <target name="tidy-warn" unless="tidy.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="JTidy"/>
<param name="recovery"
@@ -609,9 +628,10 @@
<param name="message"
value="JTidy is required for the html generator."/>
</antcall>
- </target>
- <target name="maybeupload-warn" unless="maybeupload.present"
depends="optional-tests"
- description="Outputs a warning if uk.co.weft.maybeupload.* classes are
missing during compilation">
+ </target>
+
+ <!-- Outputs a warning if uk.co.weft.maybeupload.* classes are missing during
compilation -->
+ <target name="maybeupload-warn" unless="maybeupload.present"
depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="MaybeUpload"/>
<param name="recovery"
@@ -619,9 +639,10 @@
<param name="message"
value="MaybeUpload simplifies the handling of uploaded files."/>
</antcall>
- </target>
- <target name="lucene-warn" unless="lucene.present" depends="optional-tests"
- description="Outputs a warning if org.apache.lucene.* classes are missing
during compilation">
+ </target>
+
+ <!-- Outputs a warning if org.apache.lucene.* classes are missing during
compilation -->
+ <target name="lucene-warn" unless="lucene.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="Lucene"/>
<param name="recovery"
@@ -630,8 +651,9 @@
value="Lucene is required for the Cocoon searches."/>
</antcall>
</target>
- <target name="deli-warn" unless="deli.present" depends="optional-tests"
- description="Outputs a warning if com.hp.hpl.deli.* classes are missing
during compilation">
+
+ <!-- Outputs a warning if com.hp.hpl.deli.* classes are missing during
compilation -->
+ <target name="deli-warn" unless="deli.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="Deli"/>
<param name="recovery"
@@ -640,8 +662,9 @@
value="Deli is required for ..."/>
</antcall>
</target>
- <target name="velocity-warn" unless="velocity.present" depends="optional-tests"
- description="Outputs a warning if org.apache.velocity.* classes are missing
during compilation">
+
+ <!-- Outputs a warning if org.apache.velocity.* classes are missing during
compilation -->
+ <target name="velocity-warn" unless="velocity.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="Velocity"/>
<param name="recovery"
@@ -650,8 +673,9 @@
value="Velocity is required for the velocity generator."/>
</antcall>
</target>
- <target name="hsqldb-warn" unless="hsqldb.present" depends="optional-tests"
- description="Outputs a warning if org.hsqldb.* classes are missing during
compilation">
+
+ <!-- Outputs a warning if org.hsqldb.* classes are missing during compilation -->
+ <target name="hsqldb-warn" unless="hsqldb.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="hsqldb"/>
<param name="recovery"
@@ -660,8 +684,9 @@
value="hsqldb is required for the sql examples."/>
</antcall>
</target>
- <target name="resolver-warn" unless="resolver.present" depends="optional-tests"
- description="Outputs a warning if org.apache.xml.resolver.* classes are
missing during compilation">
+
+ <!-- Outputs a warning if org.apache.xml.resolver.* classes are missing during
compilation -->
+ <target name="resolver-warn" unless="resolver.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="Resolver"/>
<param name="recovery"
@@ -670,8 +695,9 @@
value="The resolver allows entity resolving."/>
</antcall>
</target>
- <target name="jisp-warn" unless="jisp.present" depends="optional-tests"
- description="Outputs a warning if com.coyotegulch.jisp.* classes are missing
during compilation">
+
+ <!-- Outputs a warning if com.coyotegulch.jisp.* classes are missing during
compilation -->
+ <target name="jisp-warn" unless="jisp.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="jisp"/>
<param name="recovery"
@@ -680,8 +706,9 @@
value="jisp is required for the JispFilesystemStore."/>
</antcall>
</target>
- <target name="pizza-warn" unless="pizza.present" depends="optional-tests"
- description="Outputs a warning if net.sf.pizzacompiler.compiler.* classes are
missing during compilation">
+
+ <!-- Outputs a warning if net.sf.pizzacompiler.compiler.* classes are missing
during compilation -->
+ <target name="pizza-warn" unless="pizza.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="Pizza"/>
<param name="recovery"
@@ -690,8 +717,9 @@
value="Pizza is the alternative Java compiler."/>
</antcall>
</target>
- <target name="poi-warn" unless="poi.present" depends="optional-tests"
- description="Outputs a warning if org.apache.poi.* classes are missing during
compilation">
+
+ <!-- Outputs a warning if org.apache.poi.* classes are missing during compilation
-->
+ <target name="poi-warn" unless="poi.present" depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="POI"/>
<param name="recovery"
@@ -700,8 +728,9 @@
value="POI is required for the POI sitemap components."/>
</antcall>
</target>
- <target name="commons-logging-warn" unless="commons.logging.present"
depends="optional-tests"
- description="Outputs a warning if org.apache.commons.logging.* classes are
missing during compilation">
+
+ <!-- Outputs a warning if org.apache.commons.logging.* classes are missing during
compilation -->
+ <target name="commons-logging-warn" unless="commons.logging.present"
depends="optional-tests">
<antcall target="op-warning">
<param name="thing" value="Jakarta Commons Logging"/>
<param name="recovery"
@@ -716,8 +745,7 @@
<!-- Print out warnings for optional components -->
<!-- =================================================================== -->
<target name="optional-warnings"
- depends="bsf-warn, rhino-warn, jfor-warn, xmldb-warn, xt-warn, php-warn,
naming-warn, svg-warn, fop-warn, tidy-warn, maybeupload-warn, lucene-warn, deli-warn,
velocity-warn, hsqldb-warn, resolver-warn, jisp-warn, pizza-warn, poi-warn,
commons-logging-warn"
- description="Outputs warnings if some optional jars are missing from the
environment">
+ depends="bsf-warn, rhino-warn, jfor-warn, xmldb-warn, xt-warn, php-warn,
naming-warn, svg-warn, fop-warn, tidy-warn, maybeupload-warn, lucene-warn, deli-warn,
velocity-warn, hsqldb-warn, resolver-warn, jisp-warn, pizza-warn, poi-warn,
commons-logging-warn">
</target>
@@ -917,9 +945,9 @@
<!-- =================================================================== -->
<!-- Creates the jar file -->
<!-- =================================================================== -->
- <target name="all" depends="package" description="Default target"/>
+ <target name="all" depends="package" description="Default target (calls the
'package' target)"/>
- <target name="package" depends="compile" description="Generates the jar package">
+ <target name="package" depends="compile" description="Generates the jar packages">
<jar jarfile="${build.dir}/${name}.jar" manifest="${build.src}/Manifest.mf">
<fileset dir="${build.dest}">
<include name="org/**"/>
@@ -938,7 +966,7 @@
<!-- =================================================================== -->
<!-- Target called by Gump -->
<!-- =================================================================== -->
- <target name="gump" depends="docs, javadocs, test, package" description="Gump
target"/>
+ <target name="gump" depends="docs, javadocs, test, package" description="[admin]
Target called by Gump"/>
<!-- =================================================================== -->
<!-- Prepares the docs -->
@@ -1013,7 +1041,7 @@
<target name="docs"
depends="package, prepare-docs, docs_check, docs_done"
unless="docs.notrequired"
- description="* Generates the documentation">
+ description="Builds the documentation">
<java classname="org.apache.cocoon.Main" fork="true" dir="${build.context}"
failonerror="true">
<arg value="-c."/>
@@ -1090,7 +1118,7 @@
<taskdef name="xconf-tool" classname="XConfToolTask"
classpath="${tools.dir}/anttasks"/>
- <!-- Invoke the XConfTool to add optional entries -->
+ <!-- Invoke the XConfTool to add entries for optional components -->
<xconf-tool directory="${build.src}"
extension="xmap"
configuration="${build.war}/sitemap.xmap"/>
@@ -1151,6 +1179,9 @@
<fileset dir="lib/optional">
<include name="**/*.jar"/>
</fileset>
+ <fileset dir="lib/local">
+ <include name="**/*.jar"/>
+ </fileset>
<pathelement location="${build.war}/WEB-INF/classes"/>
<pathelement location="${build.dir}/${name}.jar"/>
<pathelement location="${tools.jar}"/>
@@ -1174,6 +1205,12 @@
<exclude name="servlet*.jar"/>
</fileset>
</copy>
+ <copy todir="${build.war}/WEB-INF/lib">
+ <fileset dir="${lib.dir}/local">
+ <include name="*.jar"/>
+ <exclude name="servlet*.jar"/>
+ </fileset>
+ </copy>
</target>
<target name="prepare-webapp-libs" depends="package, copy-webapp-libs"
if="include.webapp.libs">
@@ -1222,7 +1259,7 @@
<!-- Creates a local webapp directly useable as a servlet context -->
<!-- =================================================================== -->
<target name="webapp-local" depends="prepare-webapp, prepare-webapp-scratchpad,
copy-webapp-libs, copy-scratchpad-libs"
- description="Generates a local webapp directory usable as servlet context for
quicker turn around">
+ description="Builds a local webapp directory usable as servlet context for
quicker turn around">
<copy todir="${build.war}/WEB-INF/classes">
<fileset dir="${build.dest}"/>
<fileset dir="${build.scratchpad.dest}"/>
@@ -1239,7 +1276,8 @@
<!-- =================================================================== -->
<!-- Installs Cocoon file -->
<!-- =================================================================== -->
- <target name="install" depends="package, webapp, remove-webapp" if="install.war"
description="* Installs the war package">
+ <target name="install" depends="package, webapp, remove-webapp" if="install.war"
+ description="Installs the WAR package">
<copy file="${build.dir}/${name}.war" tofile="${install.war}/${name}.war"/>
</target>
@@ -1269,7 +1307,7 @@
<!-- =================================================================== -->
<target name="announcement"
depends="prepare-docs"
- description="* Creates the announcement for new releases">
+ description="[admin] Creates the announcement for new releases">
<copy file="announcement.xml" tofile="${build.context}\xdocs\announcement.xml"
filtering="on"/>
@@ -1309,7 +1347,7 @@
<!-- =================================================================== -->
<target name="printer-docs" depends="package, prepare-printer-docs,
printer-docs_check, printer-docs_done"
unless="printer-docs.notrequired"
- description="* Generates printer-friendly documentation">
+ description="Builds printer-friendly documentation">
<mkdir dir="${build.docs.printer}"/>
<java classname="org.apache.cocoon.Main" fork="true"
dir="${build.dir}/printer_documentation" failonerror="true">
@@ -1334,7 +1372,7 @@
<!-- Creates the web site -->
<!-- =================================================================== -->
<target name="site" depends="docs, javadocs"
- description="Generates the web site (for site maintainers only)">
+ description="[admin] Builds the web site">
<mkdir dir="${site}"/>
<copy todir="${site}" filtering="off">
<fileset dir="${build.docs}">
@@ -1528,8 +1566,7 @@
<!-- =================================================================== -->
<!-- Packages the source distribution as .zip -->
<!-- =================================================================== -->
- <target name="dist-src-zip" depends="dist-src"
- description="Generates the source distribution as a .zip file">
+ <target name="dist-src-zip" depends="dist-src">
<zip zipfile="${dist.target}/${dist.name}-src.zip"
basedir="${dist.root}/source"/>
</target>
@@ -1537,8 +1574,7 @@
<!-- =================================================================== -->
<!-- Packages the source distribution with .tar.gzip -->
<!-- =================================================================== -->
- <target name="dist-src-tgz" depends="dist-src"
- description="Generates the source distribution as a .tar.gz file">
+ <target name="dist-src-tgz" depends="dist-src">
<tar tarfile="${dist.target}/${dist.name}-src.tar"
basedir="${dist.root}/source"
longfile="gnu"/>
@@ -1547,10 +1583,9 @@
</target>
<!-- =================================================================== -->
- <!-- Creates the source distribution -->
+ <!-- Prepares the binary distribution -->
<!-- =================================================================== -->
- <target name="dist-bin" depends="package, webapp, docs, javadocs"
- description="Prepares the binary distribution">
+ <target name="dist-bin" depends="package, webapp, docs, javadocs">
<!-- Copy webapp and the html docs -->
<mkdir dir="${dist.root}"/>
<mkdir dir="${dist.bin.dir}"/>
@@ -1575,6 +1610,12 @@
<exclude name="servlet*.jar"/>
</fileset>
</copy>
+ <copy todir="${dist.bin.dir}/webapp/WEB-INF/lib">
+ <fileset dir="${lib.dir}/local">
+ <include name="*.jar"/>
+ <exclude name="servlet*.jar"/>
+ </fileset>
+ </copy>
<mkdir dir="${dist.bin.dir}/webapp/WEB-INF/classes"/>
<move todir="${dist.bin.dir}/webapp/WEB-INF/classes">
@@ -1619,8 +1660,7 @@
<!-- =================================================================== -->
<!-- Packages the binary distribution as .zip -->
<!-- =================================================================== -->
- <target name="dist-bin-zip" depends="dist-bin"
- description="Generates the binary distribution as a .zip file">
+ <target name="dist-bin-zip" depends="dist-bin">
<zip zipfile="${dist.target}/${dist.name}-bin.zip"
basedir="${dist.root}/bin"/>
</target>
@@ -1628,8 +1668,7 @@
<!-- =================================================================== -->
<!-- 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">
+ <target name="dist-bin-tgz" depends="dist-bin">
<tar tarfile="${dist.target}/${dist.name}-bin.tar"
basedir="${dist.root}/bin"
longfile="gnu"/>
@@ -1658,17 +1697,17 @@
<!-- =================================================================== -->
<target name="dist"
depends="dist-info, dist-bin-tgz, dist-bin-zip, dist-src-tgz,
dist-src-zip"
- description="* Generates all distributions (source/binary)">
+ description="[admin] Builds the distributions">
</target>
<!-- =================================================================== -->
<!-- Clean targets -->
<!-- =================================================================== -->
- <target name="clean" depends="init" description="* Cleans the build directories">
+ <target name="clean" depends="init" description="Cleans the build directories">
<delete dir="${build.dir}"/>
</target>
- <target name="distclean" depends="clean" description="* Cleans everything to the
original state">
+ <target name="distclean" depends="clean" description="Cleans everything to the
original state">
<delete dir="${build.root}"/>
<delete file="${dist.target}/${Name}-${version}.tar.gz"/>
<delete file="${dist.target}/${Name}-${version}.tar"/>
----------------------------------------------------------------------
In case of troubles, e-mail: [EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]