antlets/junit/src xbuild.xml,1.6,1.7

[email protected] Sat, 06 Mar 2004 02:04:32 -0800
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/antlets/junit/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23444/junit/src

Modified Files:
	xbuild.xml 
Log Message:
moved environment check to fail early

Index: xbuild.xml
===================================================================
RCS file: /cvsroot/metamorphosis/antlets/junit/src/xbuild.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** xbuild.xml	5 Mar 2004 16:59:38 -0000	1.6
--- xbuild.xml	6 Mar 2004 10:04:30 -0000	1.7
***************
*** 1,8 ****
  <?xml version="1.0"?>
  <project default="junit.test" name="junit.antlet">
!   <description>
!     Perform the unit tests using JUnit, and generates reports.
!   </description>
!   <import file="usage.xml"/>
    
     <!-- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -->
--- 1,31 ----
  <?xml version="1.0"?>
  <project default="junit.test" name="junit.antlet">
!    <description>
!      Perform the unit tests using JUnit, and generates reports.
!    </description>
!    <import file="usage.xml"/>
! 
!    <property name="junit-antlet:junitjar" value="junit-3.8.1.jar"/>
!    <property name="junit-antlet:repository" value="http://www.ibiblio.org/maven/junit/jars/"/>
!    <condition property="junit-antlet:check-fail">
!      <not>
!         <available  file="${ant.home}/lib/${junit-antlet:junitjar}"/>
!      </not>
!    </condition>
! 
!    <fail if="junit-antlet:check-fail">
!         *******************************************************************************
!         *	
!         *	The initialisation of jUnit tasks has failed.  
!         *	
!         *******************************************************************************
!         *	
!         *   ${junit-antlet:junitjar} was not found in ${ant.home}/lib
!         *	
!         *   Please download the jar from the jUnit project or from ${junit-antlet:repository}
!         *	
!         *******************************************************************************
!    </fail>
! 
    
     <!-- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -->
***************
*** 10,15 ****
     <!-- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -->
     <target name="-junit.init" description="Sets the properties for this antlet">
- 	   <property name="junit-antlet:junitjar" value="junit-3.8.1.jar"/>
- 	   <property name="junit-antlet:repository" value="http://www.ibiblio.org/maven/junit/jars/"/>
  	   <dirname property="junit-antlet:dir" file="${ant.file.junit.antlet}"/>
  	   <property name="junit-antlet:build.dir" value="${project.build.dir}/junit"/>  
--- 33,36 ----
***************
*** 26,30 ****
    <target name="junit.test"  
    	      description="Perform jUnit tests."
!   	      depends="-junit.init, -junit.check-env, -junit.mkdir, compile">
  
     <!-- Initialising  -->
--- 47,51 ----
    <target name="junit.test"  
    	      description="Perform jUnit tests."
!   	      depends="-junit.setup, compile">
  
     <!-- Initialising  -->
***************
*** 36,40 ****
      <copy todir="${junit-antlet:build.dir}/classes">
      	<fileset dir="${project.test.dir}">
!     		<exclude name="**/*.java"/> <!-- was include *.properties -->
      	</fileset>
      </copy>
--- 57,61 ----
      <copy todir="${junit-antlet:build.dir}/classes">
      	<fileset dir="${project.test.dir}">
!     		<exclude name="**/*.java"/>
      	</fileset>
      </copy>
***************
*** 54,58 ****
      </javac>
      
!     <!-- create property file to be used by junit antlet -->
      <xslt in="properties.xml" out="${junit-antlet:work.dir}/test.xml"
            style="${junit-antlet:dir}/resources/stylesheets/test.xsl"
--- 75,79 ----
      </javac>
      
!     <!-- create build file to be used by junit antlet -->
      <xslt in="properties.xml" out="${junit-antlet:work.dir}/test.xml"
            style="${junit-antlet:dir}/resources/stylesheets/test.xsl"
***************
*** 95,99 ****
     <!-- Initialise jUnit environment                                       -->
     <!-- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -->
!    <target name="-junit.mkdir" depends="-junit.init">
          <mkdir dir="${junit-antlet:docs.dir}"/>
  		<mkdir dir="${junit-antlet:build.dir}"/>
--- 116,120 ----
     <!-- Initialise jUnit environment                                       -->
     <!-- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -->
!    <target name="-junit.setup" depends="-junit.init">
          <mkdir dir="${junit-antlet:docs.dir}"/>
  		<mkdir dir="${junit-antlet:build.dir}"/>
***************
*** 102,133 ****
          <mkdir dir="${junit-antlet:build.dir}/classes"/>
     </target>
!  
!   <!-- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -->
!   <!-- Checks the environment for this antlet                             -->
!   <!-- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -->
!    <target name="-junit.check-env" description="Checks the environment for this antlet">
! 	   <condition property="junit-antlet:check-fail" value="true">
!             <not>
!                 <available  file="${ant.home}/lib/${junit-antlet:junitjar}"/>
! 	        </not>
!        </condition>
! 
!    	  <fail if="junit-antlet:check-fail">
!    		
!         *******************************************************************************
!         *	
!         *	The initialisation of jUnit tasks has failed.  
!         *	
!         *******************************************************************************
!         *	
!         *   ${junit-antlet:junitjar} was not found in ${ant.home}/lib
!         *	
!         *   Please download the jar from the jUnit project or from ${junit-antlet:repository}
!         *	
!         *******************************************************************************
! 	 </fail>
! 
!    </target>
!   
    <!-- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -->
    <!-- Turn off halt-on-failure to perform jUnit tests without failing.   -->
--- 123,127 ----
          <mkdir dir="${junit-antlet:build.dir}/classes"/>
     </target>
!    
    <!-- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -->
    <!-- Turn off halt-on-failure to perform jUnit tests without failing.   -->
***************
*** 137,146 ****
      <property name="junit.test.haltonfailure" value="no"/>
    </target>
-  
-   <!-- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -->
-   <!-- Compile the source code of the test files                           -->
-   <!-- '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -->
-   <!--target name="-junit.compile" description="Compile test sources" >
-   </target -->
-  
  </project>  
--- 131,133 ----



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click