vgritsenko 2003/02/01 15:54:03 Modified: . build.xml Log: Rename "package" to "package-core", move "compile" up to where it is used, remove (commented out) parts which were moved to blocks, cosmetics. Revision Changes Path 1.316 +314 -410 xml-cocoon2/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/xml-cocoon2/build.xml,v retrieving revision 1.315 retrieving revision 1.316 diff -u -r1.315 -r1.316 --- build.xml 1 Feb 2003 18:13:47 -0000 1.315 +++ build.xml 1 Feb 2003 23:54:02 -0000 1.316 @@ -235,9 +235,7 @@ <echo message=" "/> <echo message="--------------------------------------------------------------"/> - <!-- - The location of tools.jar, relative to the JAVA_HOME home. - --> + <!-- The location of tools.jar, relative to the JAVA_HOME home. --> <property name="tools.jar" value="${java.home}/../lib/tools.jar"/> <available file="${tools.jar}" property="tools.jar.present"/> @@ -276,13 +274,11 @@ nowarn="on" classpathref="anttasks.classpath" fork="true"/> - </target> <!-- =================================================================== --> <!-- Interactive build --> <!-- =================================================================== --> - <target name="i" description="Interactive Build" depends="interactive"/> <target name="interactive" description="Interactive Build"> @@ -323,7 +319,6 @@ <fail if="do.abort">Build aborted by user.</fail> <antcall target="${input.selection}"/> - </target> <!-- =================================================================== --> @@ -380,12 +375,12 @@ <!-- call install target --> <antcall target="install"/> </target> + <!-- =================================================================== --> <!-- Test for optional components --> <!-- =================================================================== --> <target name="optional-tests" depends="init"> - <echo message="Testing for optional components"/> <available classpathref="classpath" @@ -546,13 +541,8 @@ <available classpathref="classpath" property="mail.present" classname="javax.mail.message"/> - </target> - <!-- moved to tools/src/blocks-build.xsl - <target name="prepare-jdbc" depends="filter-jdbc,nofilter-jdbc"/> - --> - <!-- =================================================================== --> <!-- Macro for optional warnings --> <!-- =================================================================== --> @@ -857,7 +847,6 @@ depends="bsf-warn, rhino-warn, jfor-warn, xmldb-warn, php-warn, naming-warn, svg-warn, tidy-warn, maybeupload-warn, lucene-warn, deli-warn, velocity-warn, hsqldb-warn, resolver-warn, jisp-warn, pizza-warn, poi-warn, commons-logging-warn, jxpath-warn, httpclient-warn, activation-warn, transaction-warn, mail-warn"> </target> - <!-- =================================================================== --> <!-- Prepares the build directory --> <!-- =================================================================== --> @@ -865,6 +854,7 @@ <mkdir dir="${build.dir}"/> </target> + <!-- =================================================================== --> <!-- Prepares the source code --> <!-- =================================================================== --> @@ -875,13 +865,6 @@ <fileset dir="${java.dir}"> -<!-- moved to block - <exclude name="**/poi/**" unless="poi.present"/> - <exclude name="**/HSSFSerializer.java" unless="poi.present"/> - <exclude name="**/poi.*" unless="poi.present"/> - <exclude name="**/POIFSSerializer.java" unless="poi.present"/> ---> - <!-- present in lib/optional <exclude name="**/java/Pizza.java" unless="pizza.present"/> <exclude name="**/java/pizza.*" unless="pizza.present"/> @@ -893,76 +876,22 @@ <exclude name="**/environment/http/*.java" unless="servlet.present"/> <exclude name="**/generation/StreamGenerator.java" unless="servlet.present"/> <exclude name="**/components/request/**" unless="servlet.present"/> ---> -<!-- moved to block - <exclude name="**/ScriptAction.java" unless="bsf.present"/> - <exclude name="**/ScriptGenerator.java" unless="bsf.present"/> - <exclude name="**/bsf.*" unless="bsf.present"/> ---> - -<!-- present in lib/optional <exclude name="**/deli/DeliImpl.java" unless="deli.present"/> <exclude name="**/deli.*" unless="deli.present"/> ---> -<!-- moved to block - <exclude name="**/HTMLGenerator.java" unless="tidy.present"/> - <exclude name="**/tidy.*" unless="tidy.present"/> ---> -<!-- moved to block - <exclude name="**/VelocityGenerator.java" unless="velocity.present"/> - <exclude name="**/velocity.*" unless="velocity.present"/> ---> -<!-- moved to block - <exclude name="**/SVG*.java" unless="svg.present"/> - <exclude name="**/svg.*" unless="svg.present"/> - <exclude name="**/components/transcoder/**.java" unless="svg.present"/> - <exclude name="**/components/url/Parsed**ProtocolHandler.java" unless="svg.present"/> ---> -<!-- moved to block - <exclude name="**/FOP*" unless="fop.present"/> - <exclude name="**/renderer/*" unless="fop.present"/> - <exclude name="**/fop.*" unless="fop.present"/> ---> -<!-- present in lib/optional <exclude name="**/CompiledJavascript*" unless="rhino.compiler.present"/> <exclude name="**/javascript/Javascript*" unless="rhino.interpreter.present"/> <exclude name="**/javascript/javascript*" unless="rhino.interpreter.present"/> <exclude name="**/xsp/JSGenerator.java" unless="rhino.interpreter.present"/> <exclude name="**/xsp/javascript/**" unless="rhino.interpreter.present"/> <exclude name="**/flow/javascript/**" unless="rhino.interpreter.present"/> ---> -<!-- moved to block - <exclude name="**/programming/python/*" unless="python.present"/> - <exclude name="**/xsp/PythonGenerator*" unless="python.present"/> - <exclude name="**/xsp/python/*" unless="python.present"/> ---> -<!-- present in lib/optional <exclude name="**/components/resolver/ResolverImpl.java" unless="resolver.present"/> <exclude name="**/resolver.*" unless="resolver.present"/> <exclude name="**/Jstyle*" unless="jstyle.present"/> ---> -<!-- moved to block - <exclude name="**/Php*" unless="php.present"/> - <exclude name="**/php.*" unless="php.present"/> ---> -<!-- mockified - <exclude name="**/Sendmail*.java" unless="mail.present"/> ---> -<!-- moved to block - <exclude name="**/LDAPTransformer*" unless="naming.present"/> - <exclude name="**/samples/parentcm/*" unless="naming.present"/> - <exclude name="**/naming.*" unless="naming.present"/> ---> -<!-- moved to block - <exclude name="**/JSPEngineImplWLS.java" unless="weblogic.present"/> ---> - -<!-- present in lib/optional <exclude name="**/XMLDB*.java" unless="xmldb.present"/> <exclude name="**/DbXML*.java" unless="xmldb.present"/> --> @@ -977,13 +906,7 @@ <exclude name="**/components/hsqldb/ServerImpl.java" unless="hsqldb.present"/> <exclude name="**/hsqldb.*" unless="hsqldb.present"/> ---> -<!-- moved to block - <exclude name="**/components/search/*" unless="lucene.present"/> - <exclude name="**/generation/SearchGenerator.java" unless="lucene.present"/> - <exclude name="**/lucene.*" unless="lucene.present"/> ---> -<!-- present in lib/optional + <exclude name="**/components/store/Jisp*.java" unless="jisp.present"/> <exclude name="**/store/jisp.*" unless="jisp.present"/> <exclude name="**/store/file.*" if="jisp.present"/> @@ -1007,35 +930,35 @@ <if> <istrue value="${cocoon.webapp.scratchpad.include}"/> <then> - <mkdir dir="${build.scratchpad.src}"/> - <mkdir dir="${build.scratchpad.dest}"/> - <copy todir="${build.scratchpad.src}" filtering="on"> - <fileset dir="${scratchpad.src}"> - <exclude name="**/Ifx*.java" unless="ifx.driver.present"/> - - <exclude name="**/components/request/**" unless="servlet.present"/> - <exclude name="**/precept/**" unless="servlet.present"/> - <exclude name="**/reading/ByteRangeResourceReader.java" unless="servlet.present"/> - <exclude name="**/acting/SourceMultiAction.java" unless="servlet.present"/> - <exclude name="**/acting/SourceUploadAction.java" unless="servlet.present"/> - <exclude name="**/generation/RequestAttribute**.java" unless="servlet.present"/> - - <exclude name="**/jxpath/**" unless="jxpath.present"/> - <exclude name="**/taglib/**" unless="jxpath.present"/> - <exclude name="**/transformation/TagTransformer.java" unless="jxpath.present"/> - - <exclude name="**/XMLDB*.java" unless="xmldb.present"/> - <exclude name="**/DbXML*.java" unless="xmldb.present"/> - - <exclude name="**/servlet/*Filter*.java" unless="servlet23.present"/> - - <exclude name="**/components/axis/**" unless="activation.present"/> - <exclude name="**/reading/AxisRPCReader.java" unless="activation.present"/> - <exclude name="**/webservices/**" unless="activation.present"/> - - <exclude name="**/mail/**" unless="mail.present"/> - </fileset> - </copy> + <mkdir dir="${build.scratchpad.src}"/> + <mkdir dir="${build.scratchpad.dest}"/> + <copy todir="${build.scratchpad.src}" filtering="on"> + <fileset dir="${scratchpad.src}"> + <exclude name="**/Ifx*.java" unless="ifx.driver.present"/> + + <exclude name="**/components/request/**" unless="servlet.present"/> + <exclude name="**/precept/**" unless="servlet.present"/> + <exclude name="**/reading/ByteRangeResourceReader.java" unless="servlet.present"/> + <exclude name="**/acting/SourceMultiAction.java" unless="servlet.present"/> + <exclude name="**/acting/SourceUploadAction.java" unless="servlet.present"/> + <exclude name="**/generation/RequestAttribute**.java" unless="servlet.present"/> + + <exclude name="**/jxpath/**" unless="jxpath.present"/> + <exclude name="**/taglib/**" unless="jxpath.present"/> + <exclude name="**/transformation/TagTransformer.java" unless="jxpath.present"/> + + <exclude name="**/XMLDB*.java" unless="xmldb.present"/> + <exclude name="**/DbXML*.java" unless="xmldb.present"/> + + <exclude name="**/servlet/*Filter*.java" unless="servlet23.present"/> + + <exclude name="**/components/axis/**" unless="activation.present"/> + <exclude name="**/reading/AxisRPCReader.java" unless="activation.present"/> + <exclude name="**/webservices/**" unless="activation.present"/> + + <exclude name="**/mail/**" unless="mail.present"/> + </fileset> + </copy> </then> </if> @@ -1046,24 +969,18 @@ <include name="**/*.java"/> </fileset> </copy> - </target> - - - <!-- INCLUDE DEPRECATED CLASSES TILL DEPENDENCIES ON THEM ARE FIXED --> + + <!-- INCLUDE DEPRECATED CLASSES TILL DEPENDENCIES ON THEM ARE FIXED --> <target name="-copy-deprecated-stuff2core" depends="init" unless="deprecate"> - <copy todir="${build.src}" filtering="on"> <fileset dir="${deprecated.src}"> <include name="**/*.java"/> </fileset> </copy> - </target> - - <!-- =================================================================== --> + <!-- Set a variable if the generated java code is already up-to-date. --> - <!-- =================================================================== --> <target name="generate-java-code-check" depends="init"> <uptodate property="generate-java-code.notrequired" targetfile="${build.src}/org/apache/cocoon/components/browser/BrowserImpl.java" > @@ -1072,9 +989,7 @@ </uptodate> </target> - <!-- =================================================================== --> <!-- Generate the Java code from XML using XSLT --> - <!-- =================================================================== --> <target name="generate-java-code" depends="generate-java-code-check" unless="generate-java-code.notrequired"> <xslt basedir="${java.dir}/org/apache/cocoon/components/browser" @@ -1084,6 +999,7 @@ style="${java.dir}/org/apache/cocoon/components/browser/BrowserImpl.xsl"/> </target> + <!-- =================================================================== --> <!-- Compiles the source directory --> <!-- =================================================================== --> @@ -1113,7 +1029,6 @@ <echo message="Compiling with Java ${ant.java.version}, debug ${debug}, optimize ${optimize}, deprecation ${deprecation}"/> <mkdir dir="${build.mocks}"/> - <javac srcdir="${mocks.dir}" destdir="${build.mocks}" debug="${debug}" @@ -1125,7 +1040,6 @@ <classpath refid="classpath"/> </javac> - <javac srcdir="${build.src}" destdir="${build.dest}" debug="${debug}" @@ -1144,29 +1058,29 @@ <if> <istrue value="${cocoon.webapp.scratchpad.include}"/> <then> - <copy todir="${build.scratchpad.dest}"> - <fileset dir="${build.scratchpad.src}"> - <include name="**/Manifest.mf"/> - <include name="**/*.xsl"/> - <include name="**/*.wsdd"/> - <include name="**/*.roles"/> - <include name="META-INF/**"/> - </fileset> - </copy> - - <javac srcdir="${build.scratchpad.src}" - destdir="${build.scratchpad.dest}" - debug="${debug}" - optimize="${optimize}" - deprecation="${deprecation}" - target="${target.vm}" + <copy todir="${build.scratchpad.dest}"> + <fileset dir="${build.scratchpad.src}"> + <include name="**/Manifest.mf"/> + <include name="**/*.xsl"/> + <include name="**/*.wsdd"/> + <include name="**/*.roles"/> + <include name="META-INF/**"/> + </fileset> + </copy> + + <javac srcdir="${build.scratchpad.src}" + destdir="${build.scratchpad.dest}" + debug="${debug}" + optimize="${optimize}" + deprecation="${deprecation}" + target="${target.vm}" fork="true"> - <!--classpath refid="scratchpad.classpath"/--> - <classpath> - <path refid="scratchpad.classpath"/> - <path location="${build.mocks}"/> - </classpath> - </javac> + <!--classpath refid="scratchpad.classpath"/--> + <classpath> + <path refid="scratchpad.classpath"/> + <path location="${build.mocks}"/> + </classpath> + </javac> </then> </if> @@ -1193,22 +1107,20 @@ <path location="{build.mocks}"/> </classpath> </javac> - - </target> + <!-- =================================================================== --> <!-- Compiles the Java files in the src/samples/ directory --> <!-- =================================================================== --> - <target name="compile-samples" depends="init"> + <target name="compile-samples" depends="init"> <property name="build.dest.samples" value="${build.dest}/samples"/> <mkdir dir="${build.dest.samples}"/> - <javac srcdir="${webapp.dir}/samples" - destdir="${build.dest}" - excludes="chaperon/**" - debug="${debug}" + destdir="${build.dest}" + excludes="chaperon/**" + debug="${debug}" optimize="${optimize}" deprecation="${deprecation}" target="${target.vm}" @@ -1217,12 +1129,11 @@ </javac> </target> + <!-- =================================================================== --> - <!-- Creates the jar file --> + <!-- Creates the core Cocoon jar file --> <!-- =================================================================== --> - <target name="all" depends="compile" description="Default target (calls the 'package' target)"/> - - <target name="package" depends="compile-core" description="Generates the jar packages"> + <target name="package-core" depends="compile-core" description="Generates the core Cocoon jar package"> <jar jarfile="${build.dir}/${name}.jar" manifest="${build.src}/Manifest.mf"> <fileset dir="${build.dest}"> <include name="org/**"/> @@ -1247,9 +1158,45 @@ <include name="org/**"/> </fileset> </jar> - </target> + + <!-- =================================================================== --> + <!-- Compile also all blocks that are specified in properties.xml --> + <!-- =================================================================== --> + <target name="compile" depends="package-core"> + <property name="compile.project" value="all"/> + + <delete file="${build.work}/blocks-build.xml"/> + + <xslt in="project-info.xml" + out="${build.work}/blocks-build.xml" + processor="trax" + style="${tools.dir}/src/blocks-build.xsl"/> + + <ant antfile="${build.work}/blocks-build.xml" + inheritAll="true" + inheritRefs="true" + target="${compile.project}"/> + + <!-- FIXME: We have to rebuild the cocoon.jar in order to + add the roles defined in the blocks --> + <jar jarfile="${build.dir}/${name}.jar" manifest="${build.src}/Manifest.mf"> + <fileset dir="${build.dest}"> + <include name="org/**"/> + <include name="META-INF/**"/> + <exclude name="org/apache/cocoon/samples/**"/> + </fileset> + </jar> + </target> + + + <!-- =================================================================== --> + <!-- Default target compiles and packages Cocoon and all blocks --> + <!-- =================================================================== --> + <target name="all" depends="compile" description="Default target (calls the 'compile' target)"/> + + <!-- =================================================================== --> <!-- Creates the samples jar file --> <!-- =================================================================== --> @@ -1264,7 +1211,7 @@ <!-- =================================================================== --> <!-- Target called by Gump --> <!-- =================================================================== --> - <target name="gump" depends="docs, javadocs, test, package" description="[admin] Target called by Gump"/> + <target name="gump" depends="docs, javadocs, test, package-core" description="[admin] Target called by Gump"/> <!-- =================================================================== --> <!-- Prepares the docs --> @@ -1340,7 +1287,6 @@ depends="compile, prepare-docs, validate-xdocs, docs_done" unless="docs.notrequired" description="Builds the documentation"> - <java classname="org.apache.cocoon.Main" fork="true" dir="${build.context}" failonerror="true" maxmemory="128m"> <arg value="-c."/> @@ -1461,7 +1407,6 @@ <xconf-tool directory="${build.war}" extension="xpipe" configuration="${build.war}/sitemap.xmap"/> - </target> <!-- =================================================================== --> @@ -1478,46 +1423,45 @@ <!-- Prepares the webapp directories for scratchpad --> <!-- =================================================================== --> <target name="prepare-webapp-scratchpad" depends="copy-webapp" if="include.webapp.libs"> - <if> + <if> <istrue value="${cocoon.webapp.scratchpad.include}"/> <then> - - <!-- Invoke the XConfTool to add optional entries --> - <xconf-tool directory="${build.scratchpad.src}" - extension="xmap" - configuration="${build.war}/sitemap.xmap"/> - - <xconf-tool directory="${build.scratchpad.src}" - extension="xpipe" - configuration="${build.war}/sitemap.xmap"/> - - <xconf-tool directory="${build.scratchpad.src}" - extension="xconf" - configuration="${build.war}/WEB-INF/cocoon.xconf"/> - - <!-- copy scratchpad webapp samples --> - <copy todir="${build.war}" filtering="on"> - <fileset dir="${scratchpad.webapp}"> - <exclude name="**/*.gif"/> - <exclude name="**/*.jpg"/> - <exclude name="**/*.png"/> - </fileset> - </copy> - <copy todir="${build.war}" filtering="off"> - <fileset dir="${scratchpad.webapp}"> - <include name="**/*.gif"/> - <include name="**/*.jpg"/> - <include name="**/*.png"/> - </fileset> - </copy> - </then> - </if> + <!-- Invoke the XConfTool to add optional entries --> + <xconf-tool directory="${build.scratchpad.src}" + extension="xmap" + configuration="${build.war}/sitemap.xmap"/> + + <xconf-tool directory="${build.scratchpad.src}" + extension="xpipe" + configuration="${build.war}/sitemap.xmap"/> + + <xconf-tool directory="${build.scratchpad.src}" + extension="xconf" + configuration="${build.war}/WEB-INF/cocoon.xconf"/> + + <!-- copy scratchpad webapp samples --> + <copy todir="${build.war}" filtering="on"> + <fileset dir="${scratchpad.webapp}"> + <exclude name="**/*.gif"/> + <exclude name="**/*.jpg"/> + <exclude name="**/*.png"/> + </fileset> + </copy> + <copy todir="${build.war}" filtering="off"> + <fileset dir="${scratchpad.webapp}"> + <include name="**/*.gif"/> + <include name="**/*.jpg"/> + <include name="**/*.png"/> + </fileset> + </copy> + </then> + </if> </target> <!-- =================================================================== --> <!-- Prepares the libraries for the war package --> <!-- =================================================================== --> - <target name="prepare-xsp" depends="package" if="build.precompile"> + <target name="prepare-xsp" depends="package-core" if="build.precompile"> <java classname="org.apache.cocoon.Main" fork="yes" failonerror="true"> <arg line="-P -C ${build.war}/WEB-INF/cocoon.xconf -w ${build.war}/WEB-INF/classes -c ${build.war}" /> <classpath> @@ -1580,10 +1524,10 @@ </copy> </target> - <target name="prepare-webapp-libs" depends="package, package-samples, copy-webapp-libs" if="include.webapp.libs"> + <target name="prepare-webapp-libs" depends="package-core, package-samples, copy-webapp-libs" if="include.webapp.libs"> <copy file="${build.dir}/${name}.jar" tofile="${build.war}/WEB-INF/lib/${name}-${version}.jar"/> <copy file="${build.dir}/${name}-samples.jar" - todir="${build.war}/WEB-INF/lib/"/> + todir="${build.war}/WEB-INF/lib/"/> </target> <!-- =================================================================== --> @@ -1593,14 +1537,14 @@ <if> <istrue value="${cocoon.webapp.scratchpad.include}"/> <then> - <copy todir="${build.war}/WEB-INF/lib"> - <fileset dir="${scratchpad.lib}"> - <include name="*.jar"/> - <exclude name="servlet*.jar"/> - </fileset> - </copy> - </then> - </if> + <copy todir="${build.war}/WEB-INF/lib"> + <fileset dir="${scratchpad.lib}"> + <include name="*.jar"/> + <exclude name="servlet*.jar"/> + </fileset> + </copy> + </then> + </if> </target> <target name="prepare-scratchpad-libs" depends="copy-scratchpad-libs, prepare-webapp-libs" if="include.webapp.libs"> @@ -1717,7 +1661,7 @@ <!-- =================================================================== --> <!-- Installs Cocoon file --> <!-- =================================================================== --> - <target name="install" depends="package, webapp, remove-webapp" if="install.war" + <target name="install" depends="package-core, webapp, remove-webapp" if="install.war" description="Installs the WAR package"> <copy file="${build.dir}/${name}.war" tofile="${install.war}/${name}.war"/> </target> @@ -1758,14 +1702,12 @@ includes="announcement.xml" extension=".txt" force="true"/> - </target> <!-- =================================================================== --> <!-- Prepares the printer-docs --> <!-- =================================================================== --> <target name="prepare-printer-docs" depends="prepare-docs"> - <mkdir dir="${build.dir}/printer_documentation"/> <!-- copy prepared docs --> @@ -1779,14 +1721,13 @@ <fileset dir="${build.context}/stylesheets/printer_skin"> </fileset> </copy> - </target> <!-- =================================================================== --> <!-- Generate printer-friendly HTML docs --> <!-- =================================================================== --> - <target name="printer-docs" depends="package, prepare-printer-docs, printer-docs_check, printer-docs_done" + <target name="printer-docs" depends="package-core, prepare-printer-docs, printer-docs_check, printer-docs_done" unless="printer-docs.notrequired" description="Builds printer-friendly documentation"> <mkdir dir="${build.docs.printer}"/> @@ -1859,63 +1800,62 @@ <equals arg1="1.4" arg2="${java.specification.version}"/> <then> <!-- Create the java docs for JDK 1.4 --> - <javadoc packagenames="${packages}.*" - additionalparam="-subpackages ${packages} -breakiterator" - excludepackagenames="org.apache.cocoon.components.language.programming.java" - destdir="${build.javadocs}" - author="true" - version="true" - use="true" - noindex="false" - windowtitle="${Name} API (${version}, ${TODAY})" - doctitle="${Name}" - bottom="Copyright © ${year} Apache Software Foundation. All Rights Reserved." - stylesheetfile="${resource.dir}/javadoc.css" - useexternalfile="yes"> - <fileset dir="${build.dir}"> - <include name="src/**/*.java"/> - <include name="blocks/**/*.java"/> - <include name="deprecated/**/*.java"/> - </fileset> - <fileset dir="${blocks.dir}"> - <include name="**/mocks/**/*.java"/> - </fileset> - <classpath refid="classpath"/> - </javadoc> + <javadoc packagenames="${packages}.*" + additionalparam="-subpackages ${packages} -breakiterator" + excludepackagenames="org.apache.cocoon.components.language.programming.java" + destdir="${build.javadocs}" + author="true" + version="true" + use="true" + noindex="false" + windowtitle="${Name} API (${version}, ${TODAY})" + doctitle="${Name}" + bottom="Copyright © ${year} Apache Software Foundation. All Rights Reserved." + stylesheetfile="${resource.dir}/javadoc.css" + useexternalfile="yes"> + <fileset dir="${build.dir}"> + <include name="src/**/*.java"/> + <include name="blocks/**/*.java"/> + <include name="deprecated/**/*.java"/> + </fileset> + <fileset dir="${blocks.dir}"> + <include name="**/mocks/**/*.java"/> + </fileset> + <classpath refid="classpath"/> + </javadoc> </then> <else> <!-- Create the java docs for pre 1.4 --> - <javadoc packagenames="${packages}.*" - destdir="${build.javadocs}" - author="true" - version="true" - use="true" - noindex="false" - windowtitle="${Name} API (${version}, ${TODAY})" - doctitle="${Name}" - bottom="Copyright © ${year} Apache Software Foundation. All Rights Reserved." - stylesheetfile="${resource.dir}/javadoc.css" - useexternalfile="yes"> - <!-- FIXME: Using this fileset technique fails with out-of-memory errors. - It seems that the cause is loading too many individual *.java files. - Try <sourcepath> instead and let javadoc load them. --> - <!-- - <fileset dir="${build.dir}"> - <include name="src/**/*.java"/> - <include name="blocks/**/*.java"/> - <include name="deprecated/**/*.java"/> - </fileset> - <fileset dir="${blocks.dir}"> - <include name="**/mocks/**/*.java"/> - </fileset> - --> - <sourcepath location="${build.dir}/src"/> - <sourcepath location="${build.dir}/blocks"/> - <fileset dir="${blocks.dir}"> - <include name="**/mocks/**/*.java"/> - </fileset> - <classpath refid="classpath"/> - </javadoc> + <javadoc packagenames="${packages}.*" + destdir="${build.javadocs}" + author="true" + version="true" + use="true" + noindex="false" + windowtitle="${Name} API (${version}, ${TODAY})" + doctitle="${Name}" + bottom="Copyright © ${year} Apache Software Foundation. All Rights Reserved." + stylesheetfile="${resource.dir}/javadoc.css" + useexternalfile="yes"> + <!-- FIXME: Using this fileset technique fails with out-of-memory errors. + It seems that the cause is loading too many individual *.java files. + Try <sourcepath> instead and let javadoc load them. + <fileset dir="${build.dir}"> + <include name="src/**/*.java"/> + <include name="blocks/**/*.java"/> + <include name="deprecated/**/*.java"/> + </fileset> + <fileset dir="${blocks.dir}"> + <include name="**/mocks/**/*.java"/> + </fileset> + --> + <sourcepath location="${build.dir}/src"/> + <sourcepath location="${build.dir}/blocks"/> + <fileset dir="${blocks.dir}"> + <include name="**/mocks/**/*.java"/> + </fileset> + <classpath refid="classpath"/> + </javadoc> </else> </if> </target> @@ -2082,7 +2022,7 @@ <!-- =================================================================== --> <!-- Prepares the binary distribution --> <!-- =================================================================== --> - <target name="dist-bin" depends="package, webapp, docs, javadocs"> + <target name="dist-bin" depends="package-core, webapp, docs, javadocs"> <!-- Copy webapp and the html docs --> <mkdir dir="${dist.root}"/> <mkdir dir="${dist.bin}"/> @@ -2121,19 +2061,19 @@ <include name="*.jar"/> <exclude name="servlet*.jar"/> </fileset> - </copy> + </copy> - <copy todir="${dist.bin}/webapp/WEB-INF/lib"> + <copy todir="${dist.bin}/webapp/WEB-INF/lib"> <fileset dir="${build.dir}"> <include name="*-block.jar"/> </fileset> <mapper type="glob" from="*-block.jar" to="cocoon-*-block-${version}.jar"/> - </copy> + </copy> <copy file="${build.dir}/${name}.jar" - tofile="${dist.bin}/webapp/WEB-INF/lib/${name}-${version}.jar"/> + tofile="${dist.bin}/webapp/WEB-INF/lib/${name}-${version}.jar"/> <copy file="${build.dir}/${name}-samples.jar" - todir="${dist.bin}/webapp/WEB-INF/lib/"/> + todir="${dist.bin}/webapp/WEB-INF/lib/"/> <copy todir="${dist.bin}/docs"> <fileset dir="${build.docs}"/> @@ -2274,7 +2214,6 @@ <target name="test" depends="junit.tests, anteater.tests" description="Runs all the tests"/> - <!-- =================================================================== --> <!-- Junit Test targets --> <!-- =================================================================== --> @@ -2339,7 +2278,7 @@ <!-- Fix line endings in src --> <!-- =================================================================== --> <target name="fixsrclf" depends="init" description="Fix lf in src directory (internal use only!)"> - <fixcrlf srcdir="${java.dir}" includes="**/*.java" eol="lf"/> + <fixcrlf srcdir="${java.dir}" includes="**/*.java" eol="lf"/> </target> <!-- =================================================================== --> @@ -2386,36 +2325,6 @@ <!-- =================================================================== --> - <!-- Compile also all blocks that are specified in properties.xml --> - <!-- =================================================================== --> - <target name="compile" depends="prepare, package"> - - <property name="compile.project" value="all"/> - - <delete file="${build.work}/blocks-build.xml"/> - - <xslt in="project-info.xml" - out="${build.work}/blocks-build.xml" - processor="trax" - style="${tools.dir}/src/blocks-build.xsl"/> - - <ant antfile="${build.work}/blocks-build.xml" - inheritAll="true" - inheritRefs="true" - target="${compile.project}"/> - - <!-- FIXME: We have to rebuild the cocoon.jar in order to - add the roles defined in the blocks --> - <jar jarfile="${build.dir}/${name}.jar" manifest="${build.src}/Manifest.mf"> - <fileset dir="${build.dest}"> - <include name="org/**"/> - <include name="META-INF/**"/> - <exclude name="org/apache/cocoon/samples/**"/> - </fileset> - </jar> - </target> - - <!-- =================================================================== --> <!-- Validation of core important configuration files using RELAX NG --> <!-- =================================================================== --> <!-- Depends on "prepare-webapp" target, so that the sitemaps are generated @@ -2426,38 +2335,38 @@ description="Validation of core configuration files using RELAX NG" depends="prepare-webapp" if="validate.config"> - <echo message="Conducting validation of core configuration files."/> - <echo message="(You can turn validation off if you must, using ./properties.xml)"/> + <echo message="Conducting validation of core configuration files."/> + <echo message="(You can turn validation off if you must, using ./properties.xml)"/> - <!-- cocoon.roles --> - <echo message="Validating all cocoon.roles instances ..."/> - <jing rngfile="${webapp.dir}/WEB-INF/entities/roles-v01.rng"> - <fileset dir="${build.dir}" includes="**/cocoon.roles"/> - </jing> - - <!-- All stylesheets **/*.xsl --> - <echo message="Validating all stylesheets ..."/> - <jing rngfile="${webapp.dir}/WEB-INF/entities/xslt-20020523.rng"> -<!-- FIXME: Need catalog entity resolver, so excluding catalog tester xsl --> -<!-- FIXME: Excluding the "hello world" SWF sitemap (minor issue) --> - <fileset dir="${src.dir}" includes="**/*.xsl" - excludes="**/catalog/style.xsl, **/simple-page2swf.xsl"/> - <fileset dir="${tools.dir}" includes="**/*.xsl"/> - </jing> - - <!-- The Treeprocessor builtins --> - <echo message="Validating the treeprocessor builtins ..."/> - <xmlvalidate failonerror="true" lenient="no" warn="yes"> - <fileset dir="${java.dir}" includes="**/treeprocessor-builtins.xml"/> - </xmlvalidate> - - <!-- sitemap.xmap --> - <!-- leaving this until last because it is the one most likely to break --> - <echo message="Validating all sitemap.xmap instances ..."/> -<!-- FIXME: The sitemaps and their RNG grammar still need tweaking --> - <jing rngfile="${webapp.dir}/WEB-INF/entities/sitemap-v06.rng"> - <fileset dir="${build.dir}" includes="**/sitemap.xmap"/> - </jing> + <!-- cocoon.roles --> + <echo message="Validating all cocoon.roles instances ..."/> + <jing rngfile="${webapp.dir}/WEB-INF/entities/roles-v01.rng"> + <fileset dir="${build.dir}" includes="**/cocoon.roles"/> + </jing> + + <!-- All stylesheets **/*.xsl --> + <echo message="Validating all stylesheets ..."/> + <jing rngfile="${webapp.dir}/WEB-INF/entities/xslt-20020523.rng"> + <!-- FIXME: Need catalog entity resolver, so excluding catalog tester xsl --> + <!-- FIXME: Excluding the "hello world" SWF sitemap (minor issue) --> + <fileset dir="${src.dir}" includes="**/*.xsl" + excludes="**/catalog/style.xsl, **/simple-page2swf.xsl"/> + <fileset dir="${tools.dir}" includes="**/*.xsl"/> + </jing> + + <!-- The Treeprocessor builtins --> + <echo message="Validating the treeprocessor builtins ..."/> + <xmlvalidate failonerror="true" lenient="no" warn="yes"> + <fileset dir="${java.dir}" includes="**/treeprocessor-builtins.xml"/> + </xmlvalidate> + + <!-- sitemap.xmap --> + <!-- leaving this until last because it is the one most likely to break --> + <echo message="Validating all sitemap.xmap instances ..."/> + <!-- FIXME: The sitemaps and their RNG grammar still need tweaking --> + <jing rngfile="${webapp.dir}/WEB-INF/entities/sitemap-v06.rng"> + <fileset dir="${build.dir}" includes="**/sitemap.xmap"/> + </jing> </target> <!-- =================================================================== --> @@ -2470,31 +2379,30 @@ description="Validation of all core XML documentation" depends="prepare-docs" if="validate.xdocs"> - <echo message="Conducting validation of core XML documentation."/> - <echo message="(You can turn validation off if you must, using ./properties.xml)"/> + <echo message="Conducting validation of core XML documentation."/> + <echo message="(You can turn validation off if you must, using ./properties.xml)"/> - <echo message="Validating all **/book.xml instances using RELAX NG ..."/> - <jing rngfile="${webapp.dir}/WEB-INF/entities/book-v01.rng"> - <fileset dir="${build.context}" includes="**/book.xml"/> - </jing> - - <echo message="Validating all xdocs/**/*.xml instances using DTDs ..."/> - <xmlvalidate failonerror="true" lenient="no" warn="yes"> - <!-- FIXME: we can use xmlcatalog with Ant-1.6 --> - <fileset dir="${build.context}/xdocs" includes="**/*.xml" - excludes="drafts/*.xml,dictionary.xml,catalog-test.xml,ctwig/sample/**/*.xml" - /> - </xmlvalidate> - - <echo message="Validating the documentation sitemap.xmap using RELAX NG ..."/> - <jing rngfile="${webapp.dir}/WEB-INF/entities/sitemap-v06.rng"> - <fileset dir="${build.context}" includes="sitemap.xmap"/> - </jing> - - <echo message="Validating all documentation stylesheets using RELAX NG ..."/> - <jing rngfile="${webapp.dir}/WEB-INF/entities/xslt-20020523.rng"> - <fileset dir="${build.context}/stylesheets" includes="**/*.xsl"/> - </jing> + <echo message="Validating all **/book.xml instances using RELAX NG ..."/> + <jing rngfile="${webapp.dir}/WEB-INF/entities/book-v01.rng"> + <fileset dir="${build.context}" includes="**/book.xml"/> + </jing> + + <echo message="Validating all xdocs/**/*.xml instances using DTDs ..."/> + <xmlvalidate failonerror="true" lenient="no" warn="yes"> + <!-- FIXME: we can use xmlcatalog with Ant-1.6 --> + <fileset dir="${build.context}/xdocs" includes="**/*.xml" + excludes="drafts/*.xml,dictionary.xml,catalog-test.xml,ctwig/sample/**/*.xml"/> + </xmlvalidate> + + <echo message="Validating the documentation sitemap.xmap using RELAX NG ..."/> + <jing rngfile="${webapp.dir}/WEB-INF/entities/sitemap-v06.rng"> + <fileset dir="${build.context}" includes="sitemap.xmap"/> + </jing> + + <echo message="Validating all documentation stylesheets using RELAX NG ..."/> + <jing rngfile="${webapp.dir}/WEB-INF/entities/xslt-20020523.rng"> + <fileset dir="${build.context}/stylesheets" includes="**/*.xsl"/> + </jing> </target> <!-- =================================================================== --> @@ -2503,55 +2411,55 @@ <!-- Needs XSLTC or Saxon7 (but the classpath attribute won't work). --> <!-- --> <!-- These are two temporary targets undergoing testing. --> - <!-- --> <!--=================================================================== --> <!-- Depends on some "prepare-*" targets, so that the sitemaps are generated and copied to the build. --> <target name="prepare-schematron" - description="Generate Schematron schema from RNG grammar" - depends="prepare-webapp, prepare-webapp-scratchpad" - if="validate.config"> - <echo message="Generating Schematron schemas from RELAX NG grammars"/> - <echo message="Currently doing: sitemap.rng only"/> - <xslt in="${webapp.dir}/WEB-INF/entities/sitemap-v06.rng" - out="${tools.dir}/src/schematron/sitemap.sch" - style="${tools.dir}/src/schematron/RNG2Schtrn.xsl"/> - <echo message="Generating XSLT validators from Schematron schemas"/> - <xslt in="${tools.dir}/src/schematron/sitemap.sch" - out="${tools.dir}/src/schematron/validate-sitemap.xsl" - style="${tools.dir}/src/schematron/schematron-basic.xsl"/> + description="Generate Schematron schema from RNG grammar" + depends="prepare-webapp, prepare-webapp-scratchpad" + if="validate.config"> + <echo message="Generating Schematron schemas from RELAX NG grammars"/> + <echo message="Currently doing: sitemap.rng only"/> + <xslt in="${webapp.dir}/WEB-INF/entities/sitemap-v06.rng" + out="${tools.dir}/src/schematron/sitemap.sch" + style="${tools.dir}/src/schematron/RNG2Schtrn.xsl"/> + <echo message="Generating XSLT validators from Schematron schemas"/> + <xslt in="${tools.dir}/src/schematron/sitemap.sch" + out="${tools.dir}/src/schematron/validate-sitemap.xsl" + style="${tools.dir}/src/schematron/schematron-basic.xsl"/> </target> + <!-- =================================================================== --> <!-- Validate with Schematron --> <!--=================================================================== --> <target name="validate-schematron" - description="Validate against Schematron schemas generated from RNG grammars" - depends="prepare-schematron"> - <echo message="NOTE: this is an experimental build target."/> - <echo message="Removing any old reports ..."/> - <delete quiet="yes"> - <fileset dir="${build.dir}" includes="**/sitemap.report" /> - </delete> - <echo message="Running schematron validators"/> - <echo message="Currently doing: **/sitemap.xmap only"/> - <xslt basedir="${build.dir}" includes="**/sitemap.xmap" - destdir="${build.dir}" extension=".report" - style="${tools.dir}/src/schematron/validate-sitemap.xsl"/> - <echo message="Removing any empty reports ..."/> - <delete quiet="yes"> - <fileset dir="${build.dir}" includes="**/sitemap.report" > - <size value="0"/> - </fileset> - </delete> - <echo message="Listing any new error reports ..."/> - <apply executable="ls" failonerror="false" skipemptyfilesets="true"> - <fileset dir="${build.dir}" includes="**/sitemap.report" /> - <arg value="-l"/> - </apply> - <apply executable="false" failonerror="true" skipemptyfilesets="true"> - <fileset dir="${build.dir}" includes="**/sitemap.report" /> - </apply> + description="Validate against Schematron schemas generated from RNG grammars" + depends="prepare-schematron"> + <echo message="NOTE: this is an experimental build target."/> + <echo message="Removing any old reports ..."/> + <delete quiet="yes"> + <fileset dir="${build.dir}" includes="**/sitemap.report" /> + </delete> + <echo message="Running schematron validators"/> + <echo message="Currently doing: **/sitemap.xmap only"/> + <xslt basedir="${build.dir}" includes="**/sitemap.xmap" + destdir="${build.dir}" extension=".report" + style="${tools.dir}/src/schematron/validate-sitemap.xsl"/> + <echo message="Removing any empty reports ..."/> + <delete quiet="yes"> + <fileset dir="${build.dir}" includes="**/sitemap.report" > + <size value="0"/> + </fileset> + </delete> + <echo message="Listing any new error reports ..."/> + <apply executable="ls" failonerror="false" skipemptyfilesets="true"> + <fileset dir="${build.dir}" includes="**/sitemap.report" /> + <arg value="-l"/> + </apply> + <apply executable="false" failonerror="true" skipemptyfilesets="true"> + <fileset dir="${build.dir}" includes="**/sitemap.report" /> + </apply> </target> <!-- =================================================================== --> @@ -2639,8 +2547,8 @@ <!-- now build the .classpath file --> <xslt in="${build.work}/classpath-temp.xml" out="${basedir}/.classpath" - processor="trax" - style="${src.dir}/resources/dev/eclipse/make-classpath.xsl"/> + processor="trax" + style="${src.dir}/resources/dev/eclipse/make-classpath.xsl"/> <!-- copy the project file (expand version) --> <copy file="${src.dir}/resources/dev/eclipse/project" @@ -2650,24 +2558,22 @@ <filter token="VERSION" value="${version}"/> </filterset> </copy> - </target> + -<!-- ***************************************************************** --> -<!-- ***************************************************************** --> -<!-- ** ** --> -<!-- ** ** --> -<!-- ** LOCAL SERVER RUN ACTION ** --> -<!-- ** ** --> -<!-- ** ** --> -<!-- ***************************************************************** --> -<!-- ***************************************************************** --> + <!-- ***************************************************************** --> + <!-- ***************************************************************** --> + <!-- ** ** --> + <!-- ** LOCAL SERVER RUN ACTION ** --> + <!-- ** ** --> + <!-- ***************************************************************** --> + <!-- ***************************************************************** --> <target name="run" description="Run Jetty with configuration set by the jetty.run property" depends="init"> - <property name="include.webapp.libs" value="true"/> + <property name="include.webapp.libs" value="true"/> <antcall target="webapp-local"/> <copy file="${tools.dir}/jetty/conf/jettyconf.xml" @@ -2692,8 +2598,6 @@ <arg line="jettyconf.xml" /> </java> </target> - </project> <!-- End of file --> -
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]