У меня есть модульный тест, и я хочу получить результат покрытия кода в отчете. Когда я запускаю тесты с Maven, у меня есть в журналах:Почему плагин JaCoCo Maven пропускает отчет?
[INFO]
[INFO] --- jacoco-maven-plugin:0.7.4.201502262128:report (post-unit-test) @ che-core-api-git ---
[INFO] Skipping JaCoCo execution due to missing execution data file:C:\dev\eclipse_che_core\platform-api\che-core-api-git\target\coverage-reports\jacoco-ut.exec
Это соответствующая часть моей POM.
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<!--
Prepares the property pointing to the JaCoCo runtime agent which
is passed as VM argument when Maven the Surefire plugin is executed.
-->
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
<!--
Sets the name of the property containing the settings
for JaCoCo runtime agent.
-->
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
<!--
Ensures that the code coverage report for unit tests is created after
unit tests have been run.
-->
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
<!-- Sets the output directory for the code coverage report. -->
<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
Почему плагин пропускает выполнение? Как я могу это исправить?
Я сделал изменения, и теперь я ahve covergae-отчеты, но пуста, а также папка site jave index.html, но когда я его открываю, я не вижу никакого результата. – user1365697
Я обновил pom.xml в вопросе – user1365697
Я не получаю информацию сейчас, но также не получаю результатов – user1365697