cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lgaw...@apache.org
Subject svn commit: r320707 - in /cocoon/branches/BRANCH_2_1_X/tools: ide/eclipse/blocks-classpath.xsl targets/admin-build.xml targets/compile-build.xml targets/ide-build.xml targets/init-build.xml targets/samples-build.xml targets/webapp-build.xml
Date Thu, 13 Oct 2005 10:06:56 GMT
Author: lgawron
Date: Thu Oct 13 03:06:42 2005
New Revision: 320707

URL: http://svn.apache.org/viewcvs?rev=320707&view=rev
Log:
reintroduce old build eclipse-project in a new way
some minor syncing with 2.2

Modified:
    cocoon/branches/BRANCH_2_1_X/tools/ide/eclipse/blocks-classpath.xsl
    cocoon/branches/BRANCH_2_1_X/tools/targets/admin-build.xml
    cocoon/branches/BRANCH_2_1_X/tools/targets/compile-build.xml
    cocoon/branches/BRANCH_2_1_X/tools/targets/ide-build.xml
    cocoon/branches/BRANCH_2_1_X/tools/targets/init-build.xml
    cocoon/branches/BRANCH_2_1_X/tools/targets/samples-build.xml
    cocoon/branches/BRANCH_2_1_X/tools/targets/webapp-build.xml

Modified: cocoon/branches/BRANCH_2_1_X/tools/ide/eclipse/blocks-classpath.xsl
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/tools/ide/eclipse/blocks-classpath.xsl?rev=320707&r1=320706&r2=320707&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/tools/ide/eclipse/blocks-classpath.xsl (original)
+++ cocoon/branches/BRANCH_2_1_X/tools/ide/eclipse/blocks-classpath.xsl Thu Oct 13 03:06:42
2005
@@ -23,7 +23,7 @@
     <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 -->
+            <!-- copied over from blocks-build.xsl -->
             <macrodef name="test-include-block">
                 <attribute name="name"/>
                 <sequential>
@@ -34,7 +34,10 @@
                         </and>
                     </condition>
                     <condition property="internal.exclude.block.@{{name}}">
-                        <not><istrue value="${{include.block.@{{name}}}}"/></not>
+                        <and>
+                            <not><istrue value="${{unconditional.include.all.blocks}}"/></not>
+                            <not><istrue value="${{include.block.@{{name}}}}"/></not>
+                        </and>
                     </condition>
                 </sequential>
             </macrodef>

Modified: cocoon/branches/BRANCH_2_1_X/tools/targets/admin-build.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/tools/targets/admin-build.xml?rev=320707&r1=320706&r2=320707&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/tools/targets/admin-build.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/tools/targets/admin-build.xml Thu Oct 13 03:06:42 2005
@@ -41,7 +41,7 @@
   </target>
 
   <target name="generate-blocks.properties" depends="init">
-    <xslt in="gump.xml"
+    <xslt in="${gump.descriptor}"
           out="blocks.properties"
           style="${tools.src}/gump2blocks.properties.xsl"
           force="true"/>

Modified: cocoon/branches/BRANCH_2_1_X/tools/targets/compile-build.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/tools/targets/compile-build.xml?rev=320707&r1=320706&r2=320707&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/tools/targets/compile-build.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/tools/targets/compile-build.xml Thu Oct 13 03:06:42 2005
@@ -21,15 +21,9 @@
     Compilation Targets
   </description>
 
-  <!-- compiles everything -->
-  <target name="compile"
-          depends="compile-core, compile-deprecated, compile-tests"/>
-
-  <!-- compiles mocks -->
-  <target name="compile-mocks" depends="prepare">
-    <mkdir dir="${build.mocks}"/>
-    <javac srcdir="${mocks}"
-           destdir="${build.mocks}"
+  <!-- compilation parts used by all targets -->
+  <presetdef name="cocoon.javac">
+    <javac 
            debug="${compiler.debug}"
            optimize="${compiler.optimize}"
            deprecation="${compiler.deprecation}"
@@ -38,47 +32,49 @@
            nowarn="${compiler.nowarn}"
            compiler="${compiler}"
            classpathref="classpath"/>
+   </presetdef>
+
+   <macrodef name="cocoon.compile">
+   <attribute name="destdir"/>
+   <attribute name="srcdir"/>
+   <attribute name="classpathref" default="classpath"/> 
+   <sequential>
+    <mkdir dir="@{destdir}"/>
+    <!-- copy those files that need to be in the classpath -->
+      <copy todir="@{destdir}">
+        <fileset dir="@{srcdir}">
+          <exclude name="**/*.java"/>
+        </fileset>
+      </copy>
+      <cocoon.javac srcdir="@{srcdir}"
+                    destdir="@{destdir}"/>
+      </sequential>
+    </macrodef>
+
+  <!-- compiles everything -->
+  <target name="compile"
+          depends="compile-core, compile-deprecated, compile-tests"/>
+
+  <!-- compiles mocks -->
+  <target name="compile-mocks" depends="prepare">
+    <cocoon.compile srcdir="${mocks}"
+                           destdir="${build.mocks}"/>
   </target>
 
   <!-- compiles the core -->
   <target name="compile-core" depends="compile-mocks, clover.on">
