Files
Cites_Plugins/pom.xml
T
Antone Barbaud 5bd6e227d3 chore: downgrade compile target to Java 11
Uses <release>11</release> in maven-compiler-plugin (recommended over
source/target to guarantee bytecode and API surface match Java 11).

Code changes to drop Java 12-16 features:
- records (TeamRanking, PlayerRanking, internal tuples in
  SqliteTeamRepository) become hand-written immutable classes; same
  accessor names (rank()/team()/score()/...) so call sites are unchanged.
- instanceof X x pattern matching becomes classic instanceof + cast in
  CommandContext.requirePlayer and Database.normalize.
- switch expressions with -> arrows become classic switch + break, or
  if/else chains, in BaseCommand.handleResult, ArgumentTypes.BOOLEAN and
  TeamScoreSubCommand.execute.

docs/setup.md, features.md and decisions.md updated to reflect Java 11.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-09 12:18:43 +02:00

149 lines
5.6 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>fr.luc</groupId>
<artifactId>CR-Core</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>CR-Core</name>
<description>Reusable core library for CR Minecraft game plugins (teams, players, scores, commands, events, SQLite persistence).</description>
<properties>
<!--
On utilise <release> plutôt que <source>+<target> pour garantir
que les références à des API ne sont pas accidentellement plus
récentes que Java 11 (ex. List.copyOf en Java 10+ : OK ;
Stream.toList en Java 16+ : refusé par javac).
-->
<maven.compiler.release>11</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sqlite.version>3.45.3.0</sqlite.version>
</properties>
<repositories>
<repository>
<id>papermc</id>
<url>https://repo.papermc.io/repository/maven-public/</url>
</repository>
<repository>
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/groups/public/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.destroystokyo.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.16.5-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<!--
SQLite JDBC driver. Scope compile so consumer plugins that depend on
CR-Core get it transitively. They are expected to shade it into
their final jar (or declare the dependency themselves) since Paper
does not bundle it.
-->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>${sqlite.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<!--
Publication vers le registry Maven de Gitea (Gitea Packages).
URL = https://<gitea>/api/packages/<owner>/maven
Le même endpoint sert pour les releases et les snapshots ; Gitea
décide selon le suffixe -SNAPSHOT de la version.
L'<id> doit matcher l'entrée <server id="gitea-luc-rival"> dans
~/.m2/settings.xml (qui contient le PAT). Voir docs/setup.md.
-->
<distributionManagement>
<repository>
<id>gitea-luc-rival</id>
<url>https://gitea.luc-rival.fr/api/packages/admin/maven</url>
</repository>
<snapshotRepository>
<id>gitea-luc-rival</id>
<url>https://gitea.luc-rival.fr/api/packages/admin/maven</url>
</snapshotRepository>
</distributionManagement>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<release>${maven.compiler.release}</release>
</configuration>
</plugin>
<!--
Publie un -sources.jar contenant le code source .java. Permet à
IntelliJ d'aller au source d'une classe CR-Core depuis un plugin
de jeu consommateur (Ctrl+Click).
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
Publie un -javadoc.jar contenant le HTML généré à partir des
commentaires /** ... */ du code. IntelliJ l'affiche en popup
au survol d'une méthode CR-Core.
doclint=none désactive les checks stricts (méthodes sans @param,
@return, etc.) — on accepte de la doc partielle plutôt que
bloquer le build.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.3</version>
<configuration>
<source>${maven.compiler.release}</source>
<doclint>none</doclint>
<quiet>true</quiet>
<encoding>UTF-8</encoding>
<docencoding>UTF-8</docencoding>
<charset>UTF-8</charset>
<failOnError>false</failOnError>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>