|
92 | 92 | <spigotVersion>1.21.4-R0.1-SNAPSHOT</spigotVersion> |
93 | 93 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
94 | 94 | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| 95 | + <jopt>5.0.4</jopt> |
| 96 | + <testVer/> |
| 97 | + <testJavaPath/> |
| 98 | + <testJava>21</testJava> |
95 | 99 | </properties> |
96 | 100 |
|
97 | 101 | <dependencies> |
98 | | -<!-- <dependency>--> |
99 | | -<!-- <groupId>com.mojang</groupId>--> |
100 | | -<!-- <artifactId>authlib</artifactId>--> |
101 | | -<!-- <version>6.0.55</version>--> |
102 | | -<!-- <scope>provided</scope>--> |
103 | | -<!-- </dependency>--> |
| 102 | + <!-- <dependency>--> |
| 103 | + <!-- <groupId>com.mojang</groupId>--> |
| 104 | + <!-- <artifactId>authlib</artifactId>--> |
| 105 | + <!-- <version>6.0.55</version>--> |
| 106 | + <!-- <scope>provided</scope>--> |
| 107 | + <!-- </dependency>--> |
104 | 108 | <dependency> |
105 | 109 | <groupId>org.spigotmc</groupId> |
106 | 110 | <artifactId>spigot</artifactId> |
|
219 | 223 | <plugin> |
220 | 224 | <groupId>org.apache.maven.plugins</groupId> |
221 | 225 | <artifactId>maven-surefire-plugin</artifactId> |
222 | | - <version>3.2.5</version> |
| 226 | + <version>3.5.2</version> |
223 | 227 | <configuration> |
224 | 228 | <!--<failIfNoTests>true</failIfNoTests>--> |
225 | 229 | <!-- <skipTests>true</skipTests>--> |
|
231 | 235 | <includes> |
232 | 236 | <include>**/*.java</include> |
233 | 237 | </includes> |
| 238 | + <!-- Any way to do this without exposing the path and without using a toolchain? --> |
| 239 | + <!-- https://maven.apache.org/surefire/maven-surefire-plugin/examples/toolchains.html --> |
| 240 | + <!-- <jvm>${testJavaPath}</jvm>--> |
| 241 | + <!-- You can also use the following argument from the cmd line: --> |
| 242 | + <!-- <dash><dash>toolchains "\.m2\toolchains.xml" --> |
| 243 | + <jdkToolchain> |
| 244 | + <version>${testJava}</version> |
| 245 | + </jdkToolchain> |
234 | 246 | </configuration> |
235 | 247 | </plugin> |
| 248 | + <plugin> |
| 249 | + <!-- mvn exec:exec@compile exec:exec@test --> |
| 250 | + <!-- Doesn't work... Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.5.0:exec (default-cli) on project XSeries: Command execution failed.: Cannot run program "mvn" (in directory): CreateProcess error=2, The system cannot find the file specified(default-cli) on project XSeries: Command execution failed.: Cannot run program "mvn" (in directory): CreateProcess error=2, The system cannot find the file specified --> |
| 251 | + <groupId>org.codehaus.mojo</groupId> |
| 252 | + <artifactId>exec-maven-plugin</artifactId> |
| 253 | + <version>3.5.0</version> |
| 254 | + <configuration> |
| 255 | + <!-- <executable>IntelliJ\plugins\maven\lib\maven3\bin\mvn.cmd</executable>--> |
| 256 | + <executable>mvn</executable> |
| 257 | + </configuration> |
| 258 | + |
| 259 | + <executions> |
| 260 | + <execution> |
| 261 | + <id>compile</id> |
| 262 | + <phase>none</phase> |
| 263 | + <goals> |
| 264 | + <goal>exec</goal> |
| 265 | + </goals> |
| 266 | + <configuration> |
| 267 | + <arguments> |
| 268 | + <argument>compiler:compile</argument> |
| 269 | + <argument>compiler:testCompile</argument> |
| 270 | + </arguments> |
| 271 | + </configuration> |
| 272 | + </execution> |
| 273 | + <execution> |
| 274 | + <id>test</id> |
| 275 | + <phase>none</phase> |
| 276 | + <!-- Configuring the correct phase here, which would be 'test' causes this to get run twice. --> |
| 277 | + <!-- https://stackoverflow.com/questions/4253700/maven-phase-executing-twice --> |
| 278 | + |
| 279 | + <goals> |
| 280 | + <goal>exec</goal> |
| 281 | + </goals> |
| 282 | + <configuration> |
| 283 | + <arguments> |
| 284 | + <argument>test</argument> |
| 285 | + <argument>-Ptester,${testVer}</argument> |
| 286 | + </arguments> |
| 287 | + </configuration> |
| 288 | + </execution> |
| 289 | + <execution> |
| 290 | + <!-- This won't properly set the propery for some reason: --> |
| 291 | + <!-- mvn exec:exec@everything -DtestVer=8 --> |
| 292 | + <id>everything</id> |
| 293 | + <phase>none</phase> |
| 294 | + <goals> |
| 295 | + <goal>exec</goal> |
| 296 | + </goals> |
| 297 | + <configuration> |
| 298 | + <arguments> |
| 299 | + <argument>exec:exec@compile</argument> |
| 300 | + <argument>exec:exec@test</argument> |
| 301 | + </arguments> |
| 302 | + </configuration> |
| 303 | + </execution> |
| 304 | + </executions> |
| 305 | + </plugin> |
236 | 306 | </plugins> |
237 | 307 |
|
238 | 308 | <testSourceDirectory>src/test</testSourceDirectory> |
|
257 | 327 | </dependencies> |
258 | 328 | <build> |
259 | 329 | <plugins> |
| 330 | + <plugin> |
| 331 | + <groupId>org.apache.maven.plugins</groupId> |
| 332 | + <artifactId>maven-toolchains-plugin</artifactId> |
| 333 | + <version>3.2.0</version> |
| 334 | + <executions> |
| 335 | + <execution> |
| 336 | + <phase>validate</phase> |
| 337 | + <goals> |
| 338 | + <goal>toolchain</goal> |
| 339 | + </goals> |
| 340 | + </execution> |
| 341 | + </executions> |
| 342 | + <configuration> |
| 343 | + <toolchains> |
| 344 | + <jdk> |
| 345 | + <version>[${testJava}]</version> |
| 346 | + </jdk> |
| 347 | + </toolchains> |
| 348 | + </configuration> |
| 349 | + </plugin> |
| 350 | + |
| 351 | + <!-- <plugin>--> |
| 352 | + <!-- <!– For cleaning the tests folder that the server files are generated in –>--> |
| 353 | + <!-- <artifactId>maven-clean-plugin</artifactId>--> |
| 354 | + <!-- <version>3.4.0</version>--> |
| 355 | + <!-- <executions>--> |
| 356 | + <!-- <execution>--> |
| 357 | + <!-- <id>auto-clean</id>--> |
| 358 | + <!-- <phase>initialize</phase>--> |
| 359 | + <!-- <goals>--> |
| 360 | + <!-- <goal>clean</goal>--> |
| 361 | + <!-- </goals>--> |
| 362 | + <!-- <configuration>--> |
| 363 | + <!-- <excludeDefaultDirectories>true</excludeDefaultDirectories>--> |
| 364 | + <!-- <filesets>--> |
| 365 | + <!-- <fileset>--> |
| 366 | + <!-- <directory>target/tests</directory>--> |
| 367 | + <!-- </fileset>--> |
| 368 | + <!-- </filesets>--> |
| 369 | + <!-- </configuration>--> |
| 370 | + <!-- </execution>--> |
| 371 | + <!-- </executions>--> |
| 372 | + <!-- </plugin>--> |
260 | 373 | <plugin> |
261 | 374 | <groupId>org.apache.maven.plugins</groupId> |
262 | 375 | <artifactId>maven-compiler-plugin</artifactId> |
263 | 376 | <version>3.13.0</version> |
264 | 377 | <configuration> |
265 | 378 | <encoding>UTF-8</encoding> |
266 | 379 | <proc>none</proc> |
267 | | - <source>21</source> |
268 | | - <target>21</target> |
| 380 | + <source>1.8</source> |
| 381 | + <target>1.8</target> |
| 382 | + <testSource>1.8</testSource> |
| 383 | + <testTarget>1.8</testTarget> |
| 384 | + <useIncrementalCompilation>false</useIncrementalCompilation> |
269 | 385 | </configuration> |
270 | 386 | <executions> |
271 | 387 | <execution> |
|
290 | 406 | <id>latest</id> |
291 | 407 | <properties> |
292 | 408 | <nms>21_R0</nms> |
| 409 | + <testJava>21</testJava> |
| 410 | + </properties> |
| 411 | + </profile> |
| 412 | + <profile> |
| 413 | + <id>21</id> |
| 414 | + <properties> |
| 415 | + <nms>21_R0</nms> |
| 416 | + <spigotVersion>1.21.1-R0.1-SNAPSHOT</spigotVersion> |
| 417 | + <testJava>21</testJava> |
293 | 418 | </properties> |
294 | 419 | </profile> |
295 | 420 | <profile> |
296 | 421 | <id>20</id> |
297 | 422 | <properties> |
298 | 423 | <nms>20_R0</nms> |
299 | 424 | <spigotVersion>1.20.6-R0.1-SNAPSHOT</spigotVersion> |
| 425 | + <testJava>21</testJava> |
300 | 426 | </properties> |
301 | 427 | </profile> |
302 | 428 | <profile> |
303 | 429 | <id>19</id> |
304 | 430 | <properties> |
305 | 431 | <nms>19_R1</nms> |
306 | 432 | <spigotVersion>1.19.4-R0.1-SNAPSHOT</spigotVersion> |
| 433 | + <testJava>21</testJava> |
307 | 434 | </properties> |
308 | 435 | </profile> |
309 | 436 | <profile> |
310 | 437 | <id>18</id> |
311 | 438 | <properties> |
312 | 439 | <nms>18_R1</nms> |
313 | 440 | <spigotVersion>1.18.2-R0.1-SNAPSHOT</spigotVersion> |
| 441 | + <testJava>21</testJava> |
314 | 442 | </properties> |
315 | 443 | </profile> |
316 | 444 | <profile> |
317 | 445 | <id>17</id> |
318 | 446 | <properties> |
319 | 447 | <nms>17_R1</nms> |
320 | 448 | <spigotVersion>1.17.1-R0.1-SNAPSHOT</spigotVersion> |
| 449 | + <testJava>21</testJava> |
321 | 450 | </properties> |
322 | 451 | </profile> |
323 | 452 | <profile> |
|
326 | 455 | <properties> |
327 | 456 | <nms>16_R3</nms> |
328 | 457 | <spigotVersion>1.16.5-R0.1-SNAPSHOT</spigotVersion> |
| 458 | + <testJava>11</testJava> |
| 459 | + </properties> |
| 460 | + </profile> |
| 461 | + <profile> |
| 462 | + <id>15</id> |
| 463 | + <properties> |
| 464 | + <nms>15_R3</nms> |
| 465 | + <spigotVersion>1.15.2-R0.1-SNAPSHOT</spigotVersion> |
| 466 | + <testJava>11</testJava> |
329 | 467 | </properties> |
330 | 468 | </profile> |
| 469 | + <profile> |
| 470 | + <id>12</id> |
| 471 | + <properties> |
| 472 | + <nms>12_R3</nms> |
| 473 | + <spigotVersion>1.12.2-R0.1-SNAPSHOT</spigotVersion> |
| 474 | + <testJava>1.8</testJava> |
| 475 | + </properties> |
| 476 | + <dependencies> |
| 477 | + <dependency> |
| 478 | + <groupId>net.sf.jopt-simple</groupId> |
| 479 | + <artifactId>jopt-simple</artifactId> |
| 480 | + <version>${jopt}</version> |
| 481 | + </dependency> |
| 482 | + </dependencies> |
| 483 | + </profile> |
| 484 | + <profile> |
| 485 | + <id>8</id> |
| 486 | + <properties> |
| 487 | + <nms>8_R3</nms> |
| 488 | + <spigotVersion>1.8.8-R0.1-SNAPSHOT</spigotVersion> |
| 489 | + <testJava>1.8</testJava> |
| 490 | + </properties> |
| 491 | + <dependencies> |
| 492 | + <dependency> |
| 493 | + <groupId>net.sf.jopt-simple</groupId> |
| 494 | + <artifactId>jopt-simple</artifactId> |
| 495 | + <version>${jopt}</version> |
| 496 | + </dependency> |
| 497 | + </dependencies> |
| 498 | + </profile> |
331 | 499 | </profiles> |
332 | 500 | </project> |
0 commit comments