It is important to include a valid maven-shade-plugin
configuration to avoid
class collision with other plugin jars that also use and provide this resource.
Take moment to look over this example:
<!-- In your pom.xml -->
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<!-- This is the important element -->
<configuration>
<relocations>
<relocation>
<pattern>com.github.sanctum.templates</pattern>
<!-- Replace this with your package! -->
<shadedPattern>com.github.ms5984.anotherplugin.templates</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<project>
<dependencies>
<dependency>
<groupId>com.github.the-h-team</groupId>
<artifactId>templates</artifactId>
<version><!--maven central version here--></version>
</dependency>
</dependencies>
</project>
<project>
<!-- For Sonatype Nexus snapshots (primary development here) -->
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.the-h-team</groupId>
<artifactId>templates</artifactId>
<version><!--nexus snapshot version here--></version>
</dependency>
</dependencies>
</project>
<project>
<!-- For Jitpack pre-release, custom commit builds -->
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.github.the-h-team</groupId>
<artifactId>Templates</artifactId>
<!--commit hash; example below-->
<version>b95d3f3</version>
</dependency>
</dependencies>
</project>