Author: rgoers
Date: Wed Nov 10 12:54:30 2004
New Revision: 57367

Modified:
   cocoon/trunk/tools/src/blocks-build.xsl
Log:
bug 30738 - Don't compile samples if samples have been excluded.


Modified: cocoon/trunk/tools/src/blocks-build.xsl
==============================================================================
--- cocoon/trunk/tools/src/blocks-build.xsl     (original)
+++ cocoon/trunk/tools/src/blocks-build.xsl     Wed Nov 10 12:54:30 2004
@@ -450,21 +450,26 @@
       </if>
 
       <!-- exclude sample classes from the block package -->
-      <mkdir dir="${{build.blocks}}/{$block-name}/samples"/>
-      <javac destdir="${{build.blocks}}/{$block-name}/samples"
-             debug="${{compiler.debug}}"
-             optimize="${{compiler.optimize}}"
-             deprecation="${{compiler.deprecation}}"
-             target="${{target.vm}}"
-             nowarn="${{compiler.nowarn}}"
-             compiler="${{compiler}}">
-        <src path="${{blocks}}/{$block-name}/java"/>
-        <!-- Currently, we have no JVM dependent sources
-        <src path="${{blocks}}/{$block-name}/java${{dependend.vm}}"/>
-        -->
-        <classpath refid="{$block-name}.classpath"/>
-        <include name="**/samples/**/*.java"/>
-      </javac>
+      <if>
+        <isfalse value="${{internal.exclude.webapp.samples}}"/>
+        <then>
+          <mkdir dir="${{build.blocks}}/{$block-name}/samples"/>
+          <javac destdir="${{build.blocks}}/{$block-name}/samples"
+                 debug="${{compiler.debug}}"
+                 optimize="${{compiler.optimize}}"
+                 deprecation="${{compiler.deprecation}}"
+                 target="${{target.vm}}"
+                 nowarn="${{compiler.nowarn}}"
+                 compiler="${{compiler}}">
+            <src path="${{blocks}}/{$block-name}/java"/>
+            <!-- Currently, we have no JVM dependent sources
+            <src path="${{blocks}}/{$block-name}/java${{dependend.vm}}"/>
+            -->
+            <classpath refid="{$block-name}.classpath"/>
+            <include name="**/samples/**/*.java"/>
+          </javac>
+        </then>
+      </if>
     </target>
 
     <target name="[EMAIL PROTECTED]" 
unless="internal.exclude.block.{$block-name}">

Reply via email to