Maven Cobertura plugin not generating coverage.xml

前端 未结 8 1884
我在风中等你
我在风中等你 2021-01-31 15:01

I am trying to generate a coverage.xml so that I can reference it in Cobertura plugin of Hudson, but the file is not being created.

I\'ve added the following to my POM

相关标签:
8条回答
  • 2021-01-31 15:57

    I put the plugin in the build section and it works:

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <formats>
                        <format>html</format>
                        <format>xml</format>
                    </formats>
                </configuration>
            </plugin>
        </plugins>
    </build>
    

    The reporting section and its differences to the plugin section are described here. I don't know if this is a maven [3.0.4] or cobertura-plugin issue.

    0 讨论(0)
  • 2021-01-31 15:59

    I had the same issue but it's resolved right now: Just add -Dcobertura.report.format=xml after your maven command. It should work

    0 讨论(0)
提交回复
热议问题