-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
pom.xml
236 lines (210 loc) · 8.73 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.games647</groupId>
<!--This have to be in lowercase because it's used by plugin.yml-->
<artifactId>lagmonitor</artifactId>
<packaging>jar</packaging>
<name>LagMonitor</name>
<version>1.17.3</version>
<url>https://dev.bukkit.org/bukkit-plugins/LagMonitor/</url>
<description>
Monitors your Minecraft server for Lags
</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>10</maven.compiler.source>
<maven.compiler.target>10</maven.compiler.target>
<maven.compiler.release>10</maven.compiler.release>
<!-- 5.7.5 uses JNA 5.12.1, so this needs to adjusted in the plugin.yml -->
<junit.jupiter.version>5.9.2</junit.jupiter.version>
<oshi.version>6.4.1</oshi.version>
<spigotApi>1.19.4-R0.1-SNAPSHOT</spigotApi>
</properties>
<build>
<defaultGoal>install</defaultGoal>
<!--Just use the project name to replace an old version of the plugin if the user does only copy-paste-->
<finalName>${project.name}</finalName>
<plugins>
<!-- Force an update to this plugin to allow reproducible builds -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<!-- According to the Maven wiki, we have to use at least 3.2 for reproducible builds -->
<!-- https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
<version>3.2.0</version>
</plugin>
<!-- Add libraries to the plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
<relocations>
<relocation>
<pattern>oshi</pattern>
<shadedPattern>lagmonitor.oshi</shadedPattern>
<excludes>
<exclude>*.properties</exclude>
<exclude>oshi.architecture.properties</exclude>
<exclude>oshi.linux.filename.properties</exclude>
<exclude>oshi.macos.versions.properties</exclude>
<exclude>oshi.properties</exclude>
<exclude>oshi.vmmacaddr.properties</exclude>
</excludes>
</relocation>
</relocations>
<artifactSet>
<excludes>
<!-- Exclude native drivers by default for user security reasons -->
<exclude>net.java.dev.jna:jna</exclude>
</excludes>
</artifactSet>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
<!--Expose git variables for version names-->
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>4.9.10</version>
<configuration>
<failOnNoGitDirectory>false</failOnNoGitDirectory>
</configuration>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Testing plugin-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<!--Replace variables-->
<filtering>true</filtering>
</resource>
</resources>
</build>
<repositories>
<!--Bukkit-Server-API -->
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<!--Paper repository-->
<repository>
<id>paper-repo</id>
<url>https://repo.papermc.io/repository/maven-snapshots/</url>
</repository>
</repositories>
<dependencies>
<!--Server API for Paper Timings API-->
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>${spigotApi}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>net.md-5</groupId>
<artifactId>bungeecord-chat</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--Server API for Spigot-->
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>${spigotApi}</version>
<scope>provided</scope>
</dependency>
<!-- Native data API -->
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-demo</artifactId>
<version>${oshi.version}</version>
<!-- Excludes the libraries below, because we only need the DetectVm class which has no dependencies on
the libraries below-->
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- JDK logging bridge to forward logging messages to the plugin logger -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>2.0.7</version>
</dependency>
<!-- Include core explicitly in order to ship the default configuration files in it -->
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>${oshi.version}</version>
</dependency>
<!--MySQL driver that is included in Spigot-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.32</version>
<scope>provided</scope>
</dependency>
<!--Netty work library of Minecraft - This is added to read the amount of bytes which are sent or received-->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
<version>4.1.45.Final</version>
<scope>provided</scope>
</dependency>
<!--JUnit 5-->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<!--Mocking library-->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>2.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>