SongodaCore/pom.xml
Christian Koop 404a94c307
Move from MockBukkit to Mockito in automated tests
MockBukkit is not able to mock all of Bukkit's API
and broke with a change in PaperMC causing all our
current tests to fail. It is also version dependant.

But with Mockito you have to do everything manually right now.
No helping functionality (like creating a new mock player which automatically
will be returned in `Bukkit#getOnlinePlayers()`)

I took this opportunity to learn a bit about Mocking in Bukkit
and decided on Mockito.
It looks like we could easily write our own MockBukkit
alternative in the future.

I am not really happy how `Mockito#verify` works tho.
I find it annoying not to be able to directly assert
on the calls made to a method.
You have to create an InOrder instance first for the
mock and in the end verify with `Mockito#times(0)`/`Mockito#never()`
and `Mockito#any()` for each argument a method takes, to assert a total of n calls.
2022-11-15 22:49:09 +01:00

221 lines
7.2 KiB
XML

<?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.songoda</groupId>
<artifactId>SongodaCore-Modules</artifactId>
<version>3.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<!-- Run 'mvn versions:set -DgenerateBackupPoms=false -DnewVersion=X.Y.Z' to update version recursively -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<java.release>8</java.release>
<sonar.organization>songoda</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.junit.reportPaths>target/surefire-reports/*.xml</sonar.junit.reportPaths>
<sonar.coverage.jacoco.xmlReportPaths>target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
</properties>
<modules>
<module>Core</module>
<module>Compatibility</module>
<module>NMS/NMS</module>
<module>NMS/NMS-API</module>
<module>NMS/NMS-v1_8_R1</module>
<module>NMS/NMS-v1_8_R2</module>
<module>NMS/NMS-v1_8_R3</module>
<module>NMS/NMS-v1_9_R1</module>
<module>NMS/NMS-v1_9_R2</module>
<module>NMS/NMS-v1_10_R1</module>
<module>NMS/NMS-v1_11_R1</module>
<module>NMS/NMS-v1_12_R1</module>
<module>NMS/NMS-v1_13_R1</module>
<module>NMS/NMS-v1_13_R2</module>
<module>NMS/NMS-v1_14_R1</module>
<module>NMS/NMS-v1_15_R1</module>
<module>NMS/NMS-v1_16_R1</module>
<module>NMS/NMS-v1_16_R2</module>
<module>NMS/NMS-v1_16_R3</module>
<module>NMS/NMS-v1_17_R1</module>
<module>NMS/NMS-v1_18_R1</module>
<module>NMS/NMS-v1_18_R2</module>
<module>NMS/NMS-v1_19_0</module>
<module>NMS/NMS-v1_19_R1</module>
</modules>
<issueManagement>
<url>https://support.songoda.com/servicedesk/customer/portal/3</url>
<system>Jira Service Desk</system>
</issueManagement>
<scm>
<url>https://github.com/songoda/SongodaCore</url>
<connection>scm:git:git:github.com/songoda/SongodaCore.git</connection>
</scm>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<release>${java.release}</release>
</configuration>
</plugin>
<!-- Plugins required for tests or coverage reports -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<environmentVariables>
<TESTS_RUN_WITH_MAVEN>true</TESTS_RUN_WITH_MAVEN>
</environmentVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<executions>
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>default-report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.7.5</version>
<dependencies>
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>0.14</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>songoda</id>
<url>https://repo.songoda.com/repository/minecraft-plugins/</url>
</repository>
<repository>
<id>SpigotMC</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>CodeMC</id>
<url>https://repo.codemc.org/repository/maven-public/</url>
</repository>
<repository>
<id>bg-software</id>
<url>https://repo.bg-software.com/repository/api/</url>
</repository>
<repository>
<id>ViaVersion</id>
<url>https://repo.viaversion.com/</url>
</repository>
<repository>
<id>PaperMC</id>
<url>https://papermc.io/repo/repository/maven-public/</url>
</repository>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>23.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>4.9.0</version>
<scope>test</scope>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.github.seeseemelk</groupId>-->
<!-- <artifactId>MockBukkit-v1.19</artifactId>-->
<!-- <version>2.132.3</version>-->
<!-- <scope>test</scope>-->
<!-- </dependency>-->
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.9.5</version>
<type>maven-plugin</type>
</dependency>
</dependencies>
</project>