From e6914dc6382b92146b40a36d39a82c9f3226aad9 Mon Sep 17 00:00:00 2001 From: Henry Coles Date: Wed, 8 May 2024 17:05:02 +0100 Subject: [PATCH 1/2] shade jackson Version mismatches between jackson used on plugins can cause errors, so we are forced to shade it. --- pitest-aggregator/pom.xml | 35 ++++++++++++++++++++++++++++++++++- pom.xml | 2 +- 2 files changed, 35 insertions(+), 2 deletions(-) diff --git a/pitest-aggregator/pom.xml b/pitest-aggregator/pom.xml index d08aa1bf6..62ec30813 100644 --- a/pitest-aggregator/pom.xml +++ b/pitest-aggregator/pom.xml @@ -13,6 +13,39 @@ org.apache.maven.plugins maven-checkstyle-plugin + + maven-shade-plugin + + + package + + shade + + + + + com.fasterxml.jackson.dataformat:* + com.fasterxml.jackson.core:* + + + + + com.fasterxml.jackson + pitest.fasterxml.jackson + + + + META-INF/versions/** + + + + + + + org.codehaus.mojo + flatten-maven-plugin + @@ -29,7 +62,7 @@ com.fasterxml.jackson.dataformat jackson-dataformat-xml - 2.16.2 + 2.17.0 junit diff --git a/pom.xml b/pom.xml index c065e7cf0..7167f4789 100644 --- a/pom.xml +++ b/pom.xml @@ -322,7 +322,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.1 + 3.5.3 org.codehaus.mojo From 800a79500bd4fdb0a180079e51c0fcfec0bb2fe3 Mon Sep 17 00:00:00 2001 From: Henry Coles Date: Wed, 8 May 2024 18:27:56 +0100 Subject: [PATCH 2/2] better error when aggregate goal run directly --- .../pitest/maven/report/AbstractPitAggregationReportMojo.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pitest-maven/src/main/java/org/pitest/maven/report/AbstractPitAggregationReportMojo.java b/pitest-maven/src/main/java/org/pitest/maven/report/AbstractPitAggregationReportMojo.java index b155c8f47..cfde317ef 100644 --- a/pitest-maven/src/main/java/org/pitest/maven/report/AbstractPitAggregationReportMojo.java +++ b/pitest-maven/src/main/java/org/pitest/maven/report/AbstractPitAggregationReportMojo.java @@ -75,6 +75,10 @@ protected void executeReport(final Locale locale) try { final Collection allProjects = findDependencies(); + if (allProjects.isEmpty()) { + throw new IllegalStateException("No projects found. Did you call the aggregate goal directly? It must be bound to a lifecycle phase"); + } + final ReportAggregator.Builder reportAggregationBuilder = ReportAggregator .builder();