You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by jr...@apache.org on 2002/10/29 18:12:29 UTC

cvs commit: jakarta-cactus/Eclipse-Plugin/ant build-war.xml

jruaux      2002/10/29 09:12:29

  Modified:    Eclipse-Plugin/ant/build build-tests-orion-15.xml
                        build-tests-weblogic-61.xml
                        build-tests-orion-14.xml build-tests-resin-20.xml
                        build-tests-weblogic-70.xml build.xml
                        build-share.xml build-tests-resin-13.xml
                        build-tests-tomcat-40.xml build-tests-orion-16.xml
  Added:       Eclipse-Plugin/ant build-war.xml
  Log:
  Modified ant scripts for generic ant provider
  
  Revision  Changes    Path
  1.2       +1 -1      jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-orion-15.xml
  
  Index: build-tests-orion-15.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-orion-15.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build-tests-orion-15.xml	24 Oct 2002 12:37:35 -0000	1.1
  +++ build-tests-orion-15.xml	29 Oct 2002 17:12:28 -0000	1.2
  @@ -82,7 +82,7 @@
          ========================================================================
       -->
       <target name="prepare.test.orion.15"
  -        depends="check.test.orion.15,testwar" if="orion.home.15">
  +        depends="check.test.orion.15" if="orion.home.15">
   
           <echo message="orion.home.15 = ${orion.home.15}"/>
   
  
  
  
  1.2       +1 -1      jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-weblogic-61.xml
  
  Index: build-tests-weblogic-61.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-weblogic-61.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build-tests-weblogic-61.xml	24 Oct 2002 12:37:35 -0000	1.1
  +++ build-tests-weblogic-61.xml	29 Oct 2002 17:12:28 -0000	1.2
  @@ -103,7 +103,7 @@
          ========================================================================
       -->
       <target name="prepare.test.weblogic.61"
  -        depends="check.test.weblogic.61,testwar" if="weblogic.home.61">
  +        depends="check.test.weblogic.61" if="weblogic.home.61">
   
           <echo message="weblogic.home.61 = ${weblogic.home.61}"/>
   
  
  
  
  1.2       +1 -1      jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-orion-14.xml
  
  Index: build-tests-orion-14.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-orion-14.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build-tests-orion-14.xml	24 Oct 2002 12:37:35 -0000	1.1
  +++ build-tests-orion-14.xml	29 Oct 2002 17:12:28 -0000	1.2
  @@ -81,7 +81,7 @@
          ========================================================================
       -->
       <target name="prepare.test.orion.14"
  -        depends="check.test.orion.14,testwar" if="orion.home.14">
  +        depends="check.test.orion.14" if="orion.home.14">
   
           <echo message="orion.home.14 = ${orion.home.14}"/>
   
  
  
  
  1.2       +1 -1      jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-resin-20.xml
  
  Index: build-tests-resin-20.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-resin-20.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build-tests-resin-20.xml	24 Oct 2002 12:37:35 -0000	1.1
  +++ build-tests-resin-20.xml	29 Oct 2002 17:12:28 -0000	1.2
  @@ -92,7 +92,7 @@
          ========================================================================
       -->
       <target name="prepare.test.resin.20"
  -        depends="check.test.resin.20,testwar" if="resin.home.20">
  +        depends="check.test.resin.20" if="resin.home.20">
   
           <echo message="resin.home.20 = ${resin.home.20}"/>
   
  
  
  
  1.2       +1 -1      jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-weblogic-70.xml
  
  Index: build-tests-weblogic-70.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-weblogic-70.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build-tests-weblogic-70.xml	24 Oct 2002 12:37:35 -0000	1.1
  +++ build-tests-weblogic-70.xml	29 Oct 2002 17:12:28 -0000	1.2
  @@ -102,7 +102,7 @@
          ========================================================================
       -->
       <target name="prepare.test.weblogic.70"
  -        depends="check.test.weblogic.70,testwar" if="weblogic.home.70">
  +        depends="check.test.weblogic.70" if="weblogic.home.70">
   
           <echo message="weblogic.home.70 = ${weblogic.home.70}"/>
   
  
  
  
  1.2       +15 -0     jakarta-cactus/Eclipse-Plugin/ant/build/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/Eclipse-Plugin/ant/build/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml	24 Oct 2002 12:37:35 -0000	1.1
  +++ build.xml	29 Oct 2002 17:12:28 -0000	1.2
  @@ -85,7 +85,22 @@
           depends="test.resin.20,test.resin.13,test.tomcat.40,test.orion.14,test.orion.15,test.orion.16,test.weblogic.61,test.weblogic.70"
           description="Run tests on all defined containers">
       </target>
  +    
  +    <target name="prepare.all"
  +        depends="init, prepare.test.tomcat.40"
  +        description="Prepare tests on all defined containers">
  +    </target>
   
  +    <target name="start.all"
  +        depends="start.tomcat.40"
  +        description="Start all defined containers">
  +    </target>
  +
  +    <target name="stop.all"
  +        depends="stop.tomcat.40"
  +        description="Start all defined containers">
  +    </target>
  +    
       &build-tests-resin-20;
       &build-tests-resin-13;
       &build-tests-orion-14;
  
  
  
  1.2       +1 -127    jakarta-cactus/Eclipse-Plugin/ant/build/build-share.xml
  
  Index: build-share.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/Eclipse-Plugin/ant/build/build-share.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build-share.xml	24 Oct 2002 12:37:35 -0000	1.1
  +++ build-share.xml	29 Oct 2002 17:12:28 -0000	1.2
  @@ -164,7 +164,7 @@
            Initialize the build. Must be called by all targets
          ========================================================================
       -->
  -    <target name="init" depends="check.properties">
  +    <target name="init">
   
           <tstamp/>
   
  @@ -175,66 +175,6 @@
           <filter token="year" value="${year}"/>
           <filter token="test.port" value="${test.port}"/>
   
  -        <!-- Initialize Cactus custom Ant task needed for running the server
  -             tests -->
  -        <taskdef name="runservertests"
  -            classname="org.apache.cactus.ant.RunServerTestsTask">
  -            <classpath>
  -                <pathelement location="${cactus.ant.jar}"/>
  -            </classpath>
  -        </taskdef>
  -
  -    </target>
  -
  -    <!--
  -       ========================================================================
  -         Compiles the sources
  -       ========================================================================
  -    -->
  -    <!-- Compiles the sample sources -->
  -    <target name="compile" depends="init">
  -
  -        <mkdir dir="${target.classes.dir}"/>
  -
  -        <javac destdir="${target.classes.dir}"
  -          deprecation="${deprecation}" optimize="${optimize}">
  -
  -            <src path="${src.dir}"/>
  -
  -            <classpath>
  -                <path refid="project.class.path"/>
  -            </classpath>
  -
  -        </javac>
  -
  -    </target>
  -
  -    <!--
  -       ========================================================================
  -         Create the runtime war file
  -       ========================================================================
  -    -->
  -    <target name="war" depends="compile" description="Generate the runtime war">
  -
  -        <mkdir dir="${target.conf.client.dir}"/>
  -
  -        <!-- Copy the manifest in order to replace the version token filter -->
  -        <copy todir="${target.conf.client.dir}" filtering="on">
  -            <fileset dir="${conf.dir}" >
  -                <include name="manifest"/>
  -            </fileset>
  -        </copy>
  -
  -        <war warfile="${target.dir}/${sample.war.name}.war"
  -             webxml="${conf.dir}/web.xml"
  -             manifest="${target.conf.client.dir}/manifest">
  -
  -            <classes dir="${target.classes.dir}">
  -                <!-- Do not include test files in the runtime war -->
  -                <exclude name="**/Test*.*"/>
  -            </classes>
  -        </war>
  -
       </target>
   
       <!--
  @@ -256,71 +196,5 @@
           <!-- Copy log_client.properties so that it is in the classpath -->
           <copy tofile="${target.conf.client.dir}/log4j.properties"
               file="${conf.test.dir}/log_client.properties"/>
  -
  -    </target>
  -    
  -    <!--
  -       ========================================================================
  -         Create a Cactus test war file for the sample application.
  -       ========================================================================
  -    -->
  -    <target name="prepare.testwar.log4j" if="log4j.jar">
  -
  -        <!-- We only copy the Log4j jar if the log4j.jar property has been
  -             defined. This is because it is optional and not having log4j in
  -             the classpath will simply mean no log generated but will still
  -             work fine -->
  -        <copy tofile="${target.lib.dir}/log4j.jar" file="${log4j.jar}"/>
  -
  -    </target>
  -
  -    <target name="prepare.testwar.clover" if="clover.jar">
  -
  -        <copy tofile="${target.lib.dir}/clover.jar" file="${clover.jar}"/>
  -
  -    </target>
  -
  -    <target name="testwar"
  -        depends="compile,prepare.testwar.log4j,prepare.testwar.clover,prepare.test">
  -
  -        <!-- Gather libraries in a place where they can be copied in the
  -             war. Note: We don't copy the version information in the jar as
  -             it has some "." in the name (ex: clover-0.6b.jar) and WebLogic
  -             7.0 has a bug and ignore jars with dots in the name! Will be fixed
  -             in a upcoming patch as it has been fixed in WL 6.1 SP3 -->
  -        <copy tofile="${target.lib.dir}/junit.jar" file="${junit.jar}"/>
  -        <copy tofile="${target.lib.dir}/cactus.jar" file="${cactus.framework.jar}"/>
  -        <copy tofile="${target.lib.dir}/aspectjrt.jar" file="${aspectjrt.jar}"/>
  -        <copy tofile="${target.lib.dir}/commons-logging.jar" file="${commons.logging.jar}"/>
  -
  -        <!-- Copy the log4j server configuration file in order to change its
  -             name to log4j.properties (the default name for Log4j) -->
  -        <copy tofile="${target.conf.server.dir}/log4j.properties"
  -            file="${conf.test.dir}/log_server.properties"/>
  -
  -        <!-- Make sure the directory for the war exist -->
  -        <mkdir dir="${target.test.dir}"/>
  -
  -        <!-- Create the war file -->
  -        <war warfile="${target.test.dir}/test.war"
  -             webxml="${conf.test.dir}/web.xml">
  -
  -            <classes dir="${target.classes.dir}"/>
  -
  -            <!-- log_server.properties need to be in the server classpath -->
  -            <classes dir="${target.conf.server.dir}">
  -                <include name="log4j.properties"/>
  -            </classes>
  -
  -            <!-- We need to copy all dependent jar in the war. This is
  -                 because if we just put these jars in the global classpath for
  -                 the Servlet engine, the Cactus jar might not be able to load
  -                 the test case class as it may be loadable only by the war
  -                 classloader -->
  -            <lib dir="${target.lib.dir}"/>
  -
  -            <fileset dir="${web.dir}"/>
  -
  -       </war>
   
       </target>
  
  
  
  1.2       +1 -1      jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-resin-13.xml
  
  Index: build-tests-resin-13.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-resin-13.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build-tests-resin-13.xml	24 Oct 2002 12:37:35 -0000	1.1
  +++ build-tests-resin-13.xml	29 Oct 2002 17:12:28 -0000	1.2
  @@ -92,7 +92,7 @@
          ========================================================================
       -->
       <target name="prepare.test.resin.13"
  -        depends="check.test.resin.13,testwar" if="resin.home.13">
  +        depends="check.test.resin.13" if="resin.home.13">
   
           <echo message="resin.home.13 = ${resin.home.13}"/>
   
  
  
  
  1.2       +5 -5      jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-tomcat-40.xml
  
  Index: build-tests-tomcat-40.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-tomcat-40.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build-tests-tomcat-40.xml	24 Oct 2002 12:37:35 -0000	1.1
  +++ build-tests-tomcat-40.xml	29 Oct 2002 17:12:28 -0000	1.2
  @@ -30,8 +30,8 @@
   
               <jvmarg value="-Dcatalina.home=${tomcat.home.40}"/>
               <jvmarg value="-Dcatalina.base=${target.tomcat40.dir}"/>
  -
               <arg value="start"/>
  +            
               <classpath>
   
                 <!-- These are ignored if -Dbuild.sysclasspath=only is used -->
  @@ -101,7 +101,7 @@
          ========================================================================
       -->
       <target name="prepare.test.tomcat.40"
  -        depends="check.test.tomcat.40,testwar" if="tomcat.home.40">
  +        depends="check.test.tomcat.40" if="tomcat.home.40">
   
           <echo message="tomcat.home.40 = ${tomcat.home.40}"/>
   
  @@ -119,7 +119,7 @@
   
           <!-- Remove the auto deployed webapp so that it is redeployed every
                time -->
  -        <delete dir="${target.tomcat40.dir}/webapps/test"/>
  +        <delete dir="${target.tomcat40.dir}/webapps/${context.path}"/>
   
           <copy todir="${target.tomcat40.dir}/conf" filtering="on">
               <fileset dir="${conf.tomcat40.dir}"/>
  @@ -132,7 +132,7 @@
               todir="${target.tomcat40.dir}/conf"/>
   
           <!-- Copy the war file -->
  -        <copy file="${target.test.dir}/test.war"
  -            tofile="${target.tomcat40.dir}/webapps/test.war"/>
  +        <copy file="${war.path}"
  +            tofile="${target.tomcat40.dir}/webapps/${context.path}.war"/>
   
       </target>
  
  
  
  1.2       +1 -1      jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-orion-16.xml
  
  Index: build-tests-orion-16.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/Eclipse-Plugin/ant/build/build-tests-orion-16.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build-tests-orion-16.xml	24 Oct 2002 12:37:35 -0000	1.1
  +++ build-tests-orion-16.xml	29 Oct 2002 17:12:28 -0000	1.2
  @@ -82,7 +82,7 @@
          ========================================================================
       -->
       <target name="prepare.test.orion.16"
  -        depends="check.test.orion.16,testwar" if="orion.home.16">
  +        depends="check.test.orion.16" if="orion.home.16">
   
           <echo message="orion.home.16 = ${orion.home.16}"/>
   
  
  
  
  1.1                  jakarta-cactus/Eclipse-Plugin/ant/build-war.xml
  
  Index: build-war.xml
  ===================================================================
  <?xml version="1.0"?>
  <project name="Cactus War builder" default="dist"
      basedir="..">
  
      <!-- Global project properties -->
      <property name="project.name.text" value="Cactus Servlet Sample"/>
      <property name="project.name.file" value="sample-servlet"/>
      <property name="project.version" value="1.4b1"/>
  
      <!-- Prefix to add to all distributable files -->
      <property name="project.prefix" value="jakarta-"/>
  
      <!-- Generic properties -->
      <property name="year" value="2000-2002"/>
      <property name="debug" value="on"/>
      <property name="optimize" value="off"/>
      <property name="deprecation" value="off"/>
  
      <!--
         ========================================================================
           Base directory for all file related operations
         ========================================================================
      -->
      <property name="base.dir" value="."/>
  
      <!--
         ========================================================================
           Set the properties related to the source tree.
         ========================================================================
      -->
      <property name="src.dir" value="${base.dir}/src"/>
      <property name="build.dir" value="${base.dir}/build"/>
      <property name="conf.dir" value="${base.dir}/conf"/>
      <property name="conf.test.dir" value="${conf.dir}/test"/>
      <property name="web.dir" value="${base.dir}/web"/>
  
      <!--
         ========================================================================
           Set the properties related to the target area
         ========================================================================
      -->
      <!-- Destination locations for the build -->
      <property name="target.dir" value="${base.dir}/target"/>
      <property name="target.classes.dir" value="${target.dir}/classes"/>
      <property name="target.conf.dir" value="${target.dir}/conf"/>
      <property name="target.conf.client.dir" value="${target.conf.dir}/client"/>
      <property name="target.conf.server.dir" value="${target.conf.dir}/server"/>
      <property name="target.doc.dir" value="${target.dir}/doc"/>
      <property name="target.doc.api.dir" value="${target.doc.dir}/api"/>
      <property name="target.test.dir" value="${target.dir}/test"/>
      <property name="target.lib.dir" value="${target.dir}/lib"/>
  
      <!-- Distribution directory, i.e. where the expanded distibutable files
           are located -->
      <property name="dist.dir" value="${base.dir}/dist"/>
      <property name="dist.bin.dir" value="${dist.dir}/bin"/>
      <property name="dist.doc.dir" value="${dist.dir}/doc"/>
      <property name="dist.doc.api.dir" value="${dist.doc.dir}/api"/>
  
      <!--
         ========================================================================
           Default values that can be overidden
         ========================================================================
      -->
      <!-- The port that will be used to start the servers -->
      <property name="test.port" value="8080"/>
  
      <!--
         ========================================================================
          Names of deliverables
         ========================================================================
      -->
      <!-- The Sample war -->
      <property name="sample.war.name" value="${project.name.file}"/>
  
      <!--
         ========================================================================
           Useful patterns for targets
         ========================================================================
      -->
      <path id="project.class.path">
  
          <pathelement location="${cactus.framework.jar}"/>
          <pathelement location="${cactus.ant.jar}"/>
          <pathelement location="${servlet.jar}"/>
          <pathelement location="${log4j.jar}"/>
          <pathelement location="${commons.logging.jar}"/>
          <pathelement location="${commons.httpclient.jar}"/>
          <pathelement location="${httpunit.jar}"/>
          <pathelement location="${junit.jar}"/>
          <pathelement location="${aspectjrt.jar}"/>
  
          <!-- Includes system classpath for jars that are in ANT_HOME/lib such
               as aspectrt.jar, etc -->
          <pathelement path="${java.class.path}"/>
      </path>
  
      <!--
         ========================================================================
           Create a Cactus test war file for the sample application.
         ========================================================================
      -->
  
      <target name="testwar">
  
          <!-- Make sure the directory for the war exist -->
          <mkdir dir="${target.test.dir}"/>
  
          <!-- Create the war file -->
          <war warfile="${war.path}"
               webxml="${webxml.path}">
  
              <classes dir="${classes.dir}"/>
  
              <!-- log_server.properties need to be in the server classpath -->
              <classes dir="${classes.dir}">
                  <include name="log4j.properties"/>
              </classes>
  
              <!-- We need to copy all dependent jar in the war. This is
                   because if we just put these jars in the global classpath for
                   the Servlet engine, the Cactus jar might not be able to load
                   the test case class as it may be loadable only by the war
                   classloader -->
              <lib dir="${jars.dir}"/>
  
              <fileset dir="${webfiles.dir}"/>
  
         </war>
  
      </target>
  
  </project>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>