Files
Jander_Semester2/Semesterprojekt/pom.xml
Jean-Luc Makiola e5c87015fa build: target Java 21 (LTS) instead of Java 25
maven.compiler.source/target were set to 25, but the newest language feature
actually used is List.getFirst() (SequencedCollection, Java 21). On a JDK 17 or
21 the project would not compile at all.

- Use maven.compiler.release=21 instead of the source/target pair
- README: update prerequisites, tech stack and test count
- .gitignore: ignore the Nextcloud sync file and release/*.jar
2026-07-14 12:37:45 +02:00

210 lines
9.0 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>thb.jeanluc</groupId>
<artifactId>Semesterprojekt</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<!-- Java 21 (LTS): the newest feature actually used is List.getFirst()
(SequencedCollection, Java 21). Building against an LTS keeps the
project compilable on any current JDK. -->
<maven.compiler.release>21</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jackson.version>2.18.2</jackson.version>
<lombok.version>1.18.42</lombok.version>
<junit.version>5.11.4</junit.version>
<assertj.version>3.27.0</assertj.version>
<mockito.version>5.14.2</mockito.version>
<logback.version>1.5.15</logback.version>
</properties>
<dependencies>
<!-- YAML / JSON Loading -->
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- Boilerplate Reduction -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<!-- Logging -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<!-- OGG Vorbis decoding (GUI background music) -->
<dependency>
<groupId>com.googlecode.soundlibs</groupId>
<artifactId>vorbisspi</artifactId>
<version>1.0.3.3</version>
</dependency>
<dependency>
<groupId>com.googlecode.soundlibs</groupId>
<artifactId>jorbis</artifactId>
<version>0.0.17.4</version>
</dependency>
<!-- Tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<!-- Two self-contained jars in release/: one per entry point.
createDependencyReducedPom is off globally so no stray pom is written. -->
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
</configuration>
<executions>
<!-- Console version -> release/HauntedManor-Console.jar -->
<execution>
<id>shade-console</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<outputFile>${project.basedir}/release/HauntedManor-Console.jar</outputFile>
<!-- Console has no audio (GameIO.setMusic is a no-op there), so leave
out the OGG decode libraries and the ~11 MB of music tracks. -->
<artifactSet>
<excludes>
<exclude>com.googlecode.soundlibs:vorbisspi</exclude>
<exclude>com.googlecode.soundlibs:jorbis</exclude>
</excludes>
</artifactSet>
<filters>
<filter>
<artifact>thb.jeanluc:Semesterprojekt</artifact>
<excludes>
<exclude>music/**</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>thb.jeanluc.adventure.App</Main-Class>
</manifestEntries>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
<!-- Swing GUI version -> release/HauntedManor-GUI.jar -->
<execution>
<id>shade-gui</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<outputFile>${project.basedir}/release/HauntedManor-GUI.jar</outputFile>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>thb.jeanluc.adventure.AppGui</Main-Class>
</manifestEntries>
</transformer>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>run</id>
<configuration>
<mainClass>thb.jeanluc.adventure.App</mainClass>
</configuration>
</execution>
<execution>
<id>gui</id>
<configuration>
<mainClass>thb.jeanluc.adventure.AppGui</mainClass>
</configuration>
</execution>
</executions>
<configuration>
<mainClass>thb.jeanluc.adventure.App</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>