refactoring
This commit is contained in:
264
parent-pom.xml
Normal file
264
parent-pom.xml
Normal file
@@ -0,0 +1,264 @@
|
|||||||
|
<?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>dev.lions.user.manager</groupId>
|
||||||
|
<artifactId>lions-user-manager-parent</artifactId>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
<name>Lions User Manager - Parent</name>
|
||||||
|
<description>Module de gestion centralisée des utilisateurs via Keycloak Admin API</description>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>gitea-lionsdev</id>
|
||||||
|
<url>https://git.lions.dev/api/packages/lionsdev/maven</url>
|
||||||
|
</repository>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>gitea-lionsdev</id>
|
||||||
|
<url>https://git.lions.dev/api/packages/lionsdev/maven</url>
|
||||||
|
</snapshotRepository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>gitea-lionsdev</id>
|
||||||
|
<url>https://git.lions.dev/api/packages/lionsdev/maven</url>
|
||||||
|
<releases><enabled>true</enabled></releases>
|
||||||
|
<snapshots><enabled>true</enabled></snapshots>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
|
||||||
|
<!-- Quarkus & Dependencies -->
|
||||||
|
<quarkus.version>3.17.8</quarkus.version>
|
||||||
|
<quarkus-primefaces.version>3.15.1</quarkus-primefaces.version>
|
||||||
|
<primefaces.version>14.0.5</primefaces.version>
|
||||||
|
<primefaces-freya-extension.version>1.0.0</primefaces-freya-extension.version>
|
||||||
|
<keycloak.version>26.0.7</keycloak.version>
|
||||||
|
<lombok.version>1.18.30</lombok.version>
|
||||||
|
<mapstruct.version>1.5.5.Final</mapstruct.version>
|
||||||
|
|
||||||
|
<!-- Testing -->
|
||||||
|
<junit.version>5.10.1</junit.version>
|
||||||
|
<mockito.version>5.11.0</mockito.version>
|
||||||
|
<testcontainers.version>1.19.3</testcontainers.version>
|
||||||
|
<rest-assured.version>5.4.0</rest-assured.version>
|
||||||
|
|
||||||
|
<!-- Plugins -->
|
||||||
|
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
|
||||||
|
<maven-surefire-plugin.version>3.2.2</maven-surefire-plugin.version>
|
||||||
|
<maven-failsafe-plugin.version>3.2.2</maven-failsafe-plugin.version>
|
||||||
|
<jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<modules>
|
||||||
|
<module>lions-user-manager-server-api</module>
|
||||||
|
<module>lions-user-manager-server-impl-quarkus</module>
|
||||||
|
<module>lions-user-manager-client-quarkus-primefaces-freya</module>
|
||||||
|
</modules>
|
||||||
|
|
||||||
|
<dependencyManagement>
|
||||||
|
<dependencies>
|
||||||
|
<!-- Quarkus BOM -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus.platform</groupId>
|
||||||
|
<artifactId>quarkus-bom</artifactId>
|
||||||
|
<version>${quarkus.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Internal modules -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.lions.user.manager</groupId>
|
||||||
|
<artifactId>lions-user-manager-server-api</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- PrimeFaces Freya Extension -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.lions</groupId>
|
||||||
|
<artifactId>primefaces-freya-extension</artifactId>
|
||||||
|
<version>${primefaces-freya-extension.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Lombok -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>${lombok.version}</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- MapStruct -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct</artifactId>
|
||||||
|
<version>${mapstruct.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Testing -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.junit.jupiter</groupId>
|
||||||
|
<artifactId>junit-jupiter</artifactId>
|
||||||
|
<version>${junit.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.testcontainers</groupId>
|
||||||
|
<artifactId>testcontainers-bom</artifactId>
|
||||||
|
<version>${testcontainers.version}</version>
|
||||||
|
<type>pom</type>
|
||||||
|
<scope>import</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.rest-assured</groupId>
|
||||||
|
<artifactId>rest-assured</artifactId>
|
||||||
|
<version>${rest-assured.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>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>dev</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<properties>
|
||||||
|
<quarkus.profile>dev</quarkus.profile>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>prod</id>
|
||||||
|
<properties>
|
||||||
|
<quarkus.profile>prod</quarkus.profile>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>native</id>
|
||||||
|
<properties>
|
||||||
|
<quarkus.profile>prod</quarkus.profile>
|
||||||
|
<quarkus.package.jar.type>native</quarkus.package.jar.type>
|
||||||
|
</properties>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.quarkus</groupId>
|
||||||
|
<artifactId>quarkus-junit5</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>${maven-compiler-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<annotationProcessorPaths>
|
||||||
|
<path>
|
||||||
|
<groupId>org.projectlombok</groupId>
|
||||||
|
<artifactId>lombok</artifactId>
|
||||||
|
<version>${lombok.version}</version>
|
||||||
|
</path>
|
||||||
|
<path>
|
||||||
|
<groupId>org.mapstruct</groupId>
|
||||||
|
<artifactId>mapstruct-processor</artifactId>
|
||||||
|
<version>${mapstruct.version}</version>
|
||||||
|
</path>
|
||||||
|
</annotationProcessorPaths>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>io.quarkus.platform</groupId>
|
||||||
|
<artifactId>quarkus-maven-plugin</artifactId>
|
||||||
|
<version>${quarkus.version}</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<version>${maven-surefire-plugin.version}</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-failsafe-plugin</artifactId>
|
||||||
|
<version>${maven-failsafe-plugin.version}</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>${jacoco-maven-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>report</id>
|
||||||
|
<phase>test</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>jacoco-check</id>
|
||||||
|
<goals>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<rules>
|
||||||
|
<rule>
|
||||||
|
<element>PACKAGE</element>
|
||||||
|
<limits>
|
||||||
|
<limit>
|
||||||
|
<counter>LINE</counter>
|
||||||
|
<value>COVEREDRATIO</value>
|
||||||
|
<minimum>0.80</minimum>
|
||||||
|
</limit>
|
||||||
|
</limits>
|
||||||
|
</rule>
|
||||||
|
</rules>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
30
script/publish-api.bat
Normal file
30
script/publish-api.bat
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
@echo off
|
||||||
|
REM Publie le parent pom + server-api sur le Gitea Package Registry
|
||||||
|
REM Usage : script\publish-api.bat
|
||||||
|
REM Depuis : n'importe où dans le repo server-api
|
||||||
|
REM Prérequis: credentials dans %USERPROFILE%\.m2\settings.xml (server id: gitea-lionsdev)
|
||||||
|
|
||||||
|
set REGISTRY_URL=https://git.lions.dev/api/packages/lionsdev/maven
|
||||||
|
set REGISTRY_ID=gitea-lionsdev
|
||||||
|
|
||||||
|
cd /d "%~dp0.."
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo [1/2] Publication du parent pom...
|
||||||
|
call mvn deploy:deploy-file ^
|
||||||
|
-DgroupId=dev.lions.user.manager ^
|
||||||
|
-DartifactId=lions-user-manager-parent ^
|
||||||
|
-Dversion=1.0.0 ^
|
||||||
|
-Dpackaging=pom ^
|
||||||
|
-Dfile=parent-pom.xml ^
|
||||||
|
-DrepositoryId=%REGISTRY_ID% ^
|
||||||
|
-Durl=%REGISTRY_URL%
|
||||||
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo [2/2] Publication du server-api...
|
||||||
|
call mvn deploy -DskipTests
|
||||||
|
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Done -- https://git.lions.dev/lionsdev/-/packages
|
||||||
30
script/publish-api.sh
Normal file
30
script/publish-api.sh
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Publie le parent pom + server-api sur le Gitea Package Registry
|
||||||
|
# Usage : ./script/publish-api.sh
|
||||||
|
# Depuis : n'importe où dans le repo server-api
|
||||||
|
# Prérequis: credentials dans ~/.m2/settings.xml (server id: gitea-lionsdev)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
REGISTRY_URL="https://git.lions.dev/api/packages/lionsdev/maven"
|
||||||
|
REGISTRY_ID="gitea-lionsdev"
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "[1/2] Publication du parent pom..."
|
||||||
|
mvn deploy:deploy-file \
|
||||||
|
-DgroupId=dev.lions.user.manager \
|
||||||
|
-DartifactId=lions-user-manager-parent \
|
||||||
|
-Dversion=1.0.0 \
|
||||||
|
-Dpackaging=pom \
|
||||||
|
-Dfile=parent-pom.xml \
|
||||||
|
-DrepositoryId="${REGISTRY_ID}" \
|
||||||
|
-Durl="${REGISTRY_URL}"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "[2/2] Publication du server-api..."
|
||||||
|
mvn deploy -DskipTests
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "Done -- https://git.lions.dev/lionsdev/-/packages"
|
||||||
Reference in New Issue
Block a user