Author: vgritsenko Date: Fri Oct 29 12:25:03 2004 New Revision: 55990 Modified: cocoon/branches/BRANCH_2_1_X/build.properties cocoon/branches/BRANCH_2_1_X/tools/src/blocks-build.xsl cocoon/branches/BRANCH_2_1_X/tools/targets/compile-build.xml cocoon/branches/BRANCH_2_1_X/tools/targets/webapp-build.xml Log: Add include.sources-jars=true build property, add comments.
Modified: cocoon/branches/BRANCH_2_1_X/build.properties ============================================================================== --- cocoon/branches/BRANCH_2_1_X/build.properties (original) +++ cocoon/branches/BRANCH_2_1_X/build.properties Fri Oct 29 12:25:03 2004 @@ -33,7 +33,10 @@ #exclude.deprecated=true #exclude.documentation=true #exclude.javadocs=true +# Include Java source code into the binary jar files #include.sources-in-jars=true +# Include Java source code into separate, source only jar files +#include.sources-jars=true # ---- Configuration ----------------------------------------------------------- Modified: cocoon/branches/BRANCH_2_1_X/tools/src/blocks-build.xsl ============================================================================== --- cocoon/branches/BRANCH_2_1_X/tools/src/blocks-build.xsl (original) +++ cocoon/branches/BRANCH_2_1_X/tools/src/blocks-build.xsl Fri Oct 29 12:25:03 2004 @@ -397,6 +397,17 @@ </then> </if> + <if> + <istrue value="${{include.sources-jars}}"/> + <then> + <jar jarfile="${{build.blocks}}/{$block-name}-block.src.jar"> + <fileset dir="${{blocks}}/{$block-name}/java"> + <include name="**/*.java"/> + </fileset> + </jar> + </then> + </if> + <!-- exclude sample classes from the block package --> <mkdir dir="${{build.blocks}}/{$block-name}/samples"/> <javac destdir="${{build.blocks}}/{$block-name}/samples" Modified: cocoon/branches/BRANCH_2_1_X/tools/targets/compile-build.xml ============================================================================== --- cocoon/branches/BRANCH_2_1_X/tools/targets/compile-build.xml (original) +++ cocoon/branches/BRANCH_2_1_X/tools/targets/compile-build.xml Fri Oct 29 12:25:03 2004 @@ -137,6 +137,16 @@ </jar> </then> </if> + <if> + <istrue value="${include.sources-jars}"/> + <then> + <jar jarfile="${build}/${name}.src.jar"> + <fileset dir="${java}"> + <include name="**/*.java"/> + </fileset> + </jar> + </then> + </if> </target> <!-- package deprecated code --> @@ -156,6 +166,16 @@ </jar> </then> </if> + <if> + <istrue value="${include.sources-jars}"/> + <then> + <jar jarfile="${build}/${name}-deprecated.src.jar" update="yes"> + <fileset dir="${deprecated.src}"> + <include name="**/*.java"/> + </fileset> + </jar> + </then> + </if> </target> <!-- package testcase code --> @@ -173,6 +193,16 @@ <istrue value="${include.sources-in-jars}"/> <then> <jar jarfile="${build}/${name}-testcase.jar" update="yes"> + <fileset dir="${test}"> + <include name="**/*.java"/> + </fileset> + </jar> + </then> + </if> + <if> + <istrue value="${include.sources-jars}"/> + <then> + <jar jarfile="${build}/${name}-testcase.src.jar"> <fileset dir="${test}"> <include name="**/*.java"/> </fileset> Modified: cocoon/branches/BRANCH_2_1_X/tools/targets/webapp-build.xml ============================================================================== --- cocoon/branches/BRANCH_2_1_X/tools/targets/webapp-build.xml (original) +++ cocoon/branches/BRANCH_2_1_X/tools/targets/webapp-build.xml Fri Oct 29 12:25:03 2004 @@ -28,7 +28,7 @@ <copy file="${webapp}/welcome.xslt" tofile="${build.webapp}/welcome.xslt" filtering="on"/> <copy file="${webapp}/sitemap.xmap" tofile="${build.webapp}/sitemap.xmap"/> - <!-- generate sitemap entries + <!-- generate sitemap entries <sitemap-components sitemap="${build.webapp}/sitemap.xmap" source="${java}"/> --> @@ -50,7 +50,8 @@ </fileset> </copy> - <copy file="${build}/${name}.jar" tofile="${build.webapp.lib}/${name}-${version}.jar"/> + <copy file="${build}/${name}.jar" + tofile="${build.webapp.lib}/${name}-${version}.jar"/> <copy todir="${build.webapp.lib}"> <fileset dir="${lib}/endorsed"> @@ -78,6 +79,20 @@ </fileset> <mapper type="glob" from="*-block.jar" to="cocoon-*-block.jar"/> </copy> + + <if> + <istrue value="${include.sources-jars}"/> + <then> + <copy file="${build}/${name}.src.jar" + tofile="${build.webapp.lib}/${name}-${version}.src.jar"/> + <copy todir="${build.webapp.lib}"> + <fileset dir="${build.blocks}"> + <include name="*-block.src.jar"/> + </fileset> + <mapper type="glob" from="*-block.src.jar" to="cocoon-*-block.src.jar"/> + </copy> + </then> + </if> <ant antfile="${build.temp}/blocks-build.xml" inheritAll="true"