Author: unico
Date: Thu Oct 28 07:19:35 2004
New Revision: 55855

Modified:
   cocoon/branches/BRANCH_2_1_X/tools/src/blocks-build.xsl
Log:
only include optional jars if block has any library dependencies

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     Thu Oct 28 
07:19:35 2004
@@ -529,13 +529,15 @@
       </xsl:if>
 
       <!-- Copy the library depencies -->
-      <copy filtering="off" todir="${{build.webapp.lib}}">
-        <fileset dir="${{lib.optional}}">
-          <xsl:for-each select="library">
-            <include name="[EMAIL PROTECTED]"/>
-          </xsl:for-each>
-        </fileset>
-      </copy>
+      <xsl:if test="library">
+        <copy filtering="off" todir="${{build.webapp.lib}}">
+          <fileset dir="${{lib.optional}}">
+            <xsl:for-each select="library">
+              <include name="[EMAIL PROTECTED]"/>
+            </xsl:for-each>
+          </fileset>
+        </copy>
+      </xsl:if>
 
       <!-- Test if this block has global WEB-INF files -->
       <if>
@@ -566,11 +568,13 @@
 
       <path id="{$block-name}.classpath">
         <path refid="classpath"/>
-        <fileset dir="${{lib.optional}}">
-          <xsl:for-each select="library">
-            <include name="[EMAIL PROTECTED]"/>
-          </xsl:for-each>
-        </fileset>
+        <xsl:if test="library">
+          <fileset dir="${{lib.optional}}">
+            <xsl:for-each select="library">
+              <include name="[EMAIL PROTECTED]"/>
+            </xsl:for-each>
+          </fileset>
+        </xsl:if>
         <pathelement location="${{build.blocks}}/{$block-name}/mocks"/>
         <pathelement location="${{build.blocks}}/{$block-name}/dest"/>
         <pathelement location="${{build.blocks}}/{$block-name}/samples"/>

Reply via email to