cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.2/tools/targets init-build.xml webapp-build.xml
Date Tue, 16 Mar 2004 13:29:31 GMT
cziegeler    2004/03/16 05:29:31

  Modified:    tools/targets init-build.xml webapp-build.xml
  Log:
  Fix finally bug 27217 by using properties
  
  Revision  Changes    Path
  1.5       +50 -39    cocoon-2.2/tools/targets/init-build.xml
  
  Index: init-build.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/tools/targets/init-build.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- init-build.xml	10 Mar 2004 08:43:22 -0000	1.4
  +++ init-build.xml	16 Mar 2004 13:29:31 -0000	1.5
  @@ -29,12 +29,18 @@
       <property file="src/java/org/apache/cocoon/cocoon.properties"/>
   
       <!-- Detecting the current jvm -->
  +    <condition property="target.vm" value="1.5">
  +      <equals arg1="1.5" arg2="${ant.java.version}"/>
  +    </condition>
       <condition property="target.vm" value="1.4">
         <equals arg1="1.4" arg2="${ant.java.version}"/>
       </condition>
       <condition property="target.vm" value="1.3">
         <not>
  -        <equals arg1="1.4" arg2="${ant.java.version}"/>
  +        <or>
  +          <equals arg1="1.4" arg2="${ant.java.version}"/>
  +          <equals arg1="1.5" arg2="${ant.java.version}"/>
  +        </or>
         </not>
       </condition>
   
  @@ -63,26 +69,26 @@
       <condition property="unless.exclude.webapp.samples">
         <istrue value="${exclude.webapp.samples}"/>
       </condition>
  -    
  +
       <condition property="unless.exclude.deprecated">
         <istrue value="${exclude.deprecated}"/>
       </condition>
       <condition property="unless.exclude.javadocs">
         <istrue value="${exclude.javadocs}"/>
       </condition>
  -    <condition property="unless.exclude.idldocs">
  -      <istrue value="${exclude.idldocs}"/>
  +    <condition property="unless.exclude.validate.jars">
  +      <istrue value="${exclude.validate.jars}"/>
       </condition>
  -    <condition property="exclude.validate.jars">
  -      <isfalse value="${validate.jars}"/>
  +    <condition property="unless.exclude.validate.config">
  +      <istrue value="${exclude.validate.config}"/>
       </condition>
  -    <condition property="exclude.validate.config">
  -      <isfalse value="${validate.config}"/>
  -    </condition>
  -    <condition property="exclude.validate.xdocs">
  -      <isfalse value="${validate.xdocs}"/>
  +    <condition property="unless.exclude.validate.xdocs">
  +      <or>
  +        <istrue value="${exclude.validate.xdocs}"/>
  +        <istrue value="${exclude.documentation}"/>
  +      </or>
       </condition>
  -            
  +
       <filter token="Name"                value="${fullname}"/>
       <filter token="name"                value="${fullname}"/>
       <filter token="year"                value="${year}"/>
  @@ -91,6 +97,9 @@
       <filter token="released.version"    value="${released.version}"/>
       <filter token="loglevel"            value="${build.webapp.loglevel}"/>
   
  +    <!-- Alias for the loglevel -->
  +    <property name="loglevel" value="${build.webapp.loglevel}"/>
  +    
       <!-- Set classpath -->
       <path id="classpath">
         <fileset dir="${lib.local}">
  @@ -120,7 +129,7 @@
     </target>
   
     <target name="init-tasks" depends="init">
  -    
  +
       <!-- Set classpath for building ant tasks -->
       <path id="tasks.classpath">
         <path refid="classpath"/>
  @@ -143,18 +152,20 @@
              classpathref="tasks.classpath"/>
   
       <!-- A task to patch xml files -->
  -    <taskdef name="xpatch" classname="XConfToolTask" classpath="${tools.tasks.dest}"/>
  +    <taskdef name="xpatch" classname="XConfToolTask"
  +           classpath="${tools.tasks.dest}"/>
   
       <!-- Jing is used in various targets for XML validation with RELAX NG -->
  -    <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask" classpathref="tasks.classpath"/>
  +    <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask"
  +           classpathref="tasks.classpath"/>
   
       <!-- Fortress meta info task -->
  -    <taskdef 
  -      name="fortress-meta" 
  -      classname="org.apache.avalon.fortress.tools.ComponentMetaInfoCollector"
  -      classpathref="tasks.classpath"/>
  -    
  -    <!-- compile the loader, used to change classpath especially for the CLI and Jetty
