vmassol     2003/01/25 03:29:39

  Modified:    petals/ant/src/scripts/share build-share.xml
                        build-tests-tomcat4x.xml
  Log:
  - Added a cactus jvm property that specify the jvm to use for all Ant tasks (see 
comments in build.xml for details)
  - Added a cactus context property (see comments in build.xml for details)
  - Prefixed all cactus properties by "cactus" in order to avoid namespace clashes
  - Changed jboss script: the cactus webapp is now deployed in the "default" server 
located where you installed jboss, instead of the cactus.target.dir directory. This is 
because I haven't yet found a good way of doing it. Suggestions welcome!
  
  Note: The first 2 changes accomodates Julien changes of yesterday for the Eclipse 
plugin.
  
  Revision  Changes    Path
  1.3       +63 -53    jakarta-cactus/petals/ant/src/scripts/share/build-share.xml
  
  Index: build-share.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/petals/ant/src/scripts/share/build-share.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build-share.xml   24 Jan 2003 11:32:00 -0000      1.2
  +++ build-share.xml   25 Jan 2003 11:29:39 -0000      1.3
  @@ -13,44 +13,45 @@
        <!-- Default Cactus test files to exclude from the test -->
        <property name="cactus.src.excludes" value="**/AllTests.java"/>
   
  -     <!-- Default classpath for the Cactus client side -->   
  -    <path id="cactus.classpath">
  -        <pathelement path="${java.class.path}"/>
  -    </path>
  -
  +     <!-- Default Java VM to use for java Ant tasks -->
  +     <property name="cactus.jvm" value="java"/>
  +     
  +     <!-- Default webapp context -->
  +     <property name="cactus.context" value="cactustest"/>
  +     
       <!--
          ========================================================================
            Set the properties related to the source tree.
          ========================================================================
       -->
  -    <property name="conf.dir" value="confs"/>
  -    <property name="lib.dir" value="lib"/>
  -    <property name="lib.client.dir" value="${lib.dir}/client"/>
  -    <property name="lib.server.dir" value="${lib.dir}/server"/>
  -    <property name="lib.common.dir" value="${lib.dir}/common"/>
  -    <property name="script.dir" value="scripts"/>
  +    <property name="cactus.conf.dir" value="confs"/>
  +    <property name="cactus.lib.dir" value="lib"/>
  +    <property name="cactus.lib.client.dir" value="${cactus.lib.dir}/client"/>
  +    <property name="cactus.lib.server.dir" value="${cactus.lib.dir}/server"/>
  +    <property name="cactus.lib.common.dir" value="${cactus.lib.dir}/common"/>
  +    <property name="cactus.script.dir" value="scripts"/>
   
  -     <property name="target.classes.dir" value="${cactus.target.dir}/classes"/>
  +     <property name="cactus.target.classes.dir" 
value="${cactus.target.dir}/classes"/>
   
        <!-- Cactus related jar locations -->
        <property name="cactus.petal.ant.jar" 
  -             value="${lib.client.dir}[EMAIL PROTECTED]@"/>
  +             value="${cactus.lib.client.dir}[EMAIL PROTECTED]@"/>
   
        <property name="cactus.framework.jar" 
  -             value="${lib.common.dir}[EMAIL PROTECTED]@"/>
  -     <property name="log4j.jar" 
  -             value="${lib.common.dir}[EMAIL PROTECTED]@"/>
  -     <property name="aspectjrt.jar" 
  -             value="${lib.common.dir}[EMAIL PROTECTED]@"/>
  -     <property name="commons.logging.jar" 
  -             value="${lib.common.dir}[EMAIL PROTECTED]@"/>
  -     <property name="junit.jar" 
  -             value="${lib.common.dir}[EMAIL PROTECTED]@"/>
  -
  -     <property name="commons.httpclient.jar" 
  -             value="${lib.client.dir}[EMAIL PROTECTED]@"/>
  -     <property name="httpunit.jar" 
  -             value="${lib.client.dir}[EMAIL PROTECTED]@"/>
  +             value="${cactus.lib.common.dir}[EMAIL PROTECTED]@"/>
  +     <property name="cactus.log4j.jar" 
  +             value="${cactus.lib.common.dir}[EMAIL PROTECTED]@"/>
  +     <property name="cactus.aspectjrt.jar" 
  +             value="${cactus.lib.common.dir}[EMAIL PROTECTED]@"/>
  +     <property name="cactus.commons.logging.jar" 
  +             value="${cactus.lib.common.dir}[EMAIL PROTECTED]@"/>
  +     <property name="cactus.junit.jar" 
  +             value="${cactus.lib.common.dir}[EMAIL PROTECTED]@"/>
  +
  +     <property name="cactus.commons.httpclient.jar" 
  +             value="${cactus.lib.client.dir}[EMAIL PROTECTED]@"/>
  +     <property name="cactus.httpunit.jar" 
  +             value="${cactus.lib.client.dir}[EMAIL PROTECTED]@"/>
   
       <!--
          ========================================================================
  @@ -80,19 +81,29 @@
       -->
       <target name="cactus.compile" if="cactus.src.dir" description="Compile the 
