evenisse 66428f1a24 Fixed MAVEN-452. Patch for charter encoding. Thanks to Kuisong Tong.
I think that this must be apply to all uses of doc:jsl tag.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113608 13f79535-47bb-0310-9956-ffa450edef68
2003-07-07 18:49:36 +00:00

67 lines
2.0 KiB
XML

<?xml version="1.0"?>
<project
xmlns:ant="jelly:ant"
xmlns:doc="doc"
xmlns:j="jelly:core">
<goal name="maven-junit-report-plugin:register">
<j:if test="${unitTestSourcesPresent == 'true'}">
<doc:registerReport
name="Unit Tests"
pluginName="maven-junit-report-plugin"
description="Report on the results of the unit tests."
link="junit-report"/>
</j:if>
</goal>
<goal name="maven-junit-report-plugin:deregister">
<j:if test="${unitTestSourcesPresent == 'true'}">
<doc:deregisterReport name="Unit Tests"/>
</j:if>
</goal>
<!-- ================================================================== -->
<!-- C R E A T E J U N I T X M L R E P O R T -->
<!-- ================================================================== -->
<goal
name="maven-junit-report-plugin:report"
description="Generate a report from the test results">
<j:if test="${unitTestSourcesPresent == 'true'}">
<!-- Make sure that the report is generated whether the tests pass or
not -->
<j:set var="ignoreTestFailureOld" value="${maven.test.failure.ignore}"/>
<j:set var="maven.test.failure.ignore" scope="parent" value="true"/>
<attainGoal name="test:test"/>
<j:set var="maven.test.failure.ignore" scope="parent"
value="${ignoreTestFailureOld}"/>
<j:set var="testReportsDirectory"
value="${pom.getPluginContext('maven-test-plugin').getVariable('maven.test.reportsDirectory')}"/>
<ant:mkdir dir="${testReportsDirectory}"/>
<!-- Consolidate the reports into a single -->
<ant:junitreport todir="${maven.build.dir}">
<ant:fileset dir="${testReportsDirectory}">
<ant:include name="TEST-*.xml"/>
</ant:fileset>
</ant:junitreport>
<doc:jsl
input="${maven.build.dir}/TESTS-TestSuites.xml"
output="junit-report.xml"
stylesheet="${plugin.resources}/junit.jsl"
outputMode="xml"
prettyPrint="true"
/>
</j:if>
</goal>
</project>