Olá! Configurei o arquivo pom.xml com o jacoco (report) porém o report não é criado e a mensagem "Skipping JaCoCo execution due to missing execution data file" é exibida no prompt.
Consegue me ajudar? Abaixo seguem logs.
Obrigado.
* Windows 10 cmd prompt
C:\Users\edtro\Documents\workspace\produtos>mvn verify
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------< br.com.alura.maven:produtos >---------------------
[INFO] Building produtos 1.0-SNAPSHOT
[INFO] --------------------------------[ ear ]---------------------------------
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.1:prepare-agent (default) @ produtos ---
[INFO] argLine set to -javaagent:C:\\Users\\edtro\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.1\\org.jacoco.agent-0.8.1-runtime.jar=destfile=C:\\Users\\edtro\\Documents\\workspace\\produtos\\target\\jacoco.exec
[INFO]
[INFO] --- maven-ear-plugin:2.8:generate-application-xml (default-generate-application-xml) @ produtos ---
[INFO] Generating application.xml
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ produtos ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\edtro\Documents\workspace\produtos\src\main\resources
[INFO]
[INFO] --- maven-ear-plugin:2.8:ear (default-ear) @ produtos ---
[INFO] Could not find manifest file: C:\Users\edtro\Documents\workspace\produtos\target\produtos-1.0-SNAPSHOT\META-INF\MANIFEST.MF - Generating one
[INFO] Building jar: C:\Users\edtro\Documents\workspace\produtos\target\produtos-1.0-SNAPSHOT.ear
[INFO]
[INFO] >>> maven-pmd-plugin:3.9.0:check (default) > :pmd @ produtos >>>
[INFO]
[INFO] --- maven-pmd-plugin:3.9.0:pmd (pmd) @ produtos ---
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[WARNING] This analysis could be faster, please consider using Incremental Analysis: https://pmd.github.io/pmd-6.0.1/pmd_userdocs_getting_started.html#incremental-analysis
[INFO]
[INFO] <<< maven-pmd-plugin:3.9.0:check (default) < :pmd @ produtos <<<
[INFO]
[INFO]
[INFO] --- maven-pmd-plugin:3.9.0:check (default) @ produtos ---
[INFO]
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.1:report (default) @ produtos ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.561 s
[INFO] Finished at: 2018-03-31T21:10:17-03:00
[INFO] ------------------------------------------------------------------------
* Arquivo pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.alura.maven</groupId>
<artifactId>produtos</artifactId>
<packaging>ear</packaging>
<version>1.0-SNAPSHOT</version>
<name>produtos</name>
<url>http://alura.com.br</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.thoughtworks.xstream/xstream -->
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.10</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.9.0</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.1</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
* Maven and Java version
C:\Users\edtro\Documents\workspace\produtos>mvn -version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T16:49:05-03:00)
Maven home: C:\Dev\apache-maven-3.5.3\bin\..
Java version: 1.8.0_161, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_161\jre
Default locale: pt_BR, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"