Description
Hello,
(This looks like a duplicate of #51)
When running mvn scoverage:integration-report
on a multi-module project with dependencies between modules, build fails if the modules JARs are not present in local repository (~/.m2/repository
).
If I run mvn install
before, it works.
I have reproduced the issue based on the scoverage-maven-samples
repository (subproject aggregation
), by just adding a dependency between module02
and module01
(see module02/pom.xml
). The error I got when running mvn scoverage:integration-report
is :
...
[INFO] ------------------------------------------------------------------------
[INFO] Building SCoverage Maven Samples : Aggregation : Module 2 1.3.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> scoverage-maven-plugin:1.3.0:integration-report (default-cli) > [scoverage]verify @ module02 >>>
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] SCoverage Maven Samples : Aggregation .............. SUCCESS [ 0.552 s]
[INFO] SCoverage Maven Samples : Aggregation : Module 1 ... SUCCESS [ 4.324 s]
[INFO] SCoverage Maven Samples : Aggregation : Module 2 ... FAILURE [ 0.022 s]
[INFO] SCoverage Maven Samples : Aggregation : Module 3 ... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.263 s
[INFO] Finished at: 2018-02-21T12:25:35+01:00
[INFO] Final Memory: 19M/305M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project module02: Could not resolve dependencies for project org.scoverage.scoverage-maven-samples.aggregation:module02:jar:1.3.1-SNAPSHOT: Could not find artifact org.scoverage.scoverage-maven-samples.aggregation:module01:jar:1.3.1-SNAPSHOT
The issue comes from the verify
phase on module02
run in forked scoverage lifecycle.
How can I avoid doing a mvn install
before using coverage goals ? Is there any reason that integration-report
goal uses JARs in local repository instead of classes/JARs generated in modules target/
directory ? Maybe I'm missing something.