-    <!-- copy those files that need to be in the classpath -->
-    <copy todir="${build.dest}">
-      <fileset dir="${java}">
-        <exclude name="**/*.java"/>
-        <exclude name="**/*.xroles"/>
-        <exclude name="**/*.xconf"/>
-      </fileset>
-    </copy>
-    <javac srcdir="${java}"
-           destdir="${build.dest}"
-           debug="${compiler.debug}"
-           optimize="${compiler.optimize}"
-           deprecation="${compiler.deprecation}"
-           target="${target.vm}"
-           source="${source.vm}"
-           nowarn="${compiler.nowarn}"
-           classpathref="classpath"/>
+    <cocoon.compile srcdir="${java}"
+                    destdir="${build.dest}"/>
   </target>
 
   <!-- compiles deprecated code -->
   <target name="compile-deprecated" depends="prepare, clover.off"
           unless="internal.exclude.deprecated">
-    <mkdir dir="${build.deprecated}"/>
-
     <xpatch file="${build.dest}/org/apache/cocoon/cocoon.roles"
             srcdir="${deprecated.conf}"
             includes="**/*.xroles"/>
-
-    <javac srcdir="${deprecated.src}"
-           destdir="${build.deprecated}"
-           debug="${compiler.debug}"
-           optimize="${compiler.optimize}"
-           deprecation="${compiler.deprecation}"
-           target="${target.vm}"
-           source="${source.vm}"
-           compiler="${compiler}"
-           classpathref="classpath"/>
+    <cocoon.compile srcdir="${deprecated.src}"
+                          destdir="${build.deprecated}"/>
   </target>
 
   <!-- compiles tests classes -->
@@ -154,6 +150,43 @@
 
 <!-- === Package Targets ================================================= -->
 
+   <macrodef name="cocoon.jar">
+   <attribute name="name"/>
+   <attribute name="dir"/>
+   <attribute name="index" default="false"/>
+   <attribute name="update" default="yes"/>   
+   <sequential>
+        <jar jarfile="${build}/@{name}.jar" update="@{update}" index="@{index}">
+          <fileset dir="@{dir}">
+            <include name="**/*.java"/>
+          </fileset>
+        </jar>
+      </sequential>
+    </macrodef>
+   
+   <!-- optionally add source files to the core jar -->
+   <macrodef name="cocoon.package-sources">
+   <attribute name="name"/>
+   <attribute name="dir"/>
+   <sequential>
+       <!-- optionally add source files to the core jar -->
+        <if>
+          <istrue value="${include.sources-in-jars}"/>
+          <then>
+            <cocoon.jar name="@{name}"
+                        dir="@{dir}"/>
+          </then>
+        </if>
+        <if>
+          <istrue value="${include.sources-jars}"/>
+          <then>
+            <cocoon.jar name="@{name}.src"
+                        dir="@{dir}"/>
+          </then>
+        </if>
+      </sequential>
+    </macrodef>
+    
   <!-- packages everything -->
   <target name="package"
           depends="package-core, package-deprecated, package-testcase"/>
@@ -165,27 +198,10 @@
          <exclude name="**/Manifest.mf"/>
       </fileset>
     </jar>
-    <!-- optionally add source files to the core jar -->
-    <if>
-      <istrue value="${include.sources-in-jars}"/>
-      <then>
-        <jar jarfile="${build}/${name}.jar" update="yes">
-          <fileset dir="${java}">
-            <include name="**/*.java"/>
-          </fileset>
-        </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>
+
+    <cocoon.package-sources name="${name}"
+                            dir="${java}"/>
+ 
   </target>
 
   <!-- package deprecated code -->
@@ -194,27 +210,9 @@
     <jar jarfile="${build}/${name}-deprecated.jar" index="true">
       <fileset dir="${build.deprecated}"/>
     </jar>
-    <!-- optionally add source files to the jar -->
-    <if>
-      <istrue value="${include.sources-in-jars}"/>
-      <then>
-        <jar jarfile="${build}/${name}-deprecated.jar" update="yes">
-          <fileset dir="${deprecated.src}">
-            <include name="**/*.java"/>
-          </fileset>
-        </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>
+    
+    <cocoon.package-sources name="${name}-deprecated"
+                            dir="${deprecated.src}"/>
   </target>
 
   <!-- package testcase code -->
