dion        2002/06/06 08:46:29

  Modified:    src/templates/build/plugins/test build.xml
  Log:
  Last of the callback fixes, I hope
  
  Revision  Changes    Path
  1.8       +62 -44    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.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- build.xml 6 Jun 2002 15:04:00 -0000       1.7
  +++ build.xml 6 Jun 2002 15:46:29 -0000       1.8
  @@ -51,6 +51,46 @@
   
       <mkdir dir="${maven.test.dest}"/>
       <mkdir dir="${maven.test.reportsDirectory}"/>
  +    
  +    <!-- test -->
  +    <condition property="maven.test.callback.pre-test.ok">
  +      <and>
  +        <available file="${maven.test.callback.pre-test.buildFile}"/>
  +        <not>
  +          <equals arg1="${maven.test.callback.pre-test.buildTarget}"
  +                  arg2="$${maven.test.callback.pre-test.buildTarget}" />
  +        </not>
  +      </and>
  +    </condition>
  +    <condition property="maven.test.callback.post-test.ok">
  +      <and>
  +        <available file="${maven.test.callback.post-test.buildFile}"/>
  +        <not>
  +          <equals arg1="${maven.test.callback.post-test.buildTarget}"
  +                  arg2="$${maven.test.callback.post-test.buildTarget}" />
  +        </not>
  +      </and>
  +    </condition>
  +
  +    <!-- run-singletest -->
  +    <condition property="maven.test.callback.pre-run-singletest.ok">
  +      <and>
  +        <available file="${maven.test.callback.pre-run-singletest.buildFile}"/>
  +        <not>
  +          <equals arg1="${maven.test.callback.pre-run-singletest.buildTarget}"
  +                  arg2="$${maven.test.callback.pre-run-singletest.buildTarget}" />
  +        </not>
  +      </and>
  +    </condition>
  +    <condition property="maven.test.callback.post-run-singletest.ok">
  +      <and>
  +        <available file="${maven.test.callback.post-run-singletest.buildFile}"/>
  +        <not>
  +          <equals arg1="${maven.test.callback.post-run-singletest.buildTarget}"
  +                  arg2="$${maven.test.callback.post-run-singletest.buildTarget}" />
  +        </not>
  +      </and>
  +    </condition>
   
     </target>
   
  @@ -103,28 +143,16 @@
       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" inheritRefs="true" exportRefs="false" exportAll="false">
  -      <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" inheritRefs="true" exportRefs="false" exportAll="false">
  -      <property name="buildFile" 
  -        value="${maven.test.callback.post-test.buildFile}" />
  -      <property name="buildTarget" 
  -        value="${maven.test.callback.post-test.buildTarget}" />
  -      <property name="buildTargetName" 
  -        value="maven.test.callback.post-test.buildTarget" />
  -    </maven-ant>
  +  <target name="pre-test-callback" if="maven.test.callback.pre-test.ok">
  +    <maven-ant antfile="${maven.test.callback.pre-test.buildFile}" 
  +      target="${maven.test.callback.pre-test.buildTarget}"
  +      inheritRefs="true" exportAll="false" exportRefs="false"/>
  +  </target>
  +
  +  <target name="post-test-callback" if="maven.test.callback.post-test.ok">
  +    <maven-ant antfile="${maven.test.callback.post-test.buildFile}" 
  +      target="${maven.test.callback.post-test.buildTarget}"
  +      inheritRefs="true" exportAll="false" exportRefs="false"/>
     </target>
       
     <target 
  @@ -206,28 +234,18 @@
         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" inheritRefs="true" exportRefs="false" exportAll="false">
  -      <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" inheritRefs="true" exportRefs="false" exportAll="false">
  -      <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 name="pre-run-singletest-callback"
  +    if="maven.test.callback.pre-run-singletest.ok">
  +    <maven-ant antfile="${maven.test.callback.pre-run-singletest.buildFile}" 
  +      target="${maven.test.callback.pre-run-singletest.buildTarget}"
  +      inheritRefs="true" exportAll="false" exportRefs="false"/>
  +  </target>
  +
  +  <target name="post-run-singletest-callback"
  +    if="maven.test.callback.post-run-singletest.ok">
  +    <maven-ant antfile="${maven.test.callback.post-run-singletest.buildFile}" 
  +      target="${maven.test.callback.post-run-singletest.buildTarget}"
  +      inheritRefs="true" exportAll="false" exportRefs="false"/>
     </target>
   
     <target 
  
  
  

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

Reply via email to