forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: xml-forrest/src/resources/forrest-shbat forrest.build.xml
Date Fri, 03 Oct 2003 10:05:23 GMT
nicolaken    2003/10/03 03:05:23

  Modified:    .        build.xml
               src/resources/forrest-shbat forrest.build.xml
  Log:
        <action dev="NKB" type="update" context="shbat">
            Removed duplicated copying of files during the creation of the shbat
            distro. Now the shbat context dir is like the webapp context dir.
            This reduces Forrest build time from 53 to 19 seconds on my system.
        </action>
  
  Revision  Changes    Path
  1.76      +34 -63    xml-forrest/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/build.xml,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- build.xml	30 Sep 2003 16:55:26 -0000	1.75
  +++ build.xml	3 Oct 2003 10:05:23 -0000	1.76
  @@ -67,14 +67,20 @@
       <property name="tools.dir"             location="tools"/>
       <property name="tools.jar"             location="${java.home}/../lib/tools.jar"/>
       <available file="${tools.jar}"         property="tools.jar.present"/>
  -
  +    
  +    <property name="fresh-site.zip" value="${dist-shbat.dir}/fresh-site.zip" />
  +    <property name="bare-context.dir" value="${dist-shbat.dir}/context" />
  +    <property name="webapp.webinf.dir" value="${bare-context.dir}/WEB-INF" />
  +    <property name="webapp.webinf.lib.dir" value="${webapp.webinf.dir}/lib" />
  +    
  +    <mkdir dir="${build.dir}"/>
  +    
       <path id="classpath">
         <fileset dir="src/scratchpad/lib" includes="**/*.jar"/>
         <fileset dir="lib" includes="**/*.jar"/>
         <pathelement location="${tools.jar}"/>
       </path>
  -
  -    <mkdir dir="${build.dir}"/>
  +    
     </target>
   
     <target name="clean" depends="init" description="Delete all generated files">
  @@ -207,21 +213,14 @@
     <!-- Make the zip that holds what a fresh site should look like          -->
     <!-- =================================================================== -->
     <target name="fresh-site-zip" depends="init">
  -    <!-- TODO: decide on a better place to read/set this prop from/to -->
  -    <property name="fresh-site.zip" value="./build/fresh-site.zip" />
       <zip destfile="${fresh-site.zip}" basedir="${resource.dir}/fresh-site" />
     </target>
   
  -
     <!-- =================================================================== -->
     <!-- Make the WEB-INF directory like cocoon (CLI or webapp) needs it     -->
     <!-- Note that @tokens@ in config files will be unexpanded.              -->
     <!-- =================================================================== -->
     <target name="webapp-webinf" depends="init, scratchpad.jar, components.jar" >
  -    <!-- TODO: decide on a better place to read/set this prop from/to -->
  -    <property name="webapp.webinf.dir" value="./build/WEB-INF" />
  -
  -    <mkdir dir="${webapp.webinf.dir}" />
       <copy todir="${webapp.webinf.dir}" >
         <fileset dir="${resource.dir}/conf" >
           <exclude name="*.xmap" />
  @@ -234,31 +233,30 @@
         <fileset dir="${resource.dir}/schema">
           <include name="CatalogManager.properties"/>
         </fileset>
  -      <!--
  -      <fileset dir="${build.classes}">
  -        <include name="**/*.class"/>
  -      </fileset>
  -      <fileset dir="${build.scratchpad.classes}">
  -        <include name="**/*.class"/>
  -      </fileset>
  -      -->
       </copy>
   
       <!-- Temporary hack to stop Cocoon rewriting extensions -->
       <mkdir dir="${webapp.webinf.dir}/classes/org/apache/cocoon/util"/>
       <touch file="${webapp.webinf.dir}/classes/org/apache/cocoon/util/mime.types"/>
   
  -    <mkdir dir="${webapp.webinf.dir}/lib"/>
  -    <copy todir="${webapp.webinf.dir}/lib">
  -      <!--
  +
  +    <!-- TODO: reduce jar copying -->
  +    <copy todir="${dist-shbat.dir}/lib/endorsed">
  +      <fileset dir="./lib/endorsed"    />
  +    </copy>
  +
  +    <copy todir="${dist-shbat.dir}/lib/optional">
  +      <fileset dir="./lib/optional"/>
  +    </copy>
  +    
  +    <copy todir="${webapp.webinf.lib.dir}">
         <fileset dir="./lib/endorsed"    />
         <fileset dir="./lib/optional"/>
  -      -->
         <fileset dir="./lib/core"/>
         <fileset dir="./src/scratchpad/lib"/>
  -      <fileset dir="${build.scratchpad.dir}" includes="*.jar"/>
  -      <fileset dir="${build.components.dir}" includes="*.jar"/>
       </copy>
  +        
  +    
     </target>
   
   
  @@ -266,9 +264,7 @@
     <!-- Make the bare context directory like cocoon (CLI or webapp) needs it-->
     <!-- =================================================================== -->
     <target name="bare-context-dir" depends="init" >
  -    <!-- TODO: decide on a better place to read/set this prop from/to -->
  -    <property name="bare-context.dir" value="./build/bare-context" />
  -
  +    
       <!-- Copy entity catalog, entities and class files -->
       <copy todir="${bare-context.dir}/resources/schema" >
         <fileset dir="${resource.dir}/schema"/>
  @@ -350,18 +346,18 @@
     <!-- =================================================================== -->
     <!-- Make the shell-bat distribution                                     -->
     <!-- =================================================================== -->
  -  <target name="dist-shbat" 
  -    depends="init, validate-config, fresh-site-zip, webapp-webinf, bare-context-dir" >
  -    <!-- TODO: decide on a better place to read/set this prop from/to -->
  -
  +  <target name="dist-shbat-init">
       <!-- fresh drop-off location for the distribution -->
       <delete dir="${dist-shbat.dir}" />
       <mkdir dir="${dist-shbat.dir}" />
  -
  -    <!-- copy the ant script at the heart of the distribution -->
  -    <!--
  -    <copy todir="${dist-shbat.dir}" file="forrest.build.xml" />
  -    -->
  +    <mkdir dir="${dist-shbat.dir}"/>
  +    <mkdir dir="${bare-context.dir}" />
  +    <mkdir dir="${webapp.webinf.dir}" />
  +    <mkdir dir="${webapp.webinf.lib.dir}" />
  +  </target>
  +  
  +  <target name="dist-shbat" 
  +    depends="init, dist-shbat-init, validate-config, fresh-site-zip, webapp-webinf, bare-context-dir"
