This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new a3ac176 CAMEL-15805: Prefix coverage directory with project base dir (#4560) a3ac176 is described below commit a3ac17664870292514d4582ed456b6d0b5d1e8ac Author: Marco Collovati <mcollov...@gmail.com> AuthorDate: Wed Nov 4 06:45:59 2020 +0100 CAMEL-15805: Prefix coverage directory with project base dir (#4560) Launching route-coverage goal from root directory of a multi module project does not work because the directory passed to RouteCoverageHelper.parseDumpRouteCoverageByRouteId missed project base directory. This change adds project base directory to the relative path of route coverage data. --- .../src/main/java/org/apache/camel/maven/RouteCoverageMojo.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java index fd690cd..2ee9a2e 100644 --- a/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java +++ b/catalog/camel-report-maven-plugin/src/main/java/org/apache/camel/maven/RouteCoverageMojo.java @@ -250,7 +250,7 @@ public class RouteCoverageMojo extends AbstractExecMojo { // grab dump data for the route try { - List<CoverageData> coverageData = RouteCoverageHelper.parseDumpRouteCoverageByRouteId("target/camel-route-coverage", routeId); + List<CoverageData> coverageData = RouteCoverageHelper.parseDumpRouteCoverageByRouteId(project.getBasedir() + "/target/camel-route-coverage", routeId); if (coverageData.isEmpty()) { getLog().warn("No route coverage data found for route: " + routeId + ". Make sure to enable route coverage in your unit tests and assign unique route ids to your routes. Also remember to run unit tests first."); @@ -282,7 +282,7 @@ public class RouteCoverageMojo extends AbstractExecMojo { if (anonymousRoutes && !anonymousRouteTrees.isEmpty()) { // grab dump data for the route try { - Map<String, List<CoverageData>> datas = RouteCoverageHelper.parseDumpRouteCoverageByClassAndTestMethod("target/camel-route-coverage"); + Map<String, List<CoverageData>> datas = RouteCoverageHelper.parseDumpRouteCoverageByClassAndTestMethod(project.getBasedir() + "/target/camel-route-coverage"); if (datas.isEmpty()) { getLog().warn("No route coverage data found" + ". Make sure to enable route coverage in your unit tests. Also remember to run unit tests first.");