我正在尝试生成scoverage报告,以便在Jenkins中使用它。但是我所能得到的只有包含我的.scala文件的文件夹覆盖类。下面是我的pom.xml的一部分:
<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>Scalatest生成xml报告,但Scoverage不生成xml报告。我试着用不同的arg运行maven,比如mvn覆盖率:report、mvn覆盖:report等等。什么都帮不上忙。我应该改变什么在我的pom使它工作?
发布于 2016-04-29 10:05:27
原来,我有scala编译器插件,它不受scoverage插件的支持。而且,它看起来像org.scala中的maven scala编译器插件--工具已经过时了。由scoverage插件支持的是:
https://stackoverflow.com/questions/36933024
复制相似问题