>
   
       <!-- copy the prepared and wrapper stuff for the distribution -->
       <copy todir="${dist-shbat.dir}">
  @@ -373,25 +369,6 @@
         <fileset dir="./legal" />
       </copy>
   
  -    <!-- copy the fresh-site.zip to clone from -->
  -    <copy todir="${dist-shbat.dir}" file="${fresh-site.zip}" />
  -
  -    <!-- copy the web-inf as needed by the cocoon CLI -->
  -    <mkdir dir="${dist-shbat.dir}/WEB-INF" />
  -    <copy todir="${dist-shbat.dir}/WEB-INF">
  -      <fileset dir="${webapp.webinf.dir}" />
  -    </copy>
  -
  -    <mkdir dir="${dist-shbat.dir}/lib/endorsed" />
  -    <copy todir="${dist-shbat.dir}/lib/endorsed">
  -      <fileset dir="lib/endorsed" />
  -    </copy>
  -
  -    <mkdir dir="${dist-shbat.dir}/lib/optional" />
  -    <copy todir="${dist-shbat.dir}/lib/optional">
  -      <fileset dir="lib/optional" />
  -    </copy>
  -
       <!-- Copy Ant jars, so the shbat distribution is self-contained -->
       <mkdir dir="${dist-shbat.dir}/ant" />
       <copy todir="${dist-shbat.dir}/ant">
  @@ -422,12 +399,6 @@
       <fixcrlf eol="lf" srcdir="${dist-shbat.dir}/ant/bin" excludes="*.bat"/>
       <chmod dir="${dist-shbat.dir}/ant/bin" perm="ugo+rx" excludes="*.bat"/> 
   
  -    <!-- copy the bare-context dir as needed by the cocoon CLI -->
  -    <mkdir dir="${dist-shbat.dir}/context" />
  -    <copy todir="${dist-shbat.dir}/context">
  -      <fileset dir="${bare-context.dir}" />
  -    </copy>
  -
       <echo>
     *-----------------------------------------------------------------
     | installation notice 
  @@ -547,7 +518,7 @@
     <!-- =================================================================== -->
     <target name="scratchpad.jar" depends="scratchpad.compile">
       <mkdir dir="${build.scratchpad.dir}"/>
  -    <jar destfile="${build.scratchpad.dir}/xml-forrest-scratchpad.jar"
  +    <jar destfile="${webapp.webinf.dir}/lib/xml-forrest-scratchpad-${version}.jar"
         basedir="${build.scratchpad.classes}"/>
     </target>
   
  @@ -572,7 +543,7 @@
     <!-- =================================================================== -->
     <target name="components.jar" depends="components.compile">
       <mkdir dir="${build.components.dir}"/>
  -    <jar destfile="${build.components.dir}/xml-forrest-components.jar"
  +    <jar destfile="${webapp.webinf.dir}/lib/xml-forrest-components-${version}.jar"
         basedir="${build.components.classes}"/>
     </target>
   
  
  
  
  1.108     +8 -8      xml-forrest/src/resources/forrest-shbat/forrest.build.xml
  
  Index: forrest.build.xml
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrest-shbat/forrest.build.xml,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- forrest.build.xml	2 Oct 2003 20:28:11 -0000	1.107
  +++ forrest.build.xml	3 Oct 2003 10:05:23 -0000	1.108
  @@ -25,7 +25,7 @@
     
     <taskdef name="jing" classname="com.thaiopensource.relaxng.util.JingTask">
       <classpath>
  -      <fileset dir="${forrest.home}/WEB-INF/lib" includes="*.jar" />
  +      <fileset dir="${forrest.home}/context/WEB-INF/lib" includes="*.jar" />
       </classpath>
     </taskdef>
   
  @@ -297,10 +297,10 @@
       <path id="forrest.cp">
         <pathelement location="${project.ctxt-dir}/WEB-INF/classes"/>
         <fileset dir="${project.ctxt-dir}/WEB-INF/lib" includes="*.jar"/>
  -      <pathelement location="${forrest.home}/WEB-INF/classes"/>
  +      <pathelement location="${forrest.home}/context/WEB-INF/classes"/>
         <fileset dir="${forrest.home}/lib/optional" includes="servlet-2.3.jar"/>
         <fileset dir="${forrest.home}/lib/endorsed" includes="*.jar"/>
  -      <fileset dir="${forrest.home}/WEB-INF/lib" includes="*.jar" />
  +      <fileset dir="${forrest.home}/context/WEB-INF/lib" includes="*.jar" />
         <pathelement location="${tools.jar}"/>
       </path>
     </target>
  @@ -379,7 +379,7 @@
   
       <!-- Force-copy these files as they have @tokens@ that will need replacing -->
       <copy todir="${project.ctxt-dir}/WEB-INF" filtering="true" overwrite="true">
  -      <fileset dir="${forrest.home}/WEB-INF">
  +      <fileset dir="${forrest.home}/context/WEB-INF">
           <include name="*.xconf" />
         </fileset>
       </copy>
  @@ -732,7 +732,7 @@
       <!-- this will need revisions in the case of the siteplan
       extra project-custom classes then will need to be warred in as well. -->
       <mkdir dir="${project.webapp}/WEB-INF"/>
  -    <copy file="${forrest.home}/WEB-INF/web.xml" filtering="true" 
  +    <copy file="${forrest.home}/context/WEB-INF/web.xml" filtering="true" 
         todir="${project.webapp}/WEB-INF"/>
       <copy todir="${project.webapp}" preservelastmodified="true">
         <fileset dir="${project.ctxt-dir}" >
  @@ -742,7 +742,7 @@
   
       <copy todir="${project.webapp}/WEB-INF">
         <!-- Note: no overwriting, so user's libs and classes get preference -->
  -      <fileset dir="${forrest.home}/WEB-INF">
  +      <fileset dir="${forrest.home}/context/WEB-INF">
           <include name="lib/**"/>
           <include name="classes/**"/>
         </fileset>
  @@ -814,7 +814,7 @@
          =============================================================== -->
     <target name="seed" depends="ensure-nocontent"
       description="Seeds a directory with a template project doc structure">
  -    <unzip src="${forrest.home}/fresh-site.zip" 
  +    <unzip src="${forrest.home}/context/fresh-site.zip" 
         dest="${project.home}"
         overwrite="false"/>
       <echo>
  
  
  

Mime
View raw message