dion        2002/06/04 00:17:36

  Modified:    src/templates/build/plugins/test Control.vm build.xml
  Log:
  Moved test plugin to parse-less process
  
  Revision  Changes    Path
  1.3       +0 -6      
jakarta-turbine-maven/src/templates/build/plugins/test/Control.vm
  
  Index: Control.vm
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/templates/build/plugins/test/Control.vm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Control.vm        15 May 2002 20:02:42 -0000      1.2
  +++ Control.vm        4 Jun 2002 07:17:36 -0000       1.3
  @@ -12,9 +12,3 @@
   ## -------------------------------------------------------
   $delegators.put("test",            "plugins/$plugin/build.xml")
   $delegators.put("run-singletest",  "plugins/$plugin/build.xml")
  -
  -## -------------------------------------------------------
  -## Make the list of callbacks
  -## -------------------------------------------------------
  -$callbacks.put( "$plugin", [ "pre-test", "post-test", "pre-run-singletest", 
"post-run-singletest" ] )
  -
  
  
  
  1.2       +81 -33    jakarta-turbine-maven/src/templates/build/plugins/test/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/templates/build/plugins/test/build.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- build.xml 15 May 2002 19:17:45 -0000      1.1
  +++ build.xml 4 Jun 2002 07:17:36 -0000       1.2
  @@ -1,8 +1,30 @@
   <?xml version="1.0"?>
   
  -<project name="$project.id" default="test" basedir="$antBasedir">
  +<project name="maven-test" default="test" basedir="..">
   
  -  #parse("build.init.target")
  +  <!-- ================================================================== -->
  +  <!-- I N I T                                                            -->
  +  <!-- ================================================================== -->
  +  <target name="init">
  +    <!-- Pick up tool default properties for maven.jars.list -->
  +    <property file="${maven.home}/plugins/core/default.properties"/>
  +
  +    <!-- define maven classpath for the build -->
  +    <path id="maven-classpath">
  +      <fileset dir="${lib.repo}" includes="${maven.jars.list}" />
  +    </path>
  +    
  +    <!-- define maven taskdefs, as taskdefs are not yet inheritable -->
  +    <taskdef resource="maven-taskdefs.properties">
  +      <classpath refid="maven-classpath" />
  +    </taskdef>
  +    
  +    <!-- call common build file initialization to verify project, update jars
  +         etc -->
  +    <maven-ant antfile="${maven.home}/plugins/core/build-init.xml"
  +      target="verify-project" inheritAll="true" inheritRefs="true" 
  +      exportAll="true"/>
  +  </target>
   
     <!-- ================================================================== -->
     <!-- L O C A L   I N I T                                                -->
  @@ -27,32 +49,18 @@
       if="maven.unitTestSourceDirectory"
       description="==> compiles the test source code">
       
  -    <!-- Make sure the core code is compiled.
  -    
  -         When using <ant> all project properties are passed
  -         into the build, but the references are not by default.
  -         We need the references to be forwarded as well as we
  -         build paths and patternsets and store them as project
  -         references. But we won't be able to do this until
  -         Ant 1.5 is released. Pooh. Until then we have to
  -         reload the POM.
  -    
  -    <ant 
  -      antfile="${maven.home}/plugins/core/build.xml"
  -      inheritRefs="true"
  -      target="compile"
  -    />
  -
  -    -->
  -
  -    <ant 
  +    <maven-ant 
         antfile="${maven.home}/plugins/core/build.xml"
         target="compile"
  +      inheritRefs="true"
  +      inheritAll="true"
       />
   
  -    <ant 
  +    <maven-ant 
         antfile="${maven.home}/plugins/core/build.xml"
         target="jar-resources"
  +      inheritRefs="true"
  +      inheritAll="true"
       />
   
       <javac 
  @@ -77,9 +85,33 @@
   
     <target 
       name="test" 
  -    depends="local-init,#callback("pre-test"),do-test,#callback("post-test")"
  +    depends="local-init, pre-test-callback, do-test, post-test-callback"
       description="runs (junit) unit tests"/>
   
  +  <target name="pre-test-callback">
  +    <maven-ant antfile="${maven.home}/plugins/core/build-init.xml"
  +      target="callback" inheritAll="true" inheritRefs="true">
  +      <property name="buildFile" 
  +        value="${maven.test.callback.pre-test.buildFile}" />
  +      <property name="buildTarget" 
  +        value="${maven.test.callback.pre-test.buildTarget}" />
  +      <property name="buildTargetName" 
  +        value="maven.test.callback.pre-test.buildTarget" />
  +    </maven-ant>
  +  </target>
  +
  +  <target name="post-test-callback">
  +    <maven-ant antfile="${maven.home}/plugins/core/build-init.xml"
  +      target="callback" inheritAll="true" inheritRefs="true">
  +      <property name="buildFile" 
  +        value="${maven.test.callback.post-run-singletest.buildFile}" />
  +      <property name="buildTarget" 
  +        value="${maven.test.callback.post-run-singletest.buildTarget}" />
  +      <property name="buildTargetName" 
  +        value="maven.test.callback.post-run-singletest.buildTarget" />
  +    </maven-ant>
  +  </target>
  +    
     <target 
       name="do-test" 
       depends="run-tests"
  @@ -129,15 +161,6 @@
       depends="local-init"
       if="maven.unitTestSourceDirectory">
   
  -    <taskdef 
  -      name="dvsl" 
  -      classname="org.apache.tools.dvsl.DVSLTask">
  -
  -      <classpath>
  -        <path refid="maven-classpath"/>
  -      </classpath>
  -    </taskdef>
  -
       <!-- Consolidate the reports into a single -->
       <junitreport todir="${maven.test.reportsDirectory}">
         <fileset dir="${maven.test.reportsDirectory}">
  @@ -164,8 +187,33 @@
   
     <target 
       name="run-singletest" 
  -    
depends="compile,#callback("pre-run-singletest"),do-run-singletest,#callback("post-run-singletest")"
  +    depends="compile, pre-run-singletest-callback, do-run-singletest,
  +      post-run-singletest-callback"
       description="runs a single (junit) unit test.  Define the testcase on the 
command-line: -Dmaven.testcase="/>
  +
  +  <target name="pre-run-singletest-callback">
  +    <maven-ant antfile="${maven.home}/plugins/core/build-init.xml"
  +      target="callback" inheritAll="true" inheritRefs="true">
  +      <property name="buildFile" 
  +        value="${maven.test.callback.pre-run-singletest.buildFile}" />
  +      <property name="buildTarget" 
  +        value="${maven.test.callback.pre-run-singletest.buildTarget}" />
  +      <property name="buildTargetName" 
  +        value="maven.test.callback.pre-run-singletest.buildTarget" />
  +    </maven-ant>
  +  </target>
  +
  +  <target name="post-run-singletest-callback">
  +    <maven-ant antfile="${maven.home}/plugins/core/build-init.xml"
  +      target="callback" inheritAll="true" inheritRefs="true">
  +      <property name="buildFile" 
  +        value="${maven.test.callback.post-run-singletest.buildFile}" />
  +      <property name="buildTarget" 
  +        value="${maven.test.callback.post-run-singletest.buildTarget}" />
  +      <property name="buildTargetName" 
  +        value="maven.test.callback.post-run-singletest.buildTarget" />
  +    </maven-ant>
  +  </target>
   
     <target 
       name="do-run-singletest" 
  
  
  

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

Reply via email to