Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0023e62

Browse files
committed
Fix 1.20/1.20.1 spigot-mapped tests
I really hope there is an easy way to include different transitive dependencies based on the classifier
1 parent fd7861a commit 0023e62

File tree

2 files changed

+35
-6
lines changed
  • commandapi-platforms/commandapi-bukkit/commandapi-bukkit-test
    • commandapi-bukkit-test-impl-1.20
    • commandapi-bukkit-test-tests

2 files changed

+35
-6
lines changed

commandapi-platforms/commandapi-bukkit/commandapi-bukkit-test/commandapi-bukkit-test-impl-1.20/pom.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,14 @@
7676
<artifactId>commandapi-bukkit-1.20</artifactId>
7777
<version>${project.version}</version>
7878
<classifier>mojang-mapped</classifier>
79+
<scope>provided</scope>
7980
</dependency>
80-
<!-- TODO: We also need to be able to access the NMS-common classes, which we do here just adding the dependency again
81-
Is it possible to have nms-common as a transitive dependency, so it is automatically available when using -1.20?
82-
In general whenever we reference an nms module we tend to need to include its dependencies as well, which is
83-
annoyingly verbose and prone to cause errors when forgotten. -->
8481
<dependency>
8582
<groupId>dev.jorel</groupId>
8683
<artifactId>commandapi-bukkit-nms-common</artifactId>
8784
<version>${project.version}</version>
8885
<classifier>mojang-mapped</classifier>
86+
<scope>provided</scope>
8987
</dependency>
9088

9189
<!-- Version-specific Minecraft dependencies -->

commandapi-platforms/commandapi-bukkit/commandapi-bukkit-test/commandapi-bukkit-test-tests/pom.xml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,27 @@
400400
<activeByDefault>true</activeByDefault>
401401
</activation>
402402
<dependencies>
403+
<!-- CommandAPI -->
403404
<dependency>
404405
<groupId>dev.jorel</groupId>
405406
<artifactId>commandapi-bukkit-test-impl-1.20</artifactId>
406407
<version>${project.version}</version>
407408
<scope>test</scope>
408409
</dependency>
410+
<dependency>
411+
<groupId>dev.jorel</groupId>
412+
<artifactId>commandapi-bukkit-1.20</artifactId>
413+
<version>${project.version}</version>
414+
<scope>provided</scope>
415+
</dependency>
416+
<dependency>
417+
<groupId>dev.jorel</groupId>
418+
<artifactId>commandapi-bukkit-nms-common</artifactId>
419+
<version>${project.version}</version>
420+
<scope>provided</scope>
421+
</dependency>
422+
423+
<!-- Server -->
409424
<dependency>
410425
<groupId>org.spigotmc</groupId>
411426
<artifactId>spigot</artifactId>
@@ -429,16 +444,32 @@
429444
<profile>
430445
<id>Minecraft_1_20_Mojang</id>
431446
<dependencies>
447+
<!-- CommandAPI -->
432448
<dependency>
433449
<groupId>dev.jorel</groupId>
434450
<artifactId>commandapi-bukkit-test-impl-1.20</artifactId>
435451
<version>${project.version}</version>
436452
<classifier>mojang-mapped</classifier>
437453
<scope>test</scope>
438454
</dependency>
439-
440-
<!-- TODO: Is it possible to make this a transitive dependency of impl-1.20?
455+
<!-- TODO: Is it possible to make these transitive dependencies of impl-1.20?
441456
Note that you'd need to make sure the classifier is correct -->
457+
<dependency>
458+
<groupId>dev.jorel</groupId>
459+
<artifactId>commandapi-bukkit-1.20</artifactId>
460+
<version>${project.version}</version>
461+
<classifier>mojang-mapped</classifier>
462+
<scope>provided</scope>
463+
</dependency>
464+
<dependency>
465+
<groupId>dev.jorel</groupId>
466+
<artifactId>commandapi-bukkit-nms-common</artifactId>
467+
<version>${project.version}</version>
468+
<classifier>mojang-mapped</classifier>
469+
<scope>provided</scope>
470+
</dependency>
471+
472+
<!-- Server -->
442473
<dependency>
443474
<groupId>org.spigotmc</groupId>
444475
<artifactId>spigot</artifactId>

0 commit comments

Comments
 (0)