Java 从shade中排除本地jar文件
我的项目基于一个maven文件,其中有几个依赖项(其中两个是本地jar文件):Java 从shade中排除本地jar文件,java,maven,Java,Maven,我的项目基于一个maven文件,其中有几个依赖项(其中两个是本地jar文件): 4.0.0 我,博斯瓦 写下我在上面所做的,但也许它不是为了我在这里要做的 <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org
4.0.0
我,博斯瓦
写下我在上面所做的,但也许它不是为了我在这里要做的
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.playbosswar</groupId>
<artifactId>BossUHC</artifactId>
<version>1.0</version>
<build>
<finalName>${project.name}_v${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<relocations>
<relocation>
<pattern>com.cryptomorin.xseries</pattern>
<shadedPattern>me.playbosswar.bossuhc</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<excludes>
<exclude>com.playbosswar:craftbukkit16</exclude>
<exclude>com.playbosswar:craftbukkit15</exclude>
</excludes>
</artifactSet>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
<repositories>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.16.2-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.cryptomorin</groupId>
<artifactId>XSeries</artifactId>
<version>7.2.1.2</version>
</dependency>
<dependency>
<groupId>com.playbosswar</groupId>
<artifactId>craftbukkit16</artifactId>
<version>1.16.2</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/craftbukkit-1.16.2.jar</systemPath>
</dependency>
<dependency>
<groupId>com.playbosswar</groupId>
<artifactId>craftbukkit15</artifactId>
<version>1.15.2</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/craftbukkit-1.15.2.jar</systemPath>
</dependency>
</dependencies>
</project>