2
respostas

Não geração do report - Jacoco Error

Após o comando mvn test não foi gerado o report, mesmo com o build ser feito com sucesso.

A msg ao final foi: Skipping JaCoCo execution due to missing execution data file.

2 respostas

Oi Isabela,

Posta o seu arquivo pom.xml completo aqui.

4.0.0

<groupId>br.com.alura</groupId>
<artifactId>loja</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging> <!-- por padrão esse packing é jar -->


<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.thoughtworks.xstream</groupId>
        <artifactId>xstream</artifactId>
        <version>1.4.14</version>
    </dependency>
</dependencies>

<repositories>
    <repository>
        <id>spring-repo</id>
        <url>https://repo.spring.io/release</url>
    </repository>
</repositories>

<properties>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
</properties>

<build>
    <finalName>loja</finalName>

    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>11</source>
                <target>11</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.2</version>
            <executions>
                <execution>
                    <id>prepare-agent</id>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                </execution>
                <execution>
                    <id>report</id>
                    <phase>test</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>