From: Carlos S. <car...@us...> - 2005-06-15 17:23:35
|
carlossg 05/06/15 10:23:24 Modified: cobertura plugin.jelly Log: Added cobertura:off Revision Changes Path 1.3 +21 -8 maven-plugins/cobertura/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/cobertura/plugin.jelly,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- plugin.jelly 15 Jun 2005 16:49:41 -0000 1.2 +++ plugin.jelly 15 Jun 2005 17:23:24 -0000 1.3 @@ -118,6 +118,20 @@ </goal> <!-- ================================================================== --> + <!-- I N S T R U M E N T A T I O N O F F --> + <!-- ================================================================== --> + <goal name="cobertura:off" description="Restore previous properties"> + + <maven:set plugin="maven-java-plugin" property="maven.junit.fork" value="${oldfork}"/> + <maven:set plugin="maven-java-plugin" property="maven.build.dest" value="${oldBuildDest}"/> + <maven:set plugin="maven-test-plugin" property="maven.build.dest" value="${oldBuildDest}"/> + <j:expr value="${pom.getPluginContext('maven-test-plugin').setVariable( + 'maven.test.failure.ignore', ignoreTestFailureOld)}"/> + + </goal> + + + <!-- ================================================================== --> <!-- D E F A U L T G O A L --> <!-- ================================================================== --> <goal name="cobertura" @@ -125,18 +139,21 @@ prereqs="cobertura:html-report" /> + <!-- ================================================================== --> <!-- R E P O R T G O A L --> <!-- ================================================================== --> <goal name="cobertura:html-report" - description="Generate HTML test coverage reports with Cobertura" - prereqs="cobertura:on,test:test"> + description="Generate HTML test coverage reports with Cobertura"> <j:choose> <j:when test="${unitTestSourcesPresent == 'true'}"> <j:catch var="ex"> + + <attainGoal name="cobertura:on"/> + <attainGoal name="test:test"/> <j:set var="sourceDir" value="${context.getAntProject().getReferences().get('maven.compile.src.set')}" /> <u:tokenize var="sourceDirList" delim="${path.separator}">${sourceDir}</u:tokenize> @@ -156,11 +173,7 @@ </ant:classpath> </ant:cobertura-report> - <maven:set plugin="maven-java-plugin" property="maven.junit.fork" value="${oldfork}"/> - <maven:set plugin="maven-java-plugin" property="maven.build.dest" value="${oldBuildDest}"/> - <maven:set plugin="maven-test-plugin" property="maven.build.dest" value="${oldBuildDest}"/> - <j:expr value="${pom.getPluginContext('maven-test-plugin').setVariable( - 'maven.test.failure.ignore', ignoreTestFailureOld)}"/> + <attainGoal name="cobertura:off"/> </j:catch> @@ -178,5 +191,5 @@ </j:choose> </goal> - + </project> |