cedric      02/02/22 05:00:56

  Modified:    contrib/tiles build.xml build.properties.sample
                        build-webapps.xml build-webapp.xml
  Log:
  Improve Tiles build process (again).
  Remove some dependancies to avoid multiple compilations.
  
  Revision  Changes    Path
  1.5       +50 -110   jakarta-struts/contrib/tiles/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/tiles/build.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- build.xml 21 Feb 2002 06:33:07 -0000      1.4
  +++ build.xml 22 Feb 2002 13:00:56 -0000      1.5
  @@ -1,15 +1,14 @@
   <project name="Tiles" default="compile.library" basedir=".">
   
   <!--
  -        Struts main build.xml file for building everything related to Struts :
  -        - core Struts library
  +        Tiles main build.xml file for building everything related to Tiles :
  +        - core tiles library
           - documentation
           - Struts web apps
  -        - run unit tests
           - ...
   
           This script will delegate some of it's tasks to the other build*.xml
  -        scripts (build-webapps.xml, build-tests.xml, ...)
  +        scripts (build-webapps.xml, ...)
   -->
   
   
  @@ -24,17 +23,38 @@
                                         classes to compile against (currently,
                                         either version 2.2 or 2.3 supported).
   
  -        commons-lib.home              The path to the JAR files
  -                                      of the Jakarta Commons 
  +        commons-beanutils.jar         (required).  The path to the JAR file
  +                                      of the Jakarta Commons Beanutils
                                         package (version 1.0 or later).
   
  -        struts.libs                   (required). The path to the Struts
  +        commons-collections.jar       (required).  The path to the JAR file
  +                                      of the Jakarta Commons Collections
  +                                      package (version 1.0 or later).
  +
  +        commons-digester.jar          (required).  The path to the JAR file
  +                                      of the Jakarta Commons Digester
  +                                      package (version 1.0 or later).
  +
  +        commons-logging.jar           (required).  The path to the JAR file
  +                                      of the Jakarta Commons Logging
  +                                      package (version 1.0 or later).
  +
  +        struts.home                   (required). The path to the Struts
                                         library installation. .
   
  +        struts.libs                   (required). The directory containing 
  +                                      struts.jar and the associated TLD files.
  +                                                                       At least one 