Cactus tests">
   
  -        <mkdir dir="${target.classes.dir}"/>
  +        <mkdir dir="${cactus.target.classes.dir}"/>
   
  -        <javac destdir="${target.classes.dir}" srcdir="${cactus.src.dir}">
  +        <javac destdir="${cactus.target.classes.dir}" srcdir="${cactus.src.dir}">
               <classpath>
                                <pathelement location="${cactus.framework.jar}"/>
  -                             <pathelement location="${log4j.jar}"/>
  -                             <pathelement location="${aspectjrt.jar}"/>
  -                             <pathelement location="${commons.logging.jar}"/>
  -                             <pathelement location="${junit.jar}"/>
  +                             <pathelement location="${cactus.log4j.jar}"/>
  +                             <pathelement location="${cactus.aspectjrt.jar}"/>
  +                             <pathelement location="${cactus.commons.logging.jar}"/>
  +                             <pathelement location="${cactus.junit.jar}"/>
  +                             <pathelement 
location="${cactus.commons.httpclient.jar}"/>
  +                             <pathelement location="${cactus.httpunit.jar}"/>
                   <path refid="cactus.classpath"/>
               </classpath>
           </javac>
   
  +             <!-- Copy non-java files -->
  +             <copy todir="${cactus.target.classes.dir}">
  +                     <fileset dir="${cactus.src.dir}">
  +                             <exclude name="**/*.java"/>
  +                             <exclude name="**/*.html"/>
  +                     </fileset>
  +             </copy>
  +             
        </target>
        
       <!--
  @@ -103,37 +114,36 @@
       <target name="cactus.war" depends="cactus.compile" 
        description="Cactify the war">
                                
  -             <unwar src="${cactus.war}" dest="${cactus.target.dir}/test"/>
  +             <unwar src="${cactus.war}" 
  +                     dest="${cactus.target.dir}/${cactus.context}"/>
   
                <!-- TODO: Perform a web.xml merge -->
   
                <!-- Copy the Cactus web.xml -->
  -             <copy todir="${cactus.target.dir}/test/WEB-INF">
  -                     <fileset dir="${conf.dir}">
  +             <copy todir="${cactus.target.dir}/${cactus.context}/WEB-INF">
  +                     <fileset dir="${cactus.conf.dir}">
                                <include name="web.xml"/>
                        </fileset>
                </copy>
   
                <!-- Copy the Cactus test classes -->
  -             <copy todir="${cactus.target.dir}/test/WEB-INF/classes">
  -                     <fileset dir="${target.classes.dir}">
  -                             <include name="**/*.class"/>
  -                 </fileset>
  +             <copy todir="${cactus.target.dir}/${cactus.context}/WEB-INF/classes">
  +                     <fileset dir="${cactus.target.classes.dir}"/>
                </copy>
                                
                <!-- Copy the Cactus jars -->
  -             <copy todir="${cactus.target.dir}/test/WEB-INF/lib">
  -                     <fileset dir="${lib.server.dir}">
  +             <copy todir="${cactus.target.dir}/${cactus.context}/WEB-INF/lib">
  +                     <fileset dir="${cactus.lib.server.dir}">
                                <include name="*.jar"/>
                    </fileset>
  -                     <fileset dir="${lib.common.dir}">
  +                     <fileset dir="${cactus.lib.common.dir}">
                                <include name="*.jar"/>
                    </fileset>
                </copy>
   
                <!-- Copy the JSP Redirector -->
  -             <copy todir="${cactus.target.dir}/test">
  -                     <fileset dir="${conf.dir}">
  +             <copy todir="${cactus.target.dir}/${cactus.context}">
  +                     <fileset dir="${cactus.conf.dir}">
                                <include name="jspRedirector.jsp"/>
                        </fileset>                      
                </copy>
  @@ -150,18 +160,18 @@
           <junit printsummary="yes" haltonfailure="yes" haltonerror="yes"
               fork="yes">
   
  -                     <jvmarg 
