vmassol     2003/01/25 03:29:18

  Modified:    petals/ant/src/scripts/j2ee13 build-tests-jboss3x.xml
                        build.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.2       +17 -30    
jakarta-cactus/petals/ant/src/scripts/j2ee13/build-tests-jboss3x.xml
  
  Index: build-tests-jboss3x.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-cactus/petals/ant/src/scripts/j2ee13/build-tests-jboss3x.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build-tests-jboss3x.xml   23 Jan 2003 14:09:24 -0000      1.1
  +++ build-tests-jboss3x.xml   25 Jan 2003 11:29:18 -0000      1.2
  @@ -1,6 +1,6 @@
   
        <!-- Global properties -->
  -    <property name="conf.jboss3x.dir" value="${conf.dir}/jboss3x"/>
  +    <property name="cactus.conf.jboss3x" value="${cactus.conf.dir}/jboss3x"/>
       <property name="cactus.target.jboss3x" value="${cactus.target.dir}/jboss3x"/>
   
       <!-- 
  @@ -17,7 +17,7 @@
                The container 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.jboss3x"
               stopTarget="cactus.stop.jboss3x"
               testTarget="cactus.test"/>
  @@ -34,13 +34,13 @@
   
                <dirname property="antfile.dir" file="${ant.file}"/>
   
  -        <java classname="org.jboss.Main" fork="yes">
  +        <java jvm="${cactus.jvm}" classname="org.jboss.Main" fork="yes">
   
               <jvmarg value="-Dprogram.name=${cactus.home.jboss3x}/bin/run.bat"/>
  -            <jvmarg 
value="-Djboss.server.home.dir=${cactus.target.jboss3x}/server/cactus"/>
  -            <jvmarg 
value="-Djboss.server.home.url=file:/${cactus.target.jboss3x}/server/cactus"/>
  +            <jvmarg 
value="-Djboss.server.home.dir=${cactus.home.jboss3x}/server/default"/>
  +            <jvmarg 
value="-Djboss.server.home.url=file:/${cactus.home.jboss3x}/server/default"/>
               
  -            <arg line="-c cactus"/>
  +            <arg line="-c default"/>
               
               <classpath>
                   <pathelement location="${cactus.home.jboss3x}/bin/run.jar"/>
  @@ -59,7 +59,7 @@
       <target name="cactus.stop.jboss3x" description="Stop JBoss 3.x"
           depends="cactus.check.jboss3x" if="cactus.home.jboss3x">
   
  -        <java classname="org.jboss.Shutdown" fork="yes">
  +        <java jvm="${cactus.jvm}" classname="org.jboss.Shutdown" fork="yes">
   
               <arg value="localhost"/>
               <arg value="${cactus.port}"/>
  @@ -102,20 +102,20 @@
                     configured to allow this?). -->
                    
           <!-- Copy the webapp -->
  -             <mkdir dir="${cactus.target.jboss3x}/tmp/test"/>
  -             <copy todir="${cactus.target.jboss3x}/tmp/test">
  -                     <fileset dir="${cactus.target.dir}/test"/>
  +             <mkdir dir="${cactus.target.jboss3x}/tmp/${cactus.context}"/>
  +             <copy todir="${cactus.target.jboss3x}/tmp/${cactus.context}">
  +                     <fileset dir="${cactus.target.dir}/${cactus.context}"/>
                </copy>
   
           <!-- Add the JBoss specific configuration files -->
  -             <copy todir="${cactus.target.jboss3x}/tmp/test/WEB-INF/classes">
  -            <fileset dir="${conf.jboss3x.dir}">
  +             <copy 
todir="${cactus.target.jboss3x}/tmp/${cactus.context}/WEB-INF/classes">
  +            <fileset dir="${cactus.conf.jboss3x}">
                   <include name="*.properties"/>
               </fileset>
           </copy>
   
  -             <jar destfile="${cactus.target.jboss3x}/server/cactus/deploy/test.war">
  -                     <fileset dir="${cactus.target.jboss3x}/tmp/test"/>
  +             <jar 
destfile="${cactus.home.jboss3x}/server/default/deploy/${cactus.context}.war">
  +                     <fileset dir="${cactus.target.jboss3x}/tmp/${cactus.context}"/>
                </jar>
   
        </target>
  @@ -130,20 +130,7 @@
           depends="cactus.check.jboss3x" if="cactus.home.jboss3x"
           description="Set up a JBoss 3.x directory structure">
   
  -        <!-- Create a server configuration using the minimal JBoss 
  -             configuration and adding the JBossWeb Service -->
  -        <copy todir="${cactus.target.jboss3x}/server/cactus">
  -            <fileset dir="${cactus.home.jboss3x}/server/minimal"/>
  -        </copy>
  -
  -        <copy todir="${cactus.target.jboss3x}/server/cactus/deploy/jbossweb.sar">
  -            <fileset 
dir="${cactus.home.jboss3x}/server/default/deploy/jbossweb.sar"/>
  -        </copy>
  -        <copy todir="${cactus.target.jboss3x}/server/cactus/lib">
  -            <fileset dir="${cactus.home.jboss3x}/server/default/lib">
  -                <include name="javax.servlet.jar"/>
  -                <include name="jboss.jar"/>
  -            </fileset>
  -        </copy>
  -
  +             <!-- TODO: Find how to create a valid default server configuration.
  +                  Copying the server/ directory does not seem to be enough -->
  +                  
       </target>
  
  
  
  1.3       +11 -0     jakarta-cactus/petals/ant/src/scripts/j2ee13/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-cactus/petals/ant/src/scripts/j2ee13/build.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- build.xml 23 Jan 2003 14:09:24 -0000      1.2
  +++ build.xml 25 Jan 2003 11:29:18 -0000      1.3
  @@ -42,6 +42,17 @@
                                      to exclude in the test. Defaults to
                                      "**/AllTests.java".
   
  +        cactus.jvm                 [OPTIONAL] JVM to use when running java
  +                                   Ant tasks. Default is "java". Other possible
  +                                   value is: "javaw" (windows). Note: This is
  +                                   for example to prevent a shell from opening
  +                                   on windows platform when this Ant script
  +                                   is called from a java application that has
  +                                   no shell.
  +
  +             cactus.context             [OPTIONAL] Webapp context to use for the
  +                                        cactified war. Defaults to "cactustest".
  +                                        
       The following Ant references need to be passed to this script:
       
           cactus.classpath           [OPTIONAL] The classpath reference for 
  
  
  

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

Reply via email to