costin      2002/10/15 13:44:59

  Modified:    .        build.xml
  Log:
  More 'fast-build' targets.
  
  I intend to remove the compilation part of build2.xml, and move
  the rest in other places ( ant-launcher.xml ? ). While it's very
  fast, it is also too hard to maintain.
  
  The current solution is a bit slower, but it uses the original
  build.xml files for each component.
  
  What I'm doing is simply call the build.xml with the build
  dir and .jar target pointing to our build and the final destination.
  That avoids file copy.
  In addition it uses <uptodate> to avoid recompiling what doesn't
  change.
  
  After a full build, I get a second one in ~10-15 sec, and then it
  seems to work fine and compile only what changed.
  It is also possible to call individual targets.
  
  That's for people with <2GHz processors only :-)
  
  Revision  Changes    Path
  1.45      +59 -16    jakarta-tomcat-5/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-5/build.xml,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- build.xml 14 Oct 2002 23:09:44 -0000      1.44
  +++ build.xml 15 Oct 2002 20:44:59 -0000      1.45
  @@ -87,6 +87,21 @@
         <srcfiles dir="${jtc.home}/util/java" includes="**" />
       </uptodate>
   
  +    <uptodate property="tomcatjk.build.notrequired"
  +              targetfile="${tomcat.build}/server/lib/tomcat-jk2.jar">
  +      <srcfiles dir="${jtc.home}/jk/java" includes="**" />
  +    </uptodate>
  +
  +    <uptodate property="tomcatcoyote.build.notrequired"
  +              targetfile="${tomcat.build}/server/lib/tomcat-coyote.jar">
  +      <srcfiles dir="${jtc.home}/coyote/src" includes="**" />
  +    </uptodate>
  +
  +    <uptodate property="admin.build.notrequired" 
  +              targetfile="${tomcat.build}/server/webapps/admin/WEB-INF/web.xml">
  +      <srcfiles dir="${catalina.home}/webapps/admin" includes="**" />
  +    </uptodate>
  +
     </target>
   
   
  @@ -125,18 +140,20 @@
       </ant>
     </target>
   
  -  <target name="build" depends="init,build-servletapi,build-jspapi,build-tomcatutil"
  -          description="Builds all components">
  -
  -    <echo>========== Building: catalina </echo>
  +  <target name="build-tomcatjk" unless="tomcatjk.build.notrequired" >
  +    <echo>========== Building: tomcat-jk </echo>
   
  -    <ant dir="${catalina.home}/catalina" target="catalina-jars">
  -        <!-- in-place building -->
  -        <property name="catalina.build" value="${tomcat.build}" />
  -        <property name="catalina.deploy" value="${tomcat.build}" />
  -        <property name="flags.hide" value="true" />
  +    <ant dir="${jtc.home}/jk" target="build-main">
  +      <property name="tomcat41.home" value="${tomcat.build}"/>
  +      <property name="catalina.home" value="${tomcat.build}"/>
  +      <property name="commons-logging.jar" value="${commons-logging.jar}"/>
  +      <property name="jmx.jar" value="${jmx.jar}"/>
       </ant>
  +  </target>
   
  +  <target name="build-tomcatcoyote" 
  +          unless="tomcatcoyote.build.notrequired" 
  +          depends="init">
       <echo>========== Building: tomcat-coyote </echo>
   
       <ant dir="${jtc.home}/coyote" target="compile.tomcat5">
  @@ -144,16 +161,41 @@
         <property name="tomcat5.detect" value="true"/>
         <property name="servlet.jar"   value="${servlet-api.jar}"/>
       </ant>
  +  </target>
   
  -    <echo>========== Building: tomcat-jk </echo>
   
  -    <ant dir="${jtc.home}/jk" target="build-main">
  -      <property name="tomcat41.home" value="${tomcat.build}"/>
  -      <property name="catalina.home" value="${tomcat.build}"/>
  -      <property name="commons-logging.jar" value="${commons-logging.jar}"/>
  -      <property name="jmx.jar" value="${jmx.jar}"/>
  +  <target name="build-admin" unless="admin.build.notrequired" 
  +          depends="init" >
  +    <echo>========== Building: admin ( ${admin.build.notrequired} ) </echo>
  +    <ant dir="${catalina.home}/webapps/admin" target="build-main">
  +      <!-- property name="flags.hide" value="true" / -->
  +      <property name="webapps.build" value="${tomcat.build}/server/webapps"/>
       </ant>
   
  +    <touch file="${tomcat.build}/server/webapps/admin/WEB-INF/web.xml" />
  +  </target>
  +
  +
  +  <target name="build" depends="init"
  +          description="Builds all components">
  +
  +    <antcall target="build-servletapi"/>
  +    <antcall target="build-jspapi"/>
  +    <antcall target="build-tomcatutil"/>
  +
  +    <echo>========== Building: catalina </echo>
  +
  +    <ant dir="${catalina.home}/catalina" target="catalina-jars">
  +        <!-- in-place building -->
  +        <property name="catalina.build" value="${tomcat.build}" />
  +        <property name="catalina.deploy" value="${tomcat.build}" />
  +        <property name="flags.hide" value="true" />
  +    </ant>
  +
  +    <antcall target="build-tomcatcoyote"/>
  +
  +    <antcall target="build-tomcatjk"/>
  +      
       <echo>========== Building: tomcat-httpd </echo>
   
       <ant dir="${jtc.home}/http11" target="compile">
  @@ -702,7 +744,8 @@
   
     <!-- ==================== Download or build the required binary packages 
==================== -->
   
  -  <target name="download" depends="proxyflags">
  +  <target name="download" depends="proxyflags" 
  +          description="Download binary packages" >
   
       <!-- commons-digester needs ../LICENSE -->
       <!-- That is ugly XXX needs a review -->
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to