cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lgaw...@apache.org
Subject svn commit: r320686 - in /cocoon/trunk/tools: ide/eclipse/blocks-classpath.xsl src/blocks-build.xsl src/gump2blocks.properties.xsl
Date Thu, 13 Oct 2005 08:15:01 GMT
Author: lgawron
Date: Thu Oct 13 01:14:51 2005
New Revision: 320686

URL: http://svn.apache.org/viewcvs?rev=320686&view=rev
Log:
make build eclipse-customized-project honour the same inclusion/exclusion logic as standard
build does.
forgot to commit gump2blocks.properties.xsl previously 

Modified:
    cocoon/trunk/tools/ide/eclipse/blocks-classpath.xsl
    cocoon/trunk/tools/src/blocks-build.xsl
    cocoon/trunk/tools/src/gump2blocks.properties.xsl

Modified: cocoon/trunk/tools/ide/eclipse/blocks-classpath.xsl
URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/ide/eclipse/blocks-classpath.xsl?rev=320686&r1=320685&r2=320686&view=diff
==============================================================================
--- cocoon/trunk/tools/ide/eclipse/blocks-classpath.xsl (original)
+++ cocoon/trunk/tools/ide/eclipse/blocks-classpath.xsl Thu Oct 13 01:14:51 2005
@@ -23,6 +23,21 @@
     <xsl:template match="/">
         <project default="generate-customized-eclipse-project" basedir="." name="blocks-eclipse">
             <description>Autogenerated Ant build file that builds customized eclipse
project for selected blocks.</description>
+        	<!-- copied over from blocks-build.xsl -->
+            <macrodef name="test-include-block">
+                <attribute name="name"/>
+                <sequential>
+                    <condition property="include.block.@{{name}}">
+                        <and>
+                            <equals arg1="${{default.block.mode}}" arg2="include"/>
+                            <not><istrue value="${{exclude.block.@{{name}}}}"/></not>
+                        </and>
+                    </condition>
+                    <condition property="internal.exclude.block.@{{name}}">
+                        <not><istrue value="${{include.block.@{{name}}}}"/></not>
+                    </condition>
+                </sequential>
+            </macrodef>
             <xsl:apply-templates select="module"/>
         </project>
     </xsl:template>
@@ -32,17 +47,18 @@
 
         <!-- Define wich blocks will be included -->
         <target name="init">
-            <xsl:for-each select="$cocoon-blocks">
-                <xsl:variable name="block-name" select="substring-after(@name,'cocoon-block-')"/>
-                <condition property="include.block.{$block-name}">
-                    <not>
-                        <istrue value="${{exclude.block.{$block-name}}}"/>
-                    </not>
-                </condition>
-                <condition property="internal.exclude.block.{$block-name}">
-                    <isfalse value="${{include.block.{$block-name}}}"/>
-                </condition>
-            </xsl:for-each>
+        	<!-- copied over from blocks-build.xsl -->
+            <condition property="default.block.mode" value="include">
+                <istrue value="${{include.all.blocks}}"/>
+            </condition>
+            <condition property="default.block.mode" value="exclude">
+                <istrue value="${{exclude.all.blocks}}"/>
+            </condition>
+            <property name="default.block.mode" value="include"/>
+            <xsl:for-each select="$cocoon-blocks">
+                <xsl:variable name="block-name" select="substring-after(@name,'cocoon-block-')"/>
+                <test-include-block name="{$block-name}"/>
+            </xsl:for-each>
 
             <!-- prepare the various paths that will form the project -->
             <path id="srcs">

Modified: cocoon/trunk/tools/src/blocks-build.xsl
URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/src/blocks-build.xsl?rev=320686&r1=320685&r2=320686&view=diff
==============================================================================
--- cocoon/trunk/tools/src/blocks-build.xsl (original)
+++ cocoon/trunk/tools/src/blocks-build.xsl Thu Oct 13 01:14:51 2005
@@ -495,7 +495,7 @@
         <or>
           <xsl:for-each select="$cocoon-blocks">
             <xsl:variable name="block-name" select="substring-after(@name,'cocoon-block-')"/>
-            <istrue value="${{internal.exclude.block.{$block-name}}}"/>
+              <istrue value="${{internal.exclude.block.{$block-name}}}"/>
           </xsl:for-each>
         </or>
       </condition>
@@ -796,13 +796,13 @@
 
       <!-- Copy the library depencies -->
       <xsl:if test="library[not(@bundle='false')]">
-          <copy filtering="off" todir="${{build.webapp.lib}}">
+        <copy filtering="off" todir="${{build.webapp.lib}}">
           <fileset dir="${{lib.optional}}">
             <xsl:for-each select="library[not(@bundle='false')]">
               <include name="{@name}*.jar"/>
             </xsl:for-each>
-            </fileset>
-          </copy>
+          </fileset>
+        </copy>
       </xsl:if>
       <block-lib name="{$block-name}" dir="{@dir}"/>
     </target>

Modified: cocoon/trunk/tools/src/gump2blocks.properties.xsl
URL: http://svn.apache.org/viewcvs/cocoon/trunk/tools/src/gump2blocks.properties.xsl?rev=320686&r1=320685&r2=320686&view=diff
==============================================================================
--- cocoon/trunk/tools/src/gump2blocks.properties.xsl (original)
+++ cocoon/trunk/tools/src/gump2blocks.properties.xsl Thu Oct 13 01:14:51 2005
@@ -55,6 +55,21 @@
 # 'local.blocks.properties' and modify that. The build system will first load
 # 'local.blocks.properties' and properties are immutable in Ant.
 
+# For most cases it is enough that you exclude all blocks and include only those
+# few you want, example:
+# exclude.all.blocks=true
+# include.block.forms=true
+# include.block.template=true
+
+# The opposite is also allowed:
+# include.all.blocks=true
+# exclude.block.scratchpad=true
+
+# If there is a conflict on the same level of granularity:
+# include.block.template=true vs. exclude.block.template=true, 
+# include.all.blocks=true vs. exclude.all.blocks=true
+# it is always resolved in favour of include.* properties. 
+
 # NOTE: "[dependency]" indicates blocks that are required by other blocks.
 # Disabling batik, for example, will result in a RuntimeException when using
 # fop. Dependencies only needed for the block's samples are marked explicitely.



Mime
View raw message