of struts.home or struts.libs
  +                                                                       is required.
  +
           xerces.jar                    (optional) The path to the Xerces classes
                                         to copy.  This is required only when
                                         executing the "deploy.catalina" target.
   
  +        struts1.0.home                If specified, must be the directory 
  +                                           containing struts1.0
  +                                      struts.jar and the associated TLD files..
  +                                                                       
   -->
   
       <!-- Load local and user build preferences -->
  @@ -45,7 +65,6 @@
       <property name="catalina.home"   value="../jakarta-tomcat-4.0/build"/>
       <property name="jdbc20ext.jar"   value="../jdbc2_0-stdext.jar"/>
       <property name="servlet.jar"     value="../jakarta-servletapi/lib/servlet.jar"/>
  -    <property name="struts.libs"     value="${struts.home}/lib"/>
       <property name="xerces.jar"      value="../xml-xerces/xerces.jar"/>
   
   
  @@ -79,6 +98,9 @@
   
       <!-- Version of the project -->
       <property name="project.version" value="1.1-dev"/>
  +     
  +    <!-- Version of the project -->
  +    <property name="struts.libs" value="${struts.home}/lib"/>
   
   
   <!-- ========== Derived Properties ======================================== -->
  @@ -110,31 +132,25 @@
       <!-- Web directory -->
       <property name="web.dir" value="web"/>
   
  -    <!-- Compilation Classpath -->
  -    <path id="compile.classpath">
  -      <pathelement location="${servlet.jar}"/>
  +    <!-- Commons-* jar files -->
  +    <path id="commons-jars">
         <pathelement location="${commons-beanutils.jar}"/>
         <pathelement location="${commons-collections.jar}"/>
         <pathelement location="${commons-digester.jar}"/>
         <pathelement location="${commons-logging.jar}"/>
       </path>
   
  -    <path id="compile.classpath.struts1.1">
  +    <!-- Compilation Classpath -->
  +    <path id="compile.classpath">
         <pathelement location="${servlet.jar}"/>
         <pathelement location="${struts.libs}/struts.jar"/>
  -      <pathelement location="${commons-beanutils.jar}"/>
  -      <pathelement location="${commons-collections.jar}"/>
  -      <pathelement location="${commons-digester.jar}"/>
  -      <pathelement location="${commons-logging.jar}"/>
  +       <path refid="commons-jars" />
       </path>
   
  -    <path id="compile.classpath.struts1.1">
  +    <path id="compile.classpath.struts1.0">
         <pathelement location="${servlet.jar}"/>
         <pathelement location="${struts1.0.home}/lib/struts.jar"/>
  -      <pathelement location="${commons-beanutils.jar}"/>
  -      <pathelement location="${commons-collections.jar}"/>
  -      <pathelement location="${commons-digester.jar}"/>
  -      <pathelement location="${commons-logging.jar}"/>
  +       <path refid="commons-jars" />
       </path>
   
   
  @@ -166,24 +182,10 @@
   <!--
           Prepare static directories for web applications
   -->
  -    <target name="static.webapps">
  +    <target name="static.webapps" depends="init" >
           <ant antfile="build-webapps.xml" target="static"/>
       </target>
   
  -<!--
  -        Compile Libraries for each target
  --->
  -    <target name="compile.library" depends="init"
  -    description="Compile Tiles libraries">
  -
  -        <!-- for struts1.1 -->
  -         <antcall target="compile.clean.library.classes" />
  -         <antcall target="compile.library.struts1.1" />
  -        <!-- for struts1.0.X -->
  -         <antcall target="compile.clean.library.classes" />
  -         <antcall target="compile.library.struts1.0" />
  -    </target>
  -
   
   <!--
           Create directories and copy files required for building library
  @@ -217,32 +219,27 @@
       </target>
   
   <!--
  -        Create directories and copy files required for building library
  +        Compile Libraries for each target
   -->
  -    <target name="compile.clean.library.classes" depends="prepare.library" >
  -               <delete quiet="true">
  -                 <fileset dir="${build.home}/library/classes" 
includes="**/*.class"/>
  -               </delete>
  +    <target name="compile.library" 
depends="init,compile.library.struts1.1,compile.library.struts1.0"
  +    description="Compile Tiles libraries">
  +
       </target>
   
   <!--
           Compile  Tiles library for Struts1.1
   -->
  -    <target name="compile.library.struts1.1" if="struts.home"
  +    <target name="compile.library.struts1.1" if="struts.libs"
        depends="prepare.library"
        description="Compile Tiles library for Struts1.1">
   
  -        <antcall target="prepare.library" />
           <javac srcdir="${src.share.dir}"
               destdir="${build.home}/library/classes"
               debug="${compile.debug}"
               optimize="${compile.optimize}"
               deprecation="${compile.deprecation}">
             <classpath refid="compile.classpath"/>
  -          <classpath>
  -            <pathelement location="${struts.libs}/struts.jar"/>
  -          </classpath>
  -        </javac>
  +       </javac>
           <jar jarfile="${build.home}/library/${app.name}.jar"
               manifest="${conf.share.dir}/MANIFEST.MF"
               basedir="${build.home}/library/classes"
  @@ -256,20 +253,18 @@
        depends="prepare.library"
        description="Compile Tiles library for Struts1.0.x">
   
  -        <antcall target="prepare.library" />
  -
  +            <!-- Delete previous .class to enforce recompilation -->
  +         <delete quiet="true">
  +           <fileset dir="${build.home}/library/classes" includes="**/*.class"/>
  +         </delete>
           <property name="jar.name" value="${app.name}ForStruts1-0"/>
  -
           <javac srcdir="${src.share.dir}"
               destdir="${build.home}/library/classes"
               debug="${compile.debug}"
               optimize="${compile.optimize}"
               deprecation="${compile.deprecation}">
             <exclude name="org/apache/struts/tiles/TilesRequestProcessor.java" />
  -          <classpath refid="compile.classpath"/>
  -          <classpath>
  -            <pathelement location="${struts1.0.home}/lib/struts.jar"/>
  -          </classpath>
  +          <classpath refid="compile.classpath.struts1.0"/>
           </javac>
           <jar jarfile="${build.home}/library/${jar.name}.jar"
               manifest="${conf.share.dir}/MANIFEST.MF"
  @@ -280,60 +275,6 @@
       </target>
   
   <!--
  -        Procedure to compile library with struts1.0, if set
  --->
  -    <target name="proc.compile.library1.0" if="struts1.0.home" >
  -           <!-- delete classes to ensure new classes are compiled -->
  -               <delete>
  -                 <fileset dir="${build.home}/library/classes" 
