-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
149 lines (143 loc) · 6.1 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?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>com.penguin</groupId>
<artifactId>PenguinPnx</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>cn.powernukkitx</groupId>
<artifactId>powernukkitx</artifactId>
<version>1.20.30-r1</version>
<exclusions>
<exclusion>
<groupId>cn.powernukkitx.PowerNukkitX-Network</groupId>
<artifactId>raknet</artifactId>
</exclusion>
<exclusion>
<groupId>com.nukkitx</groupId>
<artifactId>natives</artifactId>
</exclusion>
<exclusion>
<groupId>cn.powernukkitx</groupId>
<artifactId>libdeflate-java</artifactId>
</exclusion>
<exclusion>
<groupId>cn.powernukkitx</groupId>
<artifactId>Terra-Binary</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/me.onebone/economyapi -->
<dependency>
<groupId>pnx.encoomyApi</groupId>
<artifactId>EconomyAPI</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>2.15.2</version>
<!-- 致命小可爱,下面这个傻逼东西导致传递依赖错误,导致ClassDefNotFound-->
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.28</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<executions>
<!-- 解决部分插件必须要用胖jar才能运行否则ClassDefNotFound-->
<execution>
<id>create-shaded-jar</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<!-- 重命名字节码,防止多插件间相同依赖冲突-->
<!-- Unsupported class file major version 63只是提醒,jar包确实已经导出来了,用shade版的-->
<relocations>
<relocation>
<pattern>com.fasterxml.jackson</pattern>
<!-- 这里记得改名成不同插件不同名字的不然还是会冲突!!!-->
<shadedPattern>com.penguin.shaded.jackson</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<includes>
<!-- 将特定的依赖项写在这里 -->
<include>com.fasterxml.jackson.core:*</include>
<include>com.fasterxml.jackson.dataformat:*</include>
</includes>
</artifactSet>
<filters>
<!-- 如有需要可以再次过滤-->
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>module-info.class</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
</plugins>
</build>
</project>