You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Mirko Friedenhagen (JIRA)" <ji...@codehaus.org> on 2013/06/17 22:08:03 UTC

[jira] (SUREFIRE-998) Problems with Umlauts in (and probably ) content of junit xml report.

     [ https://jira.codehaus.org/browse/SUREFIRE-998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mirko Friedenhagen reopened SUREFIRE-998:
-----------------------------------------


Kristian, I am afraid the logic is not working correctly, I updated my test-project at: https://github.com/mfriedenhagen/pastebin/tree/surefire-encoding-test

*surefire-2.14.1*

{{env JAVA_TOOL_OPTIONS="-Dfile.encoding=ISO-8859-1" mvn -Dmaven-surefire-plugin.version=2.14.1}}

Umlauts are encoded (correctly) as ISO-8859-1 in target/surefire-reports/net.friedenhagen.surefireencodingtest.EncodingTest-output.txt and
(correctly as stated by the XML-declaration) as UTF-8 in target/surefire-reports/TEST-net.friedenhagen.surefireencodingtest.EncodingTest.xml

*surefire-2.15*

{{env JAVA_TOOL_OPTIONS="-Dfile.encoding=ISO-8859-1" mvn -Dmaven-surefire-plugin.version=2.15}}

Umlauts are encoded (correctly) as ISO-8859-1 in target/surefire-reports/net.friedenhagen.surefireencodingtest.EncodingTest-output.txt and
(*incorrectly* as the XML-declaration state they should be UTF-8) as well as ISO-8859-1 in target/surefire-reports/TEST-net.friedenhagen.surefireencodingtest.EncodingTest.xml
                
> Problems with Umlauts in <system-out> (and probably <system-err>) content of junit xml report.
> ----------------------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-998
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-998
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Report Plugin
>    Affects Versions: 2.15
>         Environment: Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100)
> Maven home: /Software/nobackup/apache-maven-3.0.5
> Java version: 1.7.0_21, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home/jre
> Default locale: de_DE, platform encoding: UTF-8
> OS name: "mac os x", version: "10.8.3", arch: "x86_64", family: "mac"
>            Reporter: Mirko Friedenhagen
>            Assignee: Kristian Rosenvold
>             Fix For: 2.15
>
>         Attachments: pastebin-surefire-encoding-test.zip
>
>
> When I output german umlauts on stdout, with surefire-2.14.1 everything runs fine, with surefire-2.15-SNAPSHOT (ce62b9a2c0b36105355f44c71f29f01d2f818c46) I get the following stacktrace:
> {code}
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-report-plugin:2.15-SNAPSHOT:report (default-cli) on project surefire-encoding-test: An error has occurred in Surefire Report report generation. Error parsing JUnit XML report /Users/mirko/workspace/foss/pastebin/target/surefire-reports/TEST-net.friedenhagen.surefireencodingtest.EncodingTest.xml: The reference to entity "amp" must end with the ';' delimiter. -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-report-plugin:2.15-SNAPSHOT:report (default-cli) on project surefire-encoding-test: An error has occurred in Surefire Report report generation.
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
> 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
> 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
> 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
> 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:601)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
> 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: org.apache.maven.plugin.MojoExecutionException: An error has occurred in Surefire Report report generation.
> 	at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:122)
> 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
> 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
> 	... 19 more
> Caused by: org.apache.maven.reporting.MavenReportException: Error parsing JUnit XML report /Users/mirko/workspace/foss/pastebin/target/surefire-reports/TEST-net.friedenhagen.surefireencodingtest.EncodingTest.xml
> 	at org.apache.maven.plugins.surefire.report.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:100)
> 	at org.apache.maven.plugins.surefire.report.SurefireReportGenerator.doGenerateReport(SurefireReportGenerator.java:64)
> 	at org.apache.maven.plugins.surefire.report.AbstractSurefireReportMojo.executeReport(AbstractSurefireReportMojo.java:185)
> 	at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:190)
> 	at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractMavenReport.java:99)
> 	... 21 more
> Caused by: org.xml.sax.SAXParseException; lineNumber: 66; columnNumber: 54; The reference to entity "amp" must end with the ';' delimiter.
> 	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
> 	at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
> 	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> 	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> 	at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> 	at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
> 	at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> 	at org.apache.maven.plugins.surefire.report.TestSuiteXmlParser.parse(TestSuiteXmlParser.java:101)
> 	at org.apache.maven.plugins.surefire.report.TestSuiteXmlParser.parse(TestSuiteXmlParser.java:81)
> 	at org.apache.maven.plugins.surefire.report.SurefireReportParser.parseXMLReportFiles(SurefireReportParser.java:92)
> 	... 25 more
> [ERROR]
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> {code}
> Probably related to SUREFIRE-996.
> How to reproduce:
> * Install surefire-snapshot (Revision: ce62b9a2c0b36105355f44c71f29f01d2f818c46)
> * Download attached zip:
> ** {{mvn -e -Dmaven-surefire-plugin.version=2.15-SNAPSHOT}} will produce the stacktrace above
> ** {{mvn -e -Dmaven-surefire-plugin.version=2.14.1}} will run successfully.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira