Question

I´m using scalatest-maven-plugin in Eclipse. But my output report has bad encoding:

output encoding

my pom.xml:

    <properties>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
    <encoding>UTF-8</encoding>
    <scala.tools.version>2.10</scala.tools.version>
    <scala.version>2.10.4</scala.version>
</properties>

but as you can see, encoding property doesnt work. I found that this can be caused by color tags for console output - but there were no solution, how to fix it.

Maven is in version 3.0.5, Eclipse Juno

Was it helpful?

Solution

I found solution. You can use argLine to fix it:

<plugin>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest-maven-plugin</artifactId>
            <version>1.0-RC2</version>
            <configuration>
                <reportsDirectory>${project.build.directory}/scalatest-reports</reportsDirectory>
                <junitxml>.</junitxml>
                <stdout>W</stdout>
                <htmlreporters>./html</htmlreporters>
                <filereports>WDF TestSuite.txt</filereports>
                <suites>test.common.Login,test.common.Logout</suites>
                <argLine>-Dfile.encoding=UTF-8</argLine> <!-- add this line-->
            </configuration>
</plugin>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top