includes="**/*.class"/>
  -               </delete>
  -         <antcall target="proc.compile.library" >
  -               <param name="build.lib.classes" 
value="${build.home}/library/classes" />
  -               <param name="compile.classpath" value="compile.classpath1.0" />
  -               <param name="app.name" value="${app.name}ForStruts1-0" />
  -             </antcall>
  -             <move file="${build.home}/library/${app.name}ForStruts1-0.jar" 
todir="${build.home}/library/struts1.0" />
  -     </target>
  -
  -<!--
  -        Procedure to compile library
  -             @param build.lib.classes directory where classes are compiled
  -             @param compile.classpath refid of classpath
  -             @param app.name name use for the resulting .jar
  --->
  -    <target name="proc.compile.library" >
  -        <javac srcdir="${src.share.dir}"
  -            destdir="${build.lib.classes}"
  -            debug="${compile.debug}"
  -            optimize="${compile.optimize}"
  -            deprecation="${compile.deprecation}">
  -          <classpath refid="${compile.classpath}"/>
  -        </javac>
  -        <copy todir="${build.lib.classes}">
  -            <fileset dir="${src.share.dir}" includes="**/*.properties"/>
  -        </copy>
  -        <copy todir="${build.lib.classes}">
  -            <fileset dir="${src.share.dir}" includes="**/*.dtd"/>
  -        </copy>
  -        <copy todir="${build.home}/library">
  -            <fileset dir="${conf.share.dir}" includes="*.dtd"/>
  -            <fileset dir="${conf.share.dir}" includes="*.tld"/>
  -        </copy>
  -        <style basedir="${doc.dir}"
  -            destdir="${build.home}/library"
  -            extension=".tld"
  -            style="stylesheets/tld.xsl"
  -            includes="*.xml"/>
  -        <copy todir="${build.lib.classes}/META-INF/tlds">
  -            <fileset dir="${build.home}/library" includes="*.tld"/>
  -        </copy>
  -        <jar jarfile="${build.home}/library/${app.name}.jar"
  -            manifest="${conf.share.dir}/MANIFEST.MF"
  -            basedir="${build.lib.classes}"
  -            includes="**"/>
  -    </target>
  -
  -<!--
           Compile code for web applications
   -->
       <target name="compile.webapps" depends="compile.library,static.webapps"
  @@ -350,14 +291,13 @@
           <mkdir dir="${build.home}/documentation/api"/>
           <javadoc sourcepath="${src.share.dir}"
               destdir="${build.home}/documentation/api"
  -            classpath="${servlet.jar}"
               packagenames="org.apache.struts.*"
               author="true"
               private="true"
               version="true"
               windowtitle="Tiles API Documentation"
               doctitle="&lt;h1&gt;Tiles Framework (Version 
${project.version})&lt;/h1&gt;"
  -            bottom="Copyright &#169; 2000-2001 - Cedric Dumoulin and Apache 
Software Foundation">
  +            bottom="Copyright &#169; 2000-2002 - Cedric Dumoulin and Apache 
Software Foundation">
                        <classpath refid="compile.classpath"/>
                        </javadoc>
       </target>
  
  
  
  1.5       +14 -1     jakarta-struts/contrib/tiles/build.properties.sample
  
  Index: build.properties.sample
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/tiles/build.properties.sample,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- build.properties.sample   18 Feb 2002 14:52:21 -0000      1.4
  +++ build.properties.sample   22 Feb 2002 13:00:56 -0000      1.5
  @@ -6,7 +6,7 @@
   # to "build.properties" in the same directory that contains the Struts
   # "build.xml" file.
   #
  -# $Id: build.properties.sample,v 1.4 2002/02/18 14:52:21 cedric Exp $
  +# $Id: build.properties.sample,v 1.5 2002/02/22 13:00:56 cedric Exp $
   # -----------------------------------------------------------------------------
   
   # WARNING:  The relative paths below assume that the build.xml file is in the
  @@ -38,6 +38,19 @@
   # The directory containing JAR files
   # from the Jakarta Commons project.
   commons-lib.home=../commons/lib
  +commons-beanutils.jar=${commons-lib.home}/commons-beanutils.jar
  +
  +# The JAR file containing version 1.0 (or later) of the Collections package
  +# from the Jakarta Commons project.
  +commons-collections.jar=${commons-lib.home}/commons-collections.jar
  +
  +# The JAR file containing version 1.0 (or later) of the Digester package
  +# from the Jakarta Commons project.
  +commons-digester.jar=${commons-lib.home}/commons-digester.jar
  +
  +# The JAR file containing version 1.0 (or later) of the Logging package
  +# from the Jakarta Commons project.
  +commons-logging.jar=${commons-lib.home}/commons-logging.jar
   
   # The directory containing your binary distribution of Tomcat 4.0 ("Catalina"
   # is the servlet container part of this distribution), from CVS module
  
  
  
  1.4       +158 -51   jakarta-struts/contrib/tiles/build-webapps.xml
  
  Index: build-webapps.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/tiles/build-webapps.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build-webapps.xml 18 Feb 2002 14:52:21 -0000      1.3
  +++ build-webapps.xml 22 Feb 2002 13:00:56 -0000      1.4
  @@ -26,11 +26,24 @@
           servlet.jar                   The pathname of the servlet API classes
                                         that you wish to compile against.
   
  -        commons-lib.home              The path to the JAR files
  -                                      of the Jakarta Commons 
  +        commons-beanutils.jar         (required).  The path to the JAR file
  +                                      of the Jakarta Commons Beanutils
                                         package (version 1.0 or later).
  -        struts.libs                   The directory containing struts.jar and
  -                                      the associated TLD files.
  +
  +        commons-collections.jar       (required).  The path to the JAR file
  +                                      of the Jakarta Commons Collections
  +                                      package (version 1.0 or later).
  +
  +        commons-digester.jar          (required).  The path to the JAR file
  +                                      of the Jakarta Commons Digester
  +                                      package (version 1.0 or later).
  +
  +        commons-logging.jar           (required).  The path to the JAR file
  +                                      of the Jakarta Commons Logging
  +                                      package (version 1.0 or later).
  +
  +        struts.libs                   (required).  The directory containing 
  +                                      struts.jar and the associated TLD files.
   
           tiles.libs                    The directory containing tiles.jar and
                                         the associated TLD files.
  @@ -39,6 +52,10 @@
                                         directory from which all available
                                         "*.jar" files are copied to the web
                                         application's WEB-INF/lib directory.
  +                                                                       
  +        struts1.0.home                If specified, must be the directory 
  +                                           containing struts1.0
  +                                      struts.jar and the associated TLD files..
   -->
   
   <property name="build.home"           value="target"/>
  @@ -70,7 +87,7 @@
   <!-- The base directory for distribution targets -->
   <property name="dist.home"             value="dist" />
   
  -<!-- Directory where core struts library configurations files are stored -->
  +<!-- Directory where core tiles library configurations files are stored -->
   <property name="conf.share.dir" value="conf/share"/>
   
   <!-- Doc directory -->
  @@ -86,13 +103,52 @@
   -->
   
   <!--
  +        The "static.optional.struts1.0" target causes the "static" target of 
  +        individual web application depending on struts1.0 to be executed.
  +             webapp.name : application name in dist
  +             webapp.war  : jar file name
  +             webapp.web  : webapp directory name in module
  +-->
  +<target name="static.optional.struts1.0" if="struts1.0.home" >
  +
  +    <!-- blank for struts1.0 -->
  +  <ant  antfile="build-webapp.xml"    target="static">
  +    <property name="webapp.name"      value="blank-struts1-0"/>
  +    <property name="webapp.web"      value="web/blank"/>
  +    <property name="struts.libs"    value="${struts1.0.home}/lib"/>
  +  </ant>
  +  <move file="${build.home}/blank-struts1-0/WEB-INF/web-struts.xml" 
  +      tofile="${build.home}/blank-struts1-0/WEB-INF/web.xml" />
  +  <replace file="${build.home}/blank-struts1-0/WEB-INF/struts-config.xml">
  +    <replacetoken><![CDATA[<!-- struts1.1 only begin -->]]></replacetoken>
  +    <replacevalue><![CDATA[<!-- struts1.1 only begin]]></replacevalue>
  +  </replace>
  +  <replace file="${build.home}/blank-struts1-0/WEB-INF/struts-config.xml">
  +    <replacetoken><![CDATA[<!-- struts1.1 only end -->]]></replacetoken>
  +    <replacevalue><![CDATA[     struts1.1 only end -->]]></replacevalue>
  +  </replace>
  +  <replace file="${build.home}/blank-struts1-0/WEB-INF/struts-config.xml">
  +    <replacefilter 
  +        token="Struts Configuration 1.1//EN" 
  +        value="Struts Configuration 1.0//EN"/>
  +    <replacefilter 
  +        token="struts-config_1_1.dtd" 
  +        value="struts-config_1_0.dtd"/>
  +             
  +     </replace>
  +  <delete file="${build.home}/blank-struts1-0/WEB-INF/lib/tiles.jar" />
  +  <copy file="${build.home}/library/struts1.0/tilesForStruts1-0.jar" 
  +       todir="${build.home}/blank-struts1-0/WEB-INF/lib" />
  +</target>
  +
  +<!--
           The "static.generic" target causes the "static" target of each
           individual web application to be executed.
                webapp.name : application name in dist
                webapp.war  : jar file name
                webapp.web  : webapp directory name in module
   -->
  -<target name="static.generic.optional" if="make.optional.webapps" >
  +<target name="static.optional" if="make.optional.webapps" >
     <ant  antfile="build-webapp.xml"    target="static">
       <property name="webapp.name"      value="template-example"/>
       <property name="webapp.web"      value="web/template"/>
  @@ -100,12 +156,27 @@
     <ant  antfile="build-webapp.xml"    target="static">
       <property name="webapp.name"      value="channel"/>
       <property name="webapp.web"      value="web/channel"/>
  +    <property name="webapp.src"      value="src/tutorial"/>
     </ant>
  +    <!-- blank -->
     <ant  antfile="build-webapp.xml"    target="static">
       <property name="webapp.name"      value="blank"/>
       <property name="webapp.web"      value="web/blank"/>
       <property name="struts.libs"    value="false"/>
     </ant>
  +  <delete file="${build.home}/blank/WEB-INF/struts-config.xml" />
  +  <delete file="${build.home}/blank/WEB-INF/web-struts.xml" />
  +    <!-- blank for struts1.1 -->
  +  <ant  antfile="build-webapp.xml"    target="static">
  +    <property name="webapp.name"      value="blank-struts1-1"/>
  +    <property name="webapp.web"      value="web/blank"/>
  +    <property name="struts.libs"    value="${struts.libs}"/>
  +  </ant>
  +  <move file="${build.home}/blank-struts1-1/WEB-INF/web-struts.xml" 
  +      tofile="${build.home}/blank-struts1-1/WEB-INF/web.xml" />
  +    <!-- 1.0 applications -->
  +  <antcall target="static.optional.struts1.0" />
  +
   </target>
   
   <!--
  @@ -115,10 +186,16 @@
                webapp.war  : jar file name
                webapp.web  : webapp directory name in module
   -->
  -<target name="static.generic" depends="static.generic.optional" >
  +<target name="static.required" >
  +    <!-- Copy DTDs for Tiles constructs -->
  +    <copy  todir="${build.home}/documentation/dtds">
  +      <fileset dir="${conf.share.dir}" includes="**/*.dtd"/>
  +    </copy>
  +     
     <ant  antfile="build-webapp.xml"    target="static">
       <property name="webapp.name"      value="documentation"/>
       <property name="webapp.web"       value="web/doc"/>
  +    <property name="webapp.src"       value="src/tutorial"/>
     </ant>
   </target>
   
  @@ -127,31 +204,21 @@
           The "static" target causes non-generic static activity required
           for specific tag libraries to be executed.
   -->
  -<target name="static.optional" if="make.optional.webapps"
  -        description="Copy optional static resources for individual web 
applications">
  -</target>
  -
  -<!--
  -        The "static" target causes non-generic static activity required
  -        for specific tag libraries to be executed.
  --->
  -<target name="static" depends="static.optional,static.generic"
  +<target name="static" 
           description="Copy static resources for individual web applications">
  -    <!-- Copy DTDs for Struts constructs -->
  -    <copy  todir="${build.home}/documentation/dtds">
  -      <fileset dir="${conf.share.dir}" includes="**/*.dtd"/>
  -    </copy>
  +     <antcall target="static.required" />
  +     <antcall target="static.optional" />
   </target>
   
   
   <!--
  -        The "compile.generic" target causes the "compile" target of each
  +        The "compile.optional" target causes the "compile" target of each
           individual web application to be executed.
                webapp.name : application name in dist
                webapp.war  : jar file name
                webapp.web  : webapp directory name in module
   -->
  -<target name="compile.generic.optional" if="make.optional.webapps" >
  +<target name="compile.optional" if="make.optional.webapps" >
     <ant  antfile="build-webapp.xml"    target="compile">
       <property name="webapp.name"      value="template-example"/>
       <property name="webapp.web"      value="web/template"/>
  @@ -167,31 +234,30 @@
       <property name="webapp.web"      value="web/blank"/>
       <property name="struts.libs"    value="false"/>
     </ant>
  +  <ant  antfile="build-webapp.xml"    target="compile">
  +    <property name="webapp.name"      value="blank-struts1-1"/>
  +    <property name="webapp.web"      value="web/blank"/>
  +  </ant>
  +  <ant  antfile="build-webapp.xml"    target="compile">
  +    <property name="webapp.name"      value="blank-struts1-0"/>
  +    <property name="webapp.web"      value="web/blank"/>
  +  </ant>
   </target>
   
   <!--
  -        The "compile.generic" target causes the "compile" target of each
  -        individual web application to be executed.
  +        The "compile.documentation" target causes the documentation to be 
  +             compiled.
                webapp.name : application name in dist
                webapp.war  : jar file name
                webapp.web  : webapp directory name in module
   -->
  -<target name="compile.generic" depends="compile.generic.optional" >
  +<target name="compile.documentation" >
     <ant  antfile="build-webapp.xml"    target="compile">
       <property name="webapp.name"      value="documentation"/>
       <property name="webapp.web"      value="web/doc"/>
          <!-- compile tutorial sources -->
       <property name="webapp.src"      value="src/tutorial/"/>
     </ant>
  -</target>
  -
  -
  -<!--
  -        The "compile" target causes non-generic compile activity required
  -        for specific tag libraries to be executed.
  --->
  -<target name="compile" depends="compile.generic"
  -        description="Compile individual web applications">
       <!-- Copy the basic documentation files -->
       <copy      todir="${build.home}/documentation/doc">
         <fileset   dir="${doc.dir}/html">
  @@ -215,9 +281,43 @@
              extension="Tags.html" style="stylesheets/tiles.xsl" 
