Skip to content

Commit

Permalink
Merge pull request #1329 from hcoles/bug/shade_jackson
Browse files Browse the repository at this point in the history
shade jackson
  • Loading branch information
hcoles authored May 8, 2024
2 parents 57b4036 + 800a795 commit 6733ef2
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
35 changes: 34 additions & 1 deletion pitest-aggregator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,39 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>com.fasterxml.jackson.dataformat:*</include>
<include>com.fasterxml.jackson.core:*</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
<shadedPattern>pitest.fasterxml.jackson</shadedPattern>
</relocation>
</relocations>
<!-- gradle scans the multi release jar includes with a potentially old version of ASM. Easiest to exclude.
This works for jackson, should be rechecked when including any off multi release dependencies-->
<exclude>META-INF/versions/**</exclude>
</configuration>
</execution>
</executions>
</plugin>
<!-- must run after shade -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencies>
Expand All @@ -29,7 +62,7 @@
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.16.2</version>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ protected void executeReport(final Locale locale)
try {
final Collection<MavenProject> 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();

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.1</version>
<version>3.5.3</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down

0 comments on commit 6733ef2

Please sign in to comment.