Some checks failed
E2E Tests / e2e (push) Has been cancelled
Build & Push Images / build (brain) (push) Successful in 1m25s
Build & Push Images / build (core) (push) Successful in 2m55s
Build & Push Images / build (web) (push) Successful in 1m49s
Build & Push Images / build-switcher (push) Successful in 39s
Permet d'utiliser Loremind sans passer par Docker et sans lancer tous les conteneurs Passage en v0.15.0
249 lines
11 KiB
XML
249 lines
11 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>
|
|
|
|
<parent>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
<version>3.5.14</version>
|
|
<relativePath/>
|
|
</parent>
|
|
|
|
<groupId>com.loremind</groupId>
|
|
<artifactId>loremind-core</artifactId>
|
|
<version>0.15.0</version>
|
|
<name>LoreMind Core</name>
|
|
<description>Backend Core - Architecture Hexagonale</description>
|
|
|
|
<properties>
|
|
<java.version>17</java.version>
|
|
<!-- Override de la transitive minio → commons-compress → commons-lang3 3.17.
|
|
>= 3.18 : corrige CVE-2025-48924 (recursion infinie ClassUtils.getClass).
|
|
Propriete reconnue par le BOM Spring Boot → s'applique partout. -->
|
|
<commons-lang3.version>3.20.0</commons-lang3.version>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<!-- Spring Boot Web -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Spring Security : HTTP Basic sur /api/settings/** (admin-only).
|
|
Le reste de /api/** reste permitAll (app self-hosted mono-utilisateur). -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-security</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Spring WebFlux : requis pour WebClient (streaming SSE vers le Brain).
|
|
RestTemplate (Web MVC) reste pour les appels synchrones one-shot. -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-webflux</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Spring Boot Data JPA -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
|
</dependency>
|
|
|
|
<!-- PostgreSQL Driver -->
|
|
<dependency>
|
|
<groupId>org.postgresql</groupId>
|
|
<artifactId>postgresql</artifactId>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
|
|
<!-- Flyway : migrations de schema versionnees (remplace ddl-auto=update).
|
|
Un SEUL jeu de migrations en SQL PostgreSQL sert les deux bases :
|
|
- Postgres (Docker/serveur) nativement ;
|
|
- H2 (mode local-first) via MODE=PostgreSQL dans l'URL JDBC.
|
|
flyway-database-postgresql : module requis depuis Flyway 10 (DBs
|
|
externalisees du core). H2 reste supporte par flyway-core. -->
|
|
<dependency>
|
|
<groupId>org.flywaydb</groupId>
|
|
<artifactId>flyway-core</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.flywaydb</groupId>
|
|
<artifactId>flyway-database-postgresql</artifactId>
|
|
</dependency>
|
|
|
|
<!-- H2 Database :
|
|
- tests (toujours) ;
|
|
- RUNTIME du profil "local" (mode local-first / jpackage) : base
|
|
fichier embarquee a la place de Postgres, donc le driver doit etre
|
|
sur le classpath d'execution. Scope runtime (jamais compile contre)
|
|
=> present a l'execution + tests, ~2,5 Mo inutilises cote Docker. -->
|
|
<dependency>
|
|
<groupId>com.h2database</groupId>
|
|
<artifactId>h2</artifactId>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
|
|
<!-- Lombok (réduit le code boilerplate) -->
|
|
<dependency>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
|
|
<!-- Spring Boot Test -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
|
|
<!-- MinIO — client S3-compatible pour le stockage d'images (Shared Kernel images).
|
|
8.6.x = derniere ligne 8.x (la 9.x change l'API) ; transitives a jour. -->
|
|
<dependency>
|
|
<groupId>io.minio</groupId>
|
|
<artifactId>minio</artifactId>
|
|
<version>8.6.0</version>
|
|
<exclusions>
|
|
<!-- OkHttp 5 : l'artefact `okhttp` est un alias multiplateforme dont la
|
|
resolution vers les classes JVM passe par les metadonnees Gradle —
|
|
que Maven ignore. On exclut l'alias et on declare `okhttp-jvm`
|
|
(les vraies classes) explicitement ci-dessous. -->
|
|
<exclusion>
|
|
<groupId>com.squareup.okhttp3</groupId>
|
|
<artifactId>okhttp</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.squareup.okhttp3</groupId>
|
|
<artifactId>okhttp-jvm</artifactId>
|
|
<version>5.1.0</version>
|
|
</dependency>
|
|
|
|
<!-- Nimbus JOSE+JWT — verification des JWT Ed25519 (EdDSA) emis par le relais
|
|
Patreon. Supporte nativement les cles Ed25519 via BouncyCastle.
|
|
>= 10.0.2 : corrige CVE-2025-53864 (DoS par JSON profondement imbrique
|
|
dans le claim set — surface critique : JWT colle par l'utilisateur). -->
|
|
<dependency>
|
|
<groupId>com.nimbusds</groupId>
|
|
<artifactId>nimbus-jose-jwt</artifactId>
|
|
<version>10.9.1</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.bouncycastle</groupId>
|
|
<artifactId>bcprov-jdk18on</artifactId>
|
|
<version>1.84</version>
|
|
</dependency>
|
|
<!-- Google Tink : runtime requis par com.nimbusds.jose.crypto.Ed25519Verifier
|
|
(depuis Nimbus 9.x, la verification EdDSA delegue a Tink.subtle.Ed25519Verify).
|
|
Tink n'est PAS une dependance transitive de nimbus-jose-jwt → il faut
|
|
l'ajouter explicitement, sinon NoClassDefFoundError au premier verify().
|
|
>= 1.15 : embarque un protobuf-java corrige (CVE-2024-7254). -->
|
|
<dependency>
|
|
<groupId>com.google.crypto.tink</groupId>
|
|
<artifactId>tink</artifactId>
|
|
<version>1.21.0</version>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<configuration>
|
|
<excludes>
|
|
<exclude>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
<executions>
|
|
<!-- Genere META-INF/build-info.properties (project.version)
|
|
consomme par Spring BuildProperties pour exposer la
|
|
version courante a l'application (UpdateCheckService). -->
|
|
<execution>
|
|
<goals>
|
|
<goal>build-info</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
|
|
<!-- JaCoCo : rapport de couverture des tests unitaires.
|
|
Rapport HTML auto-genere a chaque `mvn test` dans target/site/jacoco/. -->
|
|
<plugin>
|
|
<groupId>org.jacoco</groupId>
|
|
<artifactId>jacoco-maven-plugin</artifactId>
|
|
<version>0.8.12</version>
|
|
<executions>
|
|
<execution>
|
|
<id>prepare-agent</id>
|
|
<goals>
|
|
<goal>prepare-agent</goal>
|
|
</goals>
|
|
</execution>
|
|
<execution>
|
|
<id>report</id>
|
|
<phase>test</phase>
|
|
<goals>
|
|
<goal>report</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
<profiles>
|
|
<!-- =================================================================
|
|
Profil "desktop" : build local-first (application de bureau).
|
|
Active avec : mvn -Pdesktop package
|
|
Embarque le build Angular dans le jar (classpath:/static/) pour que
|
|
le Core serve lui-meme le front (cf. LocalWebConfig, profil Spring
|
|
"local"). Le build Docker normal (sans ce profil) reste une API pure :
|
|
le front y est servi par le conteneur nginx, donc rien n'est copie.
|
|
================================================================= -->
|
|
<profile>
|
|
<id>desktop</id>
|
|
<properties>
|
|
<!-- Sortie du `ng build` (builder browser) : web/dist/web. -->
|
|
<frontend.dist>${project.basedir}/../web/dist/web</frontend.dist>
|
|
</properties>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-resources-plugin</artifactId>
|
|
<executions>
|
|
<execution>
|
|
<id>copy-frontend</id>
|
|
<!-- Avant le repackage Spring Boot : on injecte le
|
|
front dans les classes compilees -> embarque
|
|
dans le fat jar sous /static. -->
|
|
<phase>prepare-package</phase>
|
|
<goals>
|
|
<goal>copy-resources</goal>
|
|
</goals>
|
|
<configuration>
|
|
<outputDirectory>${project.build.outputDirectory}/static</outputDirectory>
|
|
<resources>
|
|
<resource>
|
|
<directory>${frontend.dist}</directory>
|
|
</resource>
|
|
</resources>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|