vmassol     2002/11/11 12:41:25

  Modified:    src/plugins-build/cactus plugin.jelly plugin.properties
               src/plugins-build/cactus/sample project.properties
               src/plugins-build/cactus/scripts resin.2x.jelly
                        tomcat.4x.jelly weblogic.7x.jelly
               src/plugins-build/cactus/xdocs changes.xml features.xml
  Added:       src/plugins-build/cactus/conf excluded.properties
  Log:
  Added ability to use either the Text or Swing test runner for running the cactus 
tests
  
  Revision  Changes    Path
  1.13      +51 -2     jakarta-turbine-maven/src/plugins-build/cactus/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-build/cactus/plugin.jelly,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- plugin.jelly      11 Nov 2002 18:26:44 -0000      1.12
  +++ plugin.jelly      11 Nov 2002 20:41:24 -0000      1.13
  @@ -157,10 +157,11 @@
   
     <!--
        ========================================================================
  -       Start the Cactus tests using the <junit> Ant task.
  +       Start the Cactus tests using the <junit> Ant task with the JUnit
  +       Text Test Runner.
        ========================================================================
     -->
  -  <goal name="cactus:test" prereqs="cactus:test-init">
  +  <goal name="cactus:test-text" prereqs="cactus:test-init">
   
       <mkdir dir="${maven.cactus.test.reportsDirectory}"/>
       <mkdir dir="${maven.cactus.build.resources.dir}"/>
  @@ -208,6 +209,54 @@
           <fail message="There were test failures."/>
         </j:if>
       </j:if>
  +
  +  </goal>
  +
  +  <!--
  +     ========================================================================
  +       Start the Cactus tests using the <junit> Ant task with the JUnit
  +       Swing Test Runner.
  +     ========================================================================
  +  -->
  +  <goal name="cactus:test-swing" prereqs="cactus:test-init">
  +
  +    <mkdir dir="${maven.cactus.build.resources.dir}"/>
  +
  +    <copy todir="${maven.cactus.build.resources.dir}"
  +      file="${maven.cactus.configFile}" filtering="on">
  +      <filterset>
  +        <filter token="maven.cactus.port" value="${maven.cactus.port}"/>
  +      </filterset>
  +    </copy>
  +
  +    <!-- Copy the JUnit excluded.properties - This is needed because the
  +         the Commons logging package need to be excluded from being loaded
  +         by the special JUnit classloader. Otherwise, it fails. -->
  +    <copy todir="${maven.cactus.build.resources.dir}/junit/runner"
  +      file="${maven.cactus.testrunner.swing.excluded}"/>
  +
  +    <java classname="junit.swingui.TestRunner" fork="true" dir="${basedir}">
  +
  +      <j:forEach var="test" items="${cactusScanner.iterator()}">
  +        <arg line="${test}"/>
  +      </j:forEach>
  +
  +      <classpath>
  +        <path refid="maven.dependency.classpath"/>
  +        <pathelement location="${maven.build.dest}"/>
  +        <pathelement location="${maven.cactus.classes.dir}"/>
  +        <pathelement location="${maven.cactus.build.resources.dir}"/>
  +        <pathelement path="${plugin.getDependencyPath('junit')}"/>
  +        <pathelement path="${plugin.getDependencyPath('cactus:cactus')}"/>
  +        <pathelement path="${plugin.getDependencyPath('commons-httpclient')}"/>
  +        <pathelement path="${plugin.getDependencyPath('commons-logging')}"/>
  +        <pathelement path="${plugin.getDependencyPath('aspectj:aspectjrt')}"/>
  +        <!-- These 2 jars should not be needed but it won't work without
  +             them -->
  +        <pathelement path="${plugin.getDependencyPath('xml-apis')}"/>
  +        <pathelement path="${plugin.getDependencyPath('xerces')}"/>
  +      </classpath>
  +    </java>
   
     </goal>
   
  
  
  
  1.6       +8 -0      jakarta-turbine-maven/src/plugins-build/cactus/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/plugins-build/cactus/plugin.properties,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- plugin.properties 10 Nov 2002 16:10:34 -0000      1.5
  +++ plugin.properties 11 Nov 2002 20:41:24 -0000      1.6
  @@ -56,3 +56,11 @@
   # Location where the project war/webapp is located (either as a war or an
   # expanded webapp). Cactus will then add its own stuff to the war/webapp.
   maven.cactus.prewar.dir = ${maven.war.build.dir}
  +
  +# Define what TestRunner to use. Default is the JUnit text test runner
  +# (the one used by the <junit> Ant task). Valid values are: text, swing
  +maven.cactus.testrunner = text
  +
  +# Location of junit excluded.properties file to use when using the Swing
  +# Test Runner
  +maven.cactus.testrunner.swing.excluded = ${plugin.dir}/conf/excluded.properties
  
  
  
  1.2       +1 -0      
jakarta-turbine-maven/src/plugins-build/cactus/sample/project.properties
  
  Index: project.properties
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/plugins-build/cactus/sample/project.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- project.properties        15 Oct 2002 20:07:18 -0000      1.1
  +++ project.properties        11 Nov 2002 20:41:24 -0000      1.2
  @@ -1,3 +1,4 @@
   
   #maven.cactus.tomcat4x.home = C:/Apps/jakarta-tomcat-4.1.10
   #maven.cactus.resin2x.home = C:/Apps/resin-2.1.4
  +
  
  
  
  1.4       +1 -1      
jakarta-turbine-maven/src/plugins-build/cactus/scripts/resin.2x.jelly
  
  Index: resin.2x.jelly
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/plugins-build/cactus/scripts/resin.2x.jelly,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- resin.2x.jelly    10 Nov 2002 16:10:34 -0000      1.3
  +++ resin.2x.jelly    11 Nov 2002 20:41:24 -0000      1.4
  @@ -64,7 +64,7 @@
         <http 
