Scala 如何使用scoverage maven插件生成xml报告?
我试图生成scoverage xml报告,以便在Jenkins中使用它。但我能得到的只是文件夹scoverage classes和我的.scala文件。以下是我的pom.xml的一部分:Scala 如何使用scoverage maven插件生成xml报告?,scala,maven,scoverage,Scala,Maven,Scoverage,我试图生成scoverage xml报告,以便在Jenkins中使用它。但我能得到的只是文件夹scoverage classes和我的.scala文件。以下是我的pom.xml的一部分: <build> <plugins> <plugin> <groupId>org.scala-tools</groupId> <artifact
<build>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.15.2</version>
<executions>
<execution>
<id>scala-compile</id>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>${scalatest.plugin.version}</version>
<configuration>
<junitxml>surefire-reports</junitxml>
<stdout>W</stdout>
</configuration>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.scoverage</groupId>
<artifactId>scoverage-maven-plugin</artifactId>
<version>1.1.1</version>
<configuration>
<scalaVersion>${scala.version}</scalaVersion>
<aggregate>true</aggregate>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.9</version>
<reportSets>
<reportSet>
<reports>
<report>index</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.scoverage</groupId>
<artifactId>scoverage-maven-plugin</artifactId>
<version>${scoverage.plugin.version}</version>
<reportSets>
<reportSet>
<reports>
<report>report
</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
org.scala-tools
maven scala插件
2.15.2
scala编译
编译
测试编译
org.scalatest
scalatest maven插件
${scalatest.plugin.version}
可靠的报告
W
测试
测试
测试
org.scoverage
scoverage maven插件
1.1.1
${scala.version}
真的
org.apache.maven.plugins
maven项目信息报告插件
2.9
指数
org.scoverage
scoverage maven插件
${scoverage.plugin.version}
报告
Scalatest生成xml报告,但Scoverage不生成。我尝试使用不同的参数运行maven,比如mvn scoverage:report、mvn scoverage:report site等等。没什么帮助。我应该在pom中更改什么才能使其正常工作?事实证明,我有scala编译器插件,而scoverage插件不支持该插件。另外,org.scala-tools中的maven scala编译器插件似乎已经过时。scoverage插件支持的插件包括:
- maven:scala maven插件
- sbt编译器maven插件:sbt编译器maven插件