stefano     2003/03/15 12:23:07

  Modified:    .        gump.xml build.xml
               tools/src blocks-build.xsl
  Log:
  now we package without requiring the compilation of all blocks, also added the gump 
target that is used to build the single blocks, this should make gump work on core and 
on all blocks
  
  Revision  Changes    Path
  1.12      +2 -3      cocoon-2.1/gump.xml
  
  Index: gump.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/gump.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- gump.xml  14 Mar 2003 13:00:14 -0000      1.11
  +++ gump.xml  15 Mar 2003 20:23:07 -0000      1.12
  @@ -15,7 +15,7 @@
     <project name="cocoon">
       <package>org.apache.cocoon</package>
   
  -    <ant target="gump-core">
  +    <ant target="package">
         <property name="version" value="@@DATE@@"/>
         <depend property="logkit.jar"    project="dist-avalon-logkit"/>
         <depend property="avalonapi.jar" project="avalon"/>
  @@ -71,8 +71,7 @@
       <javadoc parent="build/cocoon-@@DATE@@/javadocs"/>
   
       <nag from="Gump" to="[EMAIL PROTECTED]">
  -      <regexp pattern="/BUILD FAILED/"   subject="Build Failure - Cocoon"/>
  -      <!--regexp pattern="/Missing prereq/" subject="Prereq failure - Cocoon"/-->
  +      <regexp pattern="/BUILD FAILED/" subject="Build Failure - Cocoon"/>
       </nag>
     </project>
   
  
  
  
  1.10      +23 -18    cocoon-2.1/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/build.xml,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- build.xml 14 Mar 2003 20:46:59 -0000      1.9
  +++ build.xml 15 Mar 2003 20:23:07 -0000      1.10
  @@ -283,13 +283,7 @@
     <target name="package" depends="package-core, package-scratchpad, 
package-deprecated"/>
   
     <!-- package the core -->
  -  <target name="package-core" depends="compile, blocks">
  -    <!-- We need the dependency on compile and blocks, because
  -         currently the deprecated package and the blocks add
  -         roles to the single cocoon.roles configuration and
  -         we need to add the most recent version in the jar.
  -         This will be fixed sometime and then we depend only
  -         on compile-core. -->
  +  <target name="package-core" depends="compile-core,block-roles">
       <jar jarfile="${build}/${name}.jar" manifest="${java}/Manifest.mf">
         <fileset dir="${build.dest}"/>
       </jar>
  @@ -311,15 +305,34 @@
   
   <!-- Block Targets ========================================================= -->
   
  -  <!-- compiles blocks -->
  -  <target name="blocks" depends="compile">
  +  <!-- prepares the blocks build -->
  +  <target name="prepare-blocks" depends="init">
       <mkdir dir="${build.blocks}"/>
   
       <xslt in="${gump.descriptor}"
             out="${build.temp}/blocks-build.xml"
             processor="trax"
             style="${tools}/src/blocks-build.xsl"/>
  +  </target>
   
  +  <!-- patch the cocoon role file -->
  +  <target name="block-roles" depends="prepare-blocks,init-xpatch">
  +    <ant antfile="${build.temp}/blocks-build.xml"
  +         inheritAll="true"
  +         inheritRefs="false"
  +         target="roles"/>
  +  </target>
  +
  +  <!-- compiles and packages a single block -->
  +  <target name="block" depends="compile, prepare-blocks">
  +    <ant antfile="${build.temp}/blocks-build.xml"
  +         inheritAll="true"
  +         inheritRefs="false"
  +         target="{$block-name}-compile"/>
  +  </target>
  +  
  +  <!-- compiles and packages all blocks -->
  +  <target name="blocks" depends="compile,prepare-blocks">
       <ant antfile="${build.temp}/blocks-build.xml"
            inheritAll="true"
            inheritRefs="false"
  @@ -1045,14 +1058,6 @@
              extension=".txt"
              force="true"/>
     </target>
  -
  -<!-- Gump targets ========================================================== -->
  -
  -  <!-- Builds Core -->
  -  <target name="gump-core" depends="compile"/>
  -
  -  <!-- Builds Blocks -->
  -  <target name="gump-blocks" depends="blocks"/>
   
   <!-- Clean Targets ========================================================= -->
   
  
  
  
  1.5       +16 -2     cocoon-2.1/tools/src/blocks-build.xsl
  
  Index: blocks-build.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/tools/src/blocks-build.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- blocks-build.xsl  12 Mar 2003 11:08:59 -0000      1.4
  +++ blocks-build.xsl  15 Mar 2003 20:23:07 -0000      1.5
  @@ -51,6 +51,10 @@
           <xsl:attribute name="depends">init<xsl:for-each 
