0

I'm struggling to find a solution for my problem:

Some of my tests are ko because of encoding , so I have added -Dfile.encoding=ISO-8859-1 in my surefire plugin

    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.19.1</version>
    <executions>
      <execution>
        <id>default-test</id>
        <phase>test</phase>
        <goals>
          <goal>test</goal>
        </goals>
        <configuration>
           <argLine>-Dfile.encoding=ISO-8859-1</argLine>
        </configuration>
        .....

The tests passes but sonarqube coverage is 0%, I don't understand why it shows 0% when I add -Dfile.encoding=ISO-8859-1 to the plugin surefire, do you have any idea ?

Thanks

dreamer
  • 61
  • 1
  • 6
  • First why are you using such an ancient version of maven-surefire-plugin ... furthermore why are you manually binding it to the life cycle ... also it would be helpful to know which JDK, Maven, testing framework you are using ? And also an example of the rest of your setup would be helpful because sonarqube uses usually JaCoCo ??? Is that correctly configured? – khmarbaise Feb 17 '23 at 15:40

0 Answers0