[
https://jira.codehaus.org/browse/SUREFIRE-777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=282875#comment-282875
]
Karl Heinz Marbaise commented on SUREFIRE-777:
----------------------------------------------
I have created a small patch which solves the problem. (Created based on the
SVN Tag for Release 2.10)
{code}
Index:
src/main/java/org/apache/maven/plugins/surefire/report/FailsafeReportMojo.java
===================================================================
---
src/main/java/org/apache/maven/plugins/surefire/report/FailsafeReportMojo.java
(revision 1198022)
+++
src/main/java/org/apache/maven/plugins/surefire/report/FailsafeReportMojo.java
(working copy)
@@ -22,6 +22,8 @@
import org.apache.maven.project.MavenProject;
import java.io.File;
+import java.util.Locale;
+import java.util.ResourceBundle;
/**
@@ -59,4 +61,31 @@
return outputName;
}
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getName( Locale locale )
+ {
+ return getBundle( locale ).getString( "report.failsafe.name" );
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getDescription( Locale locale )
+ {
+ return getBundle( locale ).getString( "report.failsafe.description" );
+ }
+
+
+ /*
+ * This is currently a copy of the getBundle() method of the
AbstractSurefireReportMojo class,
+ * cause the failsafe report only different in two names for the bundles.
+ */
+ private ResourceBundle getBundle( Locale locale )
+ {
+ return ResourceBundle.getBundle( "surefire-report", locale,
this.getClass().getClassLoader() );
+ }
+
}
Index: src/main/resources/surefire-report_de.properties
===================================================================
--- src/main/resources/surefire-report_de.properties (revision 1198022)
+++ src/main/resources/surefire-report_de.properties (working copy)
@@ -34,3 +34,6 @@
report.surefire.name=Surefire Bericht
report.surefire.text.note1 =Hinweis: Fehlschl\u00E4ge werden erwartet und
durch Behauptungen \u00FCberpr\u00FCft w\u00E4hrend Fehler unerwartet sind.
report.surefire.text.note2 =Hinweis: Die Paketstatistiken werden nicht
rekursiv berechnet, es werden lediglich die Ergebnisse aller enthaltenen Tests
aufsummiert.
+
+report.failsafe.name=Failsafe Bericht
+report.failsafe.description=Bericht \u00FCber die Integrationstestresultate
des Projekts.
Index: src/main/resources/surefire-report.properties
===================================================================
--- src/main/resources/surefire-report.properties (revision 1198022)
+++ src/main/resources/surefire-report.properties (working copy)
@@ -35,3 +35,5 @@
report.surefire.text.note1=Note: failures are anticipated and checked for with
assertions while errors are unanticipated.
report.surefire.text.note2=Note: package statistics are not computed
recursively, they only sum up all of its testsuites numbers.
+report.failsafe.name=Failsafe Report
+report.failsafe.description=Report on the integration test results of the
project.
{code}
> Wrong default name for Failsafe Report
> --------------------------------------
>
> Key: SUREFIRE-777
> URL: https://jira.codehaus.org/browse/SUREFIRE-777
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Report Plugin
> Affects Versions: 2.10
> Reporter: Martin Höller
>
> For SUREFIRE-755 Stephen added a new class FailsafeReportMojo which derives
> from AbstractSurefireReportMojo. However, it doesn't override getName() or
> getDescription and thus the new failsafe-report has the same name as the
> default surefire-report.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira