glennm      2002/07/12 12:32:36

  Modified:    src/bin  driver.jelly
               src/plugins/test plugin.jelly
  Log:
  Glenn McAllister - 2002/07/12
  
  - Added xml declaration to the top of driver.jelly so vim will do syntax
    highlighting for me. :-)
  
  - If there are no test sources don't try to compile them and don't try to run
    tests.  Do tell the user that there are no test sources to compile and that
    there are no tests to run (gentle reminder that they should have unit tests).
  
  Revision  Changes    Path
  1.18      +2 -0      jakarta-turbine-maven/src/bin/driver.jelly
  
  Index: driver.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/bin/driver.jelly,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- driver.jelly      12 Jul 2002 03:47:22 -0000      1.17
  +++ driver.jelly      12 Jul 2002 19:32:36 -0000      1.18
  @@ -1,3 +1,5 @@
  +<?xml version="1.0"?>
  +
   <project
     xmlns:j="jelly:core"
     xmlns:define="jelly:define"
  
  
  
  1.8       +58 -41    jakarta-turbine-maven/src/plugins/test/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/plugins/test/plugin.jelly,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- plugin.jelly      8 Jul 2002 16:47:25 -0000       1.7
  +++ plugin.jelly      12 Jul 2002 19:32:36 -0000      1.8
  @@ -1,3 +1,4 @@
  +<?xml version="1.0"?>
   
   <project xmlns:j="jelly:core">
   
  @@ -15,53 +16,69 @@
           description="Compile the TestCases and TestSuites"
           prereqs="java:compile,java:jar-resources,test:prepare-filesystem">
   
  -    <javac 
  -      destdir="${maven.test.dest}"
  -      excludes="**/package.html"
  -      debug="${maven.compile.debug}"
  -      deprecation="${maven.compile.deprecation}"
  -      optimize="${maven.compile.optimize}">
  -      <classpath>
  -        <pathelement path="${maven.build.dest}"/>
  -        <path refid="maven.dependency.classpath"/>
  -      </classpath>
  -      <src>
  -        <path location="${pom.build.unitTestSourceDirectory}"/>        
  -      </src>
  -    </javac>
  -
  +    <j:if test="${unitTestSourcesPresent}">
  +    
  +      <javac 
  +        destdir="${maven.test.dest}"
  +        excludes="**/package.html"
  +        debug="${maven.compile.debug}"
  +        deprecation="${maven.compile.deprecation}"
  +        optimize="${maven.compile.optimize}">
  +        <classpath>
  +          <pathelement path="${maven.build.dest}"/>
  +          <path refid="maven.dependency.classpath"/>
  +        </classpath>
  +        <src>
  +          <path location="${pom.build.unitTestSourceDirectory}"/>        
  +        </src>
  +      </javac>
  +      
  +    </j:if>
  +
  +    <j:if test="${!unitTestSourcesPresent}">
  +      <echo>No test source files to compile.</echo>
  +    </j:if>
  +      
     </goal>
   
     <goal name="test:test"
           description="Test the application"
           prereqs="test:compile">
   
  -    <junit printSummary="yes" 
  -           failureProperty="maven.test.failure"
  -           fork="${maven.junit.fork}"
  -           dir="${maven.junit.dir}">
  -      <sysproperty key="basedir" value="${basedir}"/>
  -      <formatter type="xml"/>
  -      <formatter type="plain" usefile="${maven.junit.usefile}"/>
  -      <classpath>
  -        <path refid="maven.dependency.classpath"/>
  -        <pathelement location="${maven.build.dest}"/>
  -        <pathelement location="${maven.test.dest}"/>
  -      </classpath>
  -      <batchtest todir="${maven.test.reportsDirectory}">
  -        <fileset dir="${pom.build.unitTestSourceDirectory}">
  -           <j:forEach var="pat" items="${pom.build.unitTest.includes}">
  -             <include name="${pat}"/>
  -           </j:forEach>
  -           <j:forEach var="pat" items="${pom.build.unitTest.excludes}">
  -             <exclude name="${pat}"/>
  -           </j:forEach>
  -        </fileset>
  -      </batchtest>
  -    </junit>
  -
  -    <j:if test="${maven.test.failure}">
  -      <fail message="There were test failures."/>
  +    <j:if test="${unitTestSourcesPresent}">
  +    
  +      <junit printSummary="yes" 
  +             failureProperty="maven.test.failure"
  +             fork="${maven.junit.fork}"
  +             dir="${maven.junit.dir}">
  +        <sysproperty key="basedir" value="${basedir}"/>
  +        <formatter type="xml"/>
  +        <formatter type="plain" usefile="${maven.junit.usefile}"/>
  +        <classpath>
  +          <path refid="maven.dependency.classpath"/>
  +          <pathelement location="${maven.build.dest}"/>
  +          <pathelement location="${maven.test.dest}"/>
  +        </classpath>
  +        <batchtest todir="${maven.test.reportsDirectory}">
  +          <fileset dir="${pom.build.unitTestSourceDirectory}">
  +            <j:forEach var="pat" items="${pom.build.unitTest.includes}">
  +              <include name="${pat}"/>
  +            </j:forEach>
  +            <j:forEach var="pat" items="${pom.build.unitTest.excludes}">
  +              <exclude name="${pat}"/>
  +            </j:forEach>
  +          </fileset>
  +        </batchtest>
  +      </junit>
  +
  +      <j:if test="${maven.test.failure}">
  +        <fail message="There were test failures."/>
  +      </j:if>
  +
  +    </j:if>
  +    
  +    <j:if test="${!unitTestSourcesPresent}">
  +      <echo>No tests to run.</echo>
       </j:if>
   
     </goal>
  
  
  

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

Reply via email to