value="-Dcactus.contextURL=http://localhost:${cactus.port}/test"/>
  +                     <jvmarg 
value="-Dcactus.contextURL=http://localhost:${cactus.port}/${cactus.context}"/>
                        
               <classpath>
  -                             <pathelement location="${target.classes.dir}"/>
  +                             <pathelement location="${cactus.target.classes.dir}"/>
                                <pathelement location="${cactus.framework.jar}"/>
  -                             <pathelement location="${log4j.jar}"/>
  -                             <pathelement location="${aspectjrt.jar}"/>
  -                             <pathelement location="${commons.logging.jar}"/>
  -                             <pathelement location="${junit.jar}"/>
  +                             <pathelement location="${cactus.log4j.jar}"/>
  +                             <pathelement location="${cactus.aspectjrt.jar}"/>
  +                             <pathelement location="${cactus.commons.logging.jar}"/>
  +                             <pathelement location="${cactus.junit.jar}"/>
  +                             <pathelement 
location="${cactus.commons.httpclient.jar}"/>
  +                             <pathelement location="${cactus.httpunit.jar}"/>
                   <path refid="cactus.classpath"/>
  -                             <pathelement location="${commons.httpclient.jar}"/>
  -                             <pathelement location="${httpunit.jar}"/>
               </classpath>
   
               <formatter type="plain" usefile="false"/>
  
  
  
  1.3       +15 -65    
jakarta-cactus/petals/ant/src/scripts/share/build-tests-tomcat4x.xml
  
  Index: build-tests-tomcat4x.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/petals/ant/src/scripts/share/build-tests-tomcat4x.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build-tests-tomcat4x.xml  24 Jan 2003 11:34:29 -0000      1.2
  +++ build-tests-tomcat4x.xml  25 Jan 2003 11:29:39 -0000      1.3
  @@ -1,6 +1,6 @@
   
        <!-- Global properties -->
  -    <property name="conf.tomcat4x.dir" value="${conf.dir}/tomcat4x"/>
  +    <property name="cactus.conf.tomcat4x" value="${cactus.conf.dir}/tomcat4x"/>
       <property name="cactus.target.tomcat4x" value="${cactus.target.dir}/tomcat4x"/>
   
       <!--
  @@ -17,7 +17,7 @@
                The servlet engine is stopped if the tests fail for any reason -->
   
           <runservertests
  -            
testURL="http://localhost:${cactus.port}/test/ServletRedirector?Cactus_Service=RUN_TEST";
  +            
testURL="http://localhost:${cactus.port}/${cactus.context}/ServletRedirector?Cactus_Service=RUN_TEST";
               startTarget="cactus.start.tomcat4x"
               stopTarget="cactus.stop.tomcat4x"
               testTarget="cactus.test"/>
  @@ -29,33 +29,10 @@
            Start Tomcat 4.x
          ========================================================================
       -->
  -    <target name="start.tomcat.40" depends="cactus.check.tomcat4x, 
cactus.checkwindows, cactus.start.tomcat4x.windows, cactus.start.tomcat4x.other" 
if="cactus.home.tomcat4x" description="Start Tomcat 4.x"/>
  +    <target name="cactus.start.tomcat4x" description="Start Tomcat 4.x"
  +        depends="cactus.check.tomcat4x" if="cactus.home.tomcat4x">
   
  -    <target name="cactus.start.tomcat4x.windows" if="isWindows">
  -
  -        <java jvm='javaw' classname="org.apache.catalina.startup.Bootstrap" 
fork="yes">
  -
  -            <jvmarg value="-Dcatalina.home=${cactus.home.tomcat4x}"/>
  -            <jvmarg value="-Dcatalina.base=${cactus.target.tomcat4x}"/>
  -
  -            <arg value="start"/>
  -            <classpath>
  -
  -              <!-- These are ignored if -Dbuild.sysclasspath=only is used -->
  -              <pathelement path="${java.home}/../lib/tools.jar"/>
  -              <fileset dir="${cactus.home.tomcat4x}">
  -                  <include name="bin/bootstrap.jar"/>
  -              </fileset>
  -
  -            </classpath>
  -        </java>
  -
  -    </target>
  -
  -
  -    <target name="cactus.start.tomcat4x.other" unless="isWindows">
  -
  -        <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
  +        <java jvm="${cactus.jvm}" classname="org.apache.catalina.startup.Bootstrap" 
