Create legacy jar to include the latest mysql connector version #1779 + Enhance maven shade resource filtering

This commit is contained in:
Gabriele C 2021-04-09 01:53:41 +02:00
parent ea22552f7d
commit 40261c9217
1 changed files with 43 additions and 0 deletions

43
pom.xml
View File

@ -285,10 +285,30 @@
<version>3.2.4</version>
<executions>
<execution>
<id>shaded-jar</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<excludes>
<exclude>com.mysql</exclude>
<exclude>org.gjt.mm.mysql</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
<execution>
<id>shaded-jar-legacy</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<!-- Use the base jar name, to help server owners download the right jar -->
<finalName>${project.finalNameBase}-legacy</finalName>
</configuration>
</execution>
</executions>
<configuration>
@ -370,7 +390,22 @@
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.MF</exclude>
<exclude>META-INF/DEPENDENCIES</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
<addHeader>false</addHeader>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</plugin>
<!-- Install the jars as artifacts into the local repository -->
@ -585,6 +620,14 @@
<optional>true</optional>
</dependency>
<!-- MySQL connector, shaded into the legacy jar -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.49</version>
<optional>true</optional>
</dependency>
<!-- Argon2 implementation -->
<dependency>
<groupId>de.mkammerer</groupId>