Skip to content

Commit

Permalink
shade jackson
Browse files Browse the repository at this point in the history
Version mismatches between jackson used on plugins can cause errors, so we are forced to shade it.
  • Loading branch information
hcoles committed May 8, 2024
1 parent 57b4036 commit e6914dc
Show file tree
Hide file tree
Showing 2 changed files with 35 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
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 e6914dc

Please sign in to comment.