-->
  +    <taskdef name="fortress-meta" 
  +            classname="org.apache.avalon.fortress.tools.ComponentMetaInfoCollector"
  +            classpathref="tasks.classpath"/>
  +
  +    <!-- compile the loader, used to change classpath especially for
  +           the CLI and Jetty -->
       <mkdir dir="${tools.loader.dest}"/>
       <javac srcdir="${tools.loader.src}"
              destdir="${tools.loader.dest}"
  @@ -166,31 +177,32 @@
              compiler="${compiler}"/>
   
     </target>
  -  
  -<!-- === Preparation Targets =================================================== -->
  +
  +<!-- === Preparation Targets ============================================= -->
   
     <!-- Prepare the build directory -->
     <target name="prepare" depends="init-tasks">
  -
  -    <echo>+-----------------------------------------------------------+</echo>
  -    <echo>             ${fullname} ${version} [${year}]</echo>
  -    <echo>+-----------------------------------------------------------+</echo>
  -    <echo> Building with ${ant.version}</echo>
  -    <echo> using build file ${ant.file}</echo>
  -    <echo> Compiling with debug ${compiler.debug}, optimize ${compiler.optimize},
deprecation ${compiler.deprecation}</echo>
  -    <echo>+--------------------| W A R N I N G |----------------------+</echo>
  -    <echo>   This build is targeted for use with JVM ${target.vm}</echo>
  -    <echo> Using this build on a virtual machine other than the one</echo>
  -    <echo>   it is targeted for may result in runtime errors.</echo>
  -    <echo>+-----------------------------------------------------------+</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>
       <mkdir dir="${build}"/>
     </target>
   
  -<!-- === Clean Targets ========================================================= -->
  +<!-- === Clean Targets =================================================== -->
   
     <!-- Clean -->
  -  <target name="clean" depends="clean-cocoon,clean-webapp,clean-standalone-demo" description="Cleans