@@ -228,27 +226,9 @@
         <include name="org/apache/cocoon/xml/WhitespaceFilter*"/>
       </fileset>
     </jar>
-    <!-- optionally add source files to the jar -->
-    <if>
-      <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>
-        </jar>
-      </then>
-    </if>
+ 
+    <cocoon.package-sources name="${name}-testcase"
+                            dir="${test}"/>
   </target>
 
 <!-- === Block Targets =================================================== -->

Modified: cocoon/branches/BRANCH_2_1_X/tools/targets/ide-build.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/tools/targets/ide-build.xml?rev=320707&r1=320706&r2=320707&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/tools/targets/ide-build.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/tools/targets/ide-build.xml Thu Oct 13 03:06:42 2005
@@ -21,8 +21,15 @@
   <!-- for those who like long names.. -->
   <target name="eclipse-customized-project" depends="eclipse-project"/>
   
+  <target name="init-full-eclipse-project">
+    <property name="unconditional.include.all.blocks" value="true"/>
+  </target>
+  
+  <target name="full-eclipse-project" depends="init-full-eclipse-project, eclipse-project"/>
+  
   <!-- Build the Eclipse customized project's files -->
-  <target name="eclipse-project" depends="prepare" description="Generate the Eclipse customized
project files (using local.block.properties)">
+  <target name="eclipse-project" depends="prepare"
+    description="Generate the Eclipse customized project files (using local.block.properties).
Use -Dunconditional.include.all.blocks=true to override local.build.properties">
     <echo message="Building Eclipse Customized Project Files"/>
     <xslt in="${gump.descriptor}"
           out="${build.temp}/blocks-eclipse.xml"

Modified: cocoon/branches/BRANCH_2_1_X/tools/targets/init-build.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/tools/targets/init-build.xml?rev=320707&r1=320706&r2=320707&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/tools/targets/init-build.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/tools/targets/init-build.xml Thu Oct 13 03:06:42 2005
@@ -182,18 +182,18 @@
 
   <!-- Prepare the build directory -->
   <target name="prepare" depends="init-tasks">
-    <echo>======================================================================
+    <echo>====================================================================
                  ${fullname} ${version} [${year}]
-======================================================================
+====================================================================
  Building with ${ant.version}
-----------------------------------------------------------------------
+--------------------------------------------------------------------
  Using build file ${ant.file}
-----------------------------------------------------------------------
+--------------------------------------------------------------------
  Compiler options:
    - debug ......... [${compiler.debug}]
    - optimize ...... [${compiler.optimize}]
    - deprecation ... [${compiler.deprecation}]
-======================================================================</echo>
+====================================================================</echo>
     <mkdir dir="${build}"/>
   </target>
 

Modified: cocoon/branches/BRANCH_2_1_X/tools/targets/samples-build.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/tools/targets/samples-build.xml?rev=320707&r1=320706&r2=320707&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/tools/targets/samples-build.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/tools/targets/samples-build.xml Thu Oct 13 03:06:42 2005
@@ -66,7 +66,7 @@
     </copy>
 
     <!-- copy gump.xml which is used to create block samples page -->
-    <copy file="gump.xml" todir="${build.webapp.samples}/blocks"/>
+    <copy file="${gump.descriptor}" todir="${build.webapp.samples}/blocks"/>
 
     <!-- copy sample classes -->
     <copy todir="${build.webapp.classes}" filtering="off">

Modified: cocoon/branches/BRANCH_2_1_X/tools/targets/webapp-build.xml
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/tools/targets/webapp-build.xml?rev=320707&r1=320706&r2=320707&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/tools/targets/webapp-build.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/tools/targets/webapp-build.xml Thu Oct 13 03:06:42 2005
@@ -24,10 +24,10 @@
   <target name="prepare-webapp" depends="blocks, package">
     <mkdir dir="${build.webapp}"/>
 
-    <copy file="${webapp}/welcome.xml" todir="${build.webapp}" filtering="on"/>
-    <copy file="${webapp}/not-found.xml" todir="${build.webapp}" filtering="on"/>
-    <copy file="${webapp}/welcome.xslt" todir="${build.webapp}" filtering="on"/>
-    <copy file="${webapp}/sitemap.xmap" todir="${build.webapp}"/>
+    <copy file="${webapp}/welcome.xml" tofile="${build.webapp}/welcome.xml" filtering="on"/>
+    <copy file="${webapp}/not-found.xml" tofile="${build.webapp}/not-found.xml" filtering="on"/>
+    <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
     <sitemap-components sitemap="${build.webapp}/sitemap.xmap" source="${java}"/>



Mime
View raw message