haul 2002/10/18 07:10:09 Modified: tools/src blocks-build.xsl Log: Revision Changes Path 1.9 +32 -4 xml-cocoon2/tools/src/blocks-build.xsl Index: blocks-build.xsl =================================================================== RCS file: /home/cvs/xml-cocoon2/tools/src/blocks-build.xsl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- blocks-build.xsl 4 Oct 2002 12:18:50 -0000 1.8 +++ blocks-build.xsl 18 Oct 2002 14:10:09 -0000 1.9 @@ -23,7 +23,33 @@ </xsl:attribute> </target> -<!-- Copy the samples --> + <target name="prepare-database-connection" depends="prepare-database-connection-pw,prepare-database-connection-no-pw"> + <!-- need to use 'string()' since xsl expands curly braces! --> + <filter token="db_driver" value="{string('${cocoon.samples.database.driver}')}"/> + <filter token="db_url" value="{string('${cocoon.samples.database.url}')}"/> + <filter token="db_user" value="{string('${cocoon.samples.database.user}')}"/> + </target> + + <target name="prepare-jdbc" depends="filter-jdbc,nofilter-jdbc"/> + + <target name="prepare-database-connection-pw" if="cocoon.samples.database.password"> + <filter token="db_password" value="{string('${cocoon.samples.database.password}')}"/> + </target> + + <target name="prepare-database-connection-no-pw" unless="cocoon.samples.database.password"> + <filter token="db_password" value=""/> + </target> + + <target name="filter-jdbc" unless="jdbc3.present"> + <filter token="JDBC3_START" value=""/> + <filter token="JDBC3_END" value=""/> + </target> + + <target name="nofilter-jdbc" if="jdbc3.present"> + <filter token="JDBC3_START" value="*/"/> + <filter token="JDBC3_END" value="/*"/> + </target> + <target name="-single-project-samples" if="currentblock.has.sample"> <property name="currentblock.dir"> <xsl:attribute name="value">${blocks.dir}/${currentblock.name}</xsl:attribute> @@ -37,7 +63,7 @@ </copy> </target> - <target name="-single-project" depends="-single-project-samples"> + <target name="-single-project" depends="-single-project-samples,prepare-jdbc,prepare-database-connection"> <path id="currentblock.classpath"> <fileset> <xsl:attribute name="dir">${lib.dir}</xsl:attribute> @@ -95,8 +121,10 @@ <fileset> <xsl:attribute name="dir">${currentblock.java.dir}</xsl:attribute> - <include name="**/*.java" /> + <!-- excludes moved from build.xml --> + <exclude name="**/Ora*.java" unless="ora.driver.present"/> + <exclude name="**/Ifx*.java" unless="ifx.driver.present"/> </fileset> </copy> @@ -112,7 +140,7 @@ </fileset> </copy> - <copy filtering="off"> + <copy filtering="on"> <xsl:attribute name="todir">${build.currentblock.dest}</xsl:attribute> <fileset>
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]