the cocoon build, webapp and standalone-demo"/>
  +  <target name="clean"
  +         depends="clean-cocoon,clean-webapp,clean-standalone-demo"
  +         description="Cleans the cocoon build, webapp and standalone-demo"/>
   
     <!-- Clean the cocoon build directory -->
     <target name="clean-cocoon" depends="init" description="Cleans the cocoon build">
  @@ -207,4 +219,3 @@
       <delete dir="${build.standalone.demo}"/>
     </target>
   </project>
  -
  
  
  
  1.7       +11 -24    cocoon-2.2/tools/targets/webapp-build.xml
  
  Index: webapp-build.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/tools/targets/webapp-build.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- webapp-build.xml	15 Mar 2004 18:15:11 -0000	1.6
  +++ webapp-build.xml	16 Mar 2004 13:29:31 -0000	1.7
  @@ -37,7 +37,7 @@
       <copy todir="${build.webapp}/resources" filtering="off">
         <fileset dir="${webapp}/resources"/>
       </copy>
  -            
  +
       <copy todir="${build.webapp}/WEB-INF" filtering="on">
         <fileset dir="${webapp}/WEB-INF">
           <include name="entities/**"/>
  @@ -57,7 +57,7 @@
           <include name="*.jar"/>
           <exclude name="servlet*.jar"/>
         </fileset>
  -      <!-- Currently, we have no JVM dependent libraries 
  +      <!-- Currently, we have no JVM dependent libraries
           <fileset dir="${lib.core}/jvm${target.vm}">
             <include name="*.jar"/>
           </fileset>
  @@ -79,11 +79,11 @@
     <target name="prepare-webapp-deprecated" depends="prepare-webapp" unless="unless.exclude.deprecated">
       <copy file="${build}/${name}-deprecated.jar" tofile="${build.webapp.lib}/${name}-${version}-deprecated.jar"/>
       <xpatch file="${build.webapp}/WEB-INF/cocoon.xconf"
  -            srcdir="${deprecated.conf}" 
  +            srcdir="${deprecated.conf}"
               includes="**/*.xconf"
               addComments="true"/>
     </target>
  -  
  +
     <target name="prepare-webapp-javadocs" depends="javadocs" unless="unless.exclude.webapp.javadocs">
       <mkdir dir="${build.webapp.javadocs}"/>
   
  @@ -93,15 +93,15 @@
   
       <!-- patch the welcome page to tell we have javadocs to show -->
       <xpatch file="${build.webapp}/welcome.xml"
  -            srcdir="${resources.javadoc}" 
  -            includes="**/*.xwelcome"/>    
  +            srcdir="${resources.javadoc}"
  +            includes="**/*.xwelcome"/>
     </target>
     <!-- disable docs
     <target name="prepare-webapp-docs" depends="init,validate-xdocs,validate-jars" unless="unless.exclude.webapp.documentation">
     -->
     <target name="prepare-webapp-docs" depends="init,validate-jars" unless="unless.exclude.webapp.documentation">
       <mkdir dir="${build.webapp.docs}"/>
  -    
  +
       <copy todir="${build.webapp.docs}" filtering="on">
         <fileset dir="${documentation}">
           <exclude name="**/*.jpg"/>
  @@ -116,7 +116,7 @@
         tofile="${build.webapp.docs}/xdocs/status.xml" filtering="on"/>
       <!-- Copy the docs about all jar files (this requires a dependency to validate-jars)
-->
       <copy file="${build.temp}/jars.xml"
  -      tofile="${build.webapp.docs}/xdocs/installing/jars.xml" 
  +      tofile="${build.webapp.docs}/xdocs/installing/jars.xml"
         filtering="off" failonerror="false" overwrite="true"/>
   
       <!-- Forrest needs its own file at src/documentation/sitemap.xmap, so we
  @@ -134,24 +134,11 @@
   
       <!-- patch the welcome page to tell we have documentation to show -->
       <xpatch file="${build.webapp}/welcome.xml"
  -            srcdir="${documentation}" 
  -            includes="**/*.xwelcome"/>    
  +            srcdir="${documentation}"
  +            includes="**/*.xwelcome"/>
     </target>
  -  
  +
     <target name="webapp" depends="prepare-webapp,prepare-webapp-samples,prepare-webapp-docs,prepare-webapp-javadocs,prepare-webapp-deprecated,validate-jars,validate-config,custom-conf"
description="Builds web application folder">
  -    <!-- Filter the patched files again to eventually apply filtering to patched blocks
-->
  -    <copy file="${build.webapp}/sitemap.xmap"
  -          tofile="${build.webapp}/sitemap.xmap"
  -          overwrite="true" filtering="on"/>
  -    <copy file="${build.webapp}/WEB-INF/cocoon.xconf"
  -          tofile="${build.webapp}/WEB-INF/cocoon.xconf"
  -          overwrite="true" filtering="on"/>
  -    <copy file="${build.webapp}/WEB-INF/logkit.xconf"
  -          tofile="${build.webapp}/WEB-INF/logkit.xconf"
  -          overwrite="true" filtering="on"/>
  -    <copy file="${build.webapp}/WEB-INF/web.xml"
  -          tofile="${build.webapp}/WEB-INF/web.xml"
  -          overwrite="true" filtering="on"/>
     </target>
   
     <target name="war" depends="webapp" description="Builds web application archive">
  
  
  

Mime
View raw message