select="project[contains(@name,'cocoon-block-')]"><xsl:text>,</xsl:text><xsl:value-of 
select="@name"/>-patch</xsl:for-each></xsl:attribute>
         </target>
   
  +      <target name="roles">
  +        <xsl:attribute name="depends">init<xsl:for-each 
select="project[contains(@name,'cocoon-block-')]"><xsl:text>,</xsl:text><xsl:value-of 
select="@name"/>-roles</xsl:for-each></xsl:attribute>
  +      </target>
  +
         <target name="samples">
           <xsl:attribute name="depends">init<xsl:for-each 
select="project[contains(@name,'cocoon-block-')]"><xsl:text>,</xsl:text><xsl:value-of 
select="@name"/>-samples</xsl:for-each></xsl:attribute>
         </target>
  @@ -97,6 +101,14 @@
            <antcall target="{$block-name}-patches"/>
         </target>
         
  +      <target name="[EMAIL PROTECTED]" unless="unless.exclude.block.{$block-name}">
  +         <xsl:if test="depend">
  +            <xsl:attribute name="depends"><xsl:value-of 
select="@name"/><xsl:for-each select="depend[not(@version or 
contains(@project,'cocoon'))]"><xsl:text>,</xsl:text><xsl:value-of 
select="@project"/>-roles</xsl:for-each></xsl:attribute>
  +         </xsl:if>
  +
  +         <antcall target="{$block-name}-roles"/>
  +      </target>
  +           
         <target name="[EMAIL PROTECTED]" unless="unless.exclude.block.{$block-name}">
            <xsl:if test="depend">
               <xsl:attribute name="depends"><xsl:value-of 
select="@name"/><xsl:for-each select="depend[not(@version or 
contains(@project,'cocoon'))]"><xsl:text>,</xsl:text><xsl:value-of 
select="@project"/>-samples</xsl:for-each></xsl:attribute>
  @@ -160,8 +172,6 @@
               </fileset>
            </copy>
   
  -         <xpatch extension="xroles" 
directory="{string('${blocks}')}/{$block-name}/conf" 
configuration="{string('${build.dest}/org/apache/cocoon/cocoon.roles')}"/>
  -
            <!-- This is a little bit tricky:
                 As the javac task checks, if a src directory is available and
                 stops if its not available, we use the following property
  @@ -248,6 +258,10 @@
            </copy>
         </target>
   
  +       <target name="{$block-name}-roles">
  +         <xpatch directory="{string('${blocks}')}/{$block-name}/conf" 
extension="xroles" 
configuration="{string('${build.dest}/org/apache/cocoon/cocoon.roles')}"/>
  +      </target>
  +      
         <target name="{$block-name}-patches" depends="{$block-name}-prepare">
            <xpatch directory="{string('${build.blocks}')}/{$block-name}/conf" 
extension="xmap" configuration="{string('${build.webapp}')}/sitemap.xmap"/>
            <xpatch directory="{string('${build.blocks}')}/{$block-name}/conf" 
extension="xpipe" configuration="{string('${build.webapp}')}/sitemap.xmap"/>
  
  
  

Reply via email to