fork="yes">
   
               <jvmarg value="-Dcatalina.home=${cactus.home.tomcat4x}"/>
               <jvmarg value="-Dcatalina.base=${cactus.target.tomcat4x}"/>
  @@ -79,51 +56,25 @@
            Stop Tomcat 4.x
          ========================================================================
       -->
  -    <target name="stop.tomcat.40" depends="cactus.check.tomcat4x, 
cactus.checkwindows, cactus.stop.tomcat4x.windows, cactus.stop.tomcat4x.other" 
if="cactus.home.tomcat4x" description="Stop Tomcat 4.x"/>
  -
  -    <target name="cactus.stop.tomcat4x.windows" if="isWindows">
  -
  -        <java jvm='javaw' classname="org.apache.catalina.startup.Bootstrap" 
fork="yes">
  +    <target name="cactus.stop.tomcat4x" description="Stop Tomcat 4.x"
  +        depends="cactus.check.tomcat4x" if="cactus.home.tomcat4x">
   
  +        <java jvm="${cactus.jvm}" classname="org.apache.catalina.startup.Bootstrap" 
fork="yes">
               <jvmarg value="-Dcatalina.home=${cactus.home.tomcat4x}"/>
               <jvmarg value="-Dcatalina.base=${cactus.target.tomcat4x}"/>
  -
               <arg value="stop"/>
  -            <classpath>
   
  -              <!-- These are ignored if -Dbuild.sysclasspath=only is used -->
  -              <fileset dir="${cactus.home.tomcat4x}">
  -                  <include name="bin/bootstrap.jar"/>
  -              </fileset>
  -
  -            </classpath>
  -        </java>
  -
  -    </target>
  -
  -
  -    <target name="cactus.stop.tomcat4x.other" unless="isWindows">
  -
  -        <java classname="org.apache.catalina.startup.Bootstrap" fork="yes">
  -
  -            <jvmarg value="-Dcatalina.home=${cactus.home.tomcat4x}"/>
  -            <jvmarg value="-Dcatalina.base=${cactus.target.tomcat4x}"/>
  -
  -            <arg value="stop"/>
               <classpath>
  -
  -              <!-- These are ignored if -Dbuild.sysclasspath=only is used -->
  +              <!-- These are ignored if -Dbuild.sysclasspath=only is used
  +                   (this is the case for Gump builds) -->
                 <fileset dir="${cactus.home.tomcat4x}">
                     <include name="bin/bootstrap.jar"/>
                 </fileset>
  -
               </classpath>
           </java>
   
       </target>
   
  -
  -
       <!--
          ========================================================================
            Display a warning message if the needed servlet engine home property
  @@ -150,13 +101,12 @@
        description="Deploy the webapp on Tomcat 4.x">
   
           <!-- Copy the webapp -->
  -             <copy todir="${cactus.target.tomcat4x}/webapps/${context.path}">
  -                     <fileset dir="${cactus.target.dir}/test"/>
  +             <copy todir="${cactus.target.tomcat4x}/webapps/${cactus.context}">
  +                     <fileset dir="${cactus.target.dir}/${cactus.context}"/>
                </copy>
   
        </target>
  -
  -
  +     
       <!--
          ========================================================================
            Set up a valid Tomcat 4.x directory structure in the
  @@ -177,10 +127,10 @@
   
           <!-- Remove the auto deployed webapp so that it is redeployed every
                time -->
  -        <delete dir="${cactus.target.tomcat4x}/webapps/${context.path}"/>
  +        <delete dir="${cactus.target.tomcat4x}/webapps/${cactus.context}"/>
   
           <copy todir="${cactus.target.tomcat4x}/conf" filtering="on">
  -            <fileset dir="${conf.tomcat4x.dir}"/>
  +            <fileset dir="${cactus.conf.tomcat4x}"/>
           </copy>
   
           <!-- Copy the Tomcat web.xml - We need to copy this file as it has
  
  
  

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

Reply via email to