includes="tiles*.xml"/>
       <!-- Create the xml documentation -->
       <style   basedir="${doc.dir}" destdir="${build.home}/documentation/doc"
  -           extension="Xml.html" style="stylesheets/tiles.xsl" includes="*.xml" 
excludes="tiles*.xml" />
  +           extension=".html" style="stylesheets/tiles.xsl" includes="*.xml" 
excludes="tiles*.xml" />
  +</target>
  +
  +
  +<!--
  +        The "compile.required" target causes non-generic compile activity required
  +        for specific tag libraries to be executed.
  +-->
  +<target name="compile.required" >
  +  <antcall target="compile.documentation" />
  +</target>
  +
  +<!--
  +        The "compile" target causes non-generic compile activity required
  +        for specific tag libraries to be executed.
  +-->
  +<target name="compile" 
  +        description="Compile individual web applications">
  +  <antcall target="compile.required" />
  +  <antcall target="compile.optional" />
   </target>
   
  +<!--
  +        The "dist.generic" target causes the "dist" target of each
  +        individual web application to be executed.
  +             webapp.name : application name in dist
  +             webapp.war  : jar file name
  +             webapp.web  : webapp directory name in module
  +-->
  +<target name="dist.optional.struts1.0" if="struts1.0.home" >
  +  <ant  antfile="build-webapp.xml"    target="dist">
  +    <property name="webapp.name"      value="blank-struts1-0"/>
  +    <property name="webapp.web"       value="web/blank"/>
  +    <property name="webapp.war"       value="tiles-blank-struts1-0.war"/>
  +    <property name="struts.libs"      value="${struts1.0.home}/lib"/>
  +  </ant>
  +</target>
   
   <!--
           The "dist.generic" target causes the "dist" target of each
  @@ -226,7 +326,7 @@
                webapp.war  : jar file name
                webapp.web  : webapp directory name in module
   -->
  -<target name="dist.generic.optional" if="make.optional.webapps" >
  +<target name="dist.optional" if="make.optional.webapps" >
     <ant  antfile="build-webapp.xml"    target="dist">
       <property name="webapp.name"      value="template-example"/>
       <property name="webapp.web"       value="web/template"/>
  @@ -243,6 +343,12 @@
       <property name="webapp.war"       value="tiles-blank.war"/>
       <property name="struts.libs"    value="false"/>
     </ant>
  +  <ant  antfile="build-webapp.xml"    target="dist">
  +    <property name="webapp.name"      value="blank-struts1-1"/>
  +    <property name="webapp.web"       value="web/blank"/>
  +    <property name="webapp.war"       value="tiles-blank-struts1-1.war"/>
  +  </ant>
  +  <antcall target="dist.optional.struts1.0" />
   </target>
   
   <!--
  @@ -252,7 +358,7 @@
                webapp.war  : jar file name
                webapp.web  : webapp directory name in module
   -->
  -<target name="dist.generic" depends="dist.generic.optional">
  +<target name="dist.required" >
     <ant  antfile="build-webapp.xml"    target="dist">
       <property name="webapp.name"      value="documentation"/>
       <property name="webapp.web"       value="web/doc"/>
  @@ -265,18 +371,24 @@
           The "dist" target causes non-generic dist activity required
           for specific tag libraries to be executed.
   -->
  -<target name="dist" depends="dist.generic"
  -        description="Create distribution output of web applications">
  +<target name="dist" description="Create distribution output of web applications">
  +  <antcall target="dist.required" />
  +  <antcall target="dist.optional" />
   </target>
   
   
  +
   <!--
           The "clean.generic" target causes the "clean" target of each
           individual web application to be executed.
                webapp.name : application name in dist
                webapp.web  : webapp directory name in module
   -->
  -<target name="clean.generic.optional" if="make.optional.webapps">
  +<target name="clean.generic" >
  +  <ant  antfile="build-webapp.xml"    target="clean">
  +    <property name="webapp.name"      value="documentation"/>
  +    <property name="webapp.web"      value="web/doc"/>
  +  </ant>
     <ant  antfile="build-webapp.xml"    target="clean">
       <property name="webapp.name"      value="template-example"/>
       <property name="webapp.web"      value="web/template"/>
  @@ -289,18 +401,13 @@
       <property name="webapp.name"      value="blank"/>
       <property name="webapp.web"      value="web/blank"/>
     </ant>
  -</target>
  -
  -<!--
  -        The "clean.generic" target causes the "clean" target of each
  -        individual web application to be executed.
  -             webapp.name : application name in dist
  -             webapp.web  : webapp directory name in module
  --->
  -<target name="clean.generic" depends="clean.generic.optional">
     <ant  antfile="build-webapp.xml"    target="clean">
  -    <property name="webapp.name"      value="documentation"/>
  -    <property name="webapp.web"      value="web/doc"/>
  +    <property name="webapp.name"      value="blank-struts1-1"/>
  +    <property name="webapp.web"      value="web/blank"/>
  +  </ant>
  +  <ant  antfile="build-webapp.xml"    target="clean">
  +    <property name="webapp.name"      value="blank-struts1-0"/>
  +    <property name="webapp.web"      value="web/blank"/>
     </ant>
   </target>
   
  
  
  
  1.4       +17 -5     jakarta-struts/contrib/tiles/build-webapp.xml
  
  Index: build-webapp.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/contrib/tiles/build-webapp.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- build-webapp.xml  21 Feb 2002 06:33:07 -0000      1.3
  +++ build-webapp.xml  22 Feb 2002 13:00:56 -0000      1.4
  @@ -45,8 +45,20 @@
           build.home                    Base directory into which we are building
                                         the Struts tiles.
   
  -        commons-lib.home              (required).  The path to the JAR files
  -                                      of the Jakarta Commons 
  +        commons-beanutils.jar         (required).  The path to the JAR file
  +                                      of the Jakarta Commons Beanutils
  +                                      package (version 1.0 or later).
  +
  +        commons-collections.jar       (required).  The path to the JAR file
  +                                      of the Jakarta Commons Collections
  +                                      package (version 1.0 or later).
  +
  +        commons-digester.jar          (required).  The path to the JAR file
  +                                      of the Jakarta Commons Digester
  +                                      package (version 1.0 or later).
  +
  +        commons-logging.jar           (required).  The path to the JAR file
  +                                      of the Jakarta Commons Logging
                                         package (version 1.0 or later).
   
           servlet.jar                   MUST be set to the pathname of the
  @@ -187,7 +199,7 @@
   
     <!-- Should we copy Tiles library and TLD files? -->
     <available property="webapp.tiles"    file="${tiles.libs}" />
  -
  +  
   </target>
   
   
  @@ -304,7 +316,7 @@
           application, if and only if the specified source directory
           actually exists.
   -->
  -<target name="compile" depends="static" if="hasSrcToCompile"
  +<target name="compile"  if="hasSrcToCompile" depends="init"
           description="Compile Java sources">
     <echo    message="Compiling webapp ${webapp.name}"/>
     <javac  srcdir="${webapp.src}"
  @@ -328,7 +340,7 @@
           your completed web application, suitable for deployment on any
           compatible servlet container.
   -->
  -<target name="dist" depends="compile"
  +<target name="dist" 
           description="Create web application archive">
     <echo    message="Processing webapp ${webapp.name}"/>
     <jar  jarfile="${webapp.dist}/${webapp.war}"
  
  
  

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

Reply via email to