url="http://localhost:${maven.cactus.port}/test/ServletRedirector?Cactus_Service=RUN_TEST"/>

       </waitfor>
   
  -    <attainGoal name="cactus:test"/>
  +    <attainGoal name="cactus:test-${maven.cactus.testrunner}"/>
   
       <!-- Only stop if the container was not already started -->
       <j:if test="${resin2xstarted == null}">
  
  
  
  1.6       +1 -1      
jakarta-turbine-maven/src/plugins-build/cactus/scripts/tomcat.4x.jelly
  
  Index: tomcat.4x.jelly
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/plugins-build/cactus/scripts/tomcat.4x.jelly,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- tomcat.4x.jelly   10 Nov 2002 16:10:34 -0000      1.5
  +++ tomcat.4x.jelly   11 Nov 2002 20:41:24 -0000      1.6
  @@ -64,7 +64,7 @@
         <http 
url="http://localhost:${maven.cactus.port}/test/ServletRedirector?Cactus_Service=RUN_TEST"/>

       </waitfor>
   
  -    <attainGoal name="cactus:test"/>         
  +    <attainGoal name="cactus:test-${maven.cactus.testrunner}"/>
   
       <!-- Only stop if the container was not already started -->
       <j:if test="${tomcat4xstarted == null}">
  
  
  
  1.3       +1 -1      
jakarta-turbine-maven/src/plugins-build/cactus/scripts/weblogic.7x.jelly
  
  Index: weblogic.7x.jelly
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/plugins-build/cactus/scripts/weblogic.7x.jelly,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- weblogic.7x.jelly 10 Nov 2002 16:10:34 -0000      1.2
  +++ weblogic.7x.jelly 11 Nov 2002 20:41:24 -0000      1.3
  @@ -64,7 +64,7 @@
         <http 
url="http://localhost:${maven.cactus.port}/test/ServletRedirector?Cactus_Service=RUN_TEST"/>
       </waitfor>
   
  -    <attainGoal name="cactus:test"/>         
  +    <attainGoal name="cactus:test-${maven.cactus.testrunner}"/>
   
       <!-- Only stop if the container was not already started -->
       <j:if test="${weblogic7xstarted == null}">
  
  
  
  1.12      +9 -0      jakarta-turbine-maven/src/plugins-build/cactus/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/plugins-build/cactus/xdocs/changes.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- changes.xml       11 Nov 2002 18:30:34 -0000      1.11
  +++ changes.xml       11 Nov 2002 20:41:24 -0000      1.12
  @@ -6,8 +6,15 @@
     </properties>
   
     <body>
  +
       <release version="1.1" date="in CVS">
         <action dev="vmassol" type="add">
  +        Added support for running the tests using the JUnit Swing Test Runner.
  +        Simply create the following Maven property
  +        <code>maven.cactus.testrunner = swing</code> to use the Swing Test
  +        Runner.
  +      </action>
  +      <action dev="vmassol" type="add">
           Added automatic discovery of Cactus Test Cases and ignore test support
           classes.
         </action>
  @@ -28,6 +35,7 @@
           Fix bug which prevented overriding the default web.xml.
         </action>
       </release>
  +
       <release version="1.0" date="2002-11-06">
         <action dev="vmassol" type="add">
           Sample project showing how to use the Cactus plugin.
  @@ -45,6 +53,7 @@
           Creation of the Cactus plugin
         </action>
       </release>
  +
     </body>
   </document>
   
  
  
  
  1.4       +16 -7     
jakarta-turbine-maven/src/plugins-build/cactus/xdocs/features.xml
  
  Index: features.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/plugins-build/cactus/xdocs/features.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- features.xml      11 Nov 2002 18:30:34 -0000      1.3
  +++ features.xml      11 Nov 2002 20:41:24 -0000      1.4
  @@ -13,13 +13,18 @@
             Support for keeping the server running between redeployments.
           </li>
           <li>
  -          Support for Tomcat 4.x
  -        </li>
  -        <li>
  -          Support for Resin 2.x
  -        </li>
  -        <li>
  -          Support for WebLogic 7.x
  +          Support for the following containers:
  +          <ul>
  +            <li>
  +              Support for Tomcat 4.x
  +            </li>
  +            <li>
  +              Support for Resin 2.x
  +            </li>
  +            <li>
  +              Support for WebLogic 7.x
  +            </li>
  +          </ul>
           </li>
           <li>
             HTML report generation (integrated with Maven reports).
  @@ -27,6 +32,10 @@
           <li>
             Automatic discovery of Cactus Test Cases and ignore test support
             classes.
  +        </li>
  +        <li>
  +          Ability to use either the Text or Swing Test Runner for running the
  +          Cactus tests.
           </li>
         </ul>
       </section>
  
  
  
  1.1                  
jakarta-turbine-maven/src/plugins-build/cactus/conf/excluded.properties
  
  Index: excluded.properties
  ===================================================================
  #
  # The list of excluded package paths for the TestCaseClassLoader
  #
  excluded.0=sun.*
  excluded.1=com.sun.*
  excluded.2=org.omg.*
  excluded.3=javax.*
  excluded.4=sunw.*
  excluded.5=java.*
  excluded.6=org.w3c.dom.*
  excluded.7=org.xml.sax.*
  excluded.8=net.jini.*
  excluded.9=org.apache.common.logging.*
  excluded.10=org.apache.cactus.*
  
  
  
  

--
To unsubscribe, e-mail:   <mailto:turbine-maven-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-maven-dev-help@;jakarta.apache.org>

Reply via email to