1
0
Files
asv-format-validator/pom.xml
T
2026-04-20 10:11:19 +02:00

234 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.gecheckt</groupId>
<artifactId>asv-format-validator</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<!-- Java Version -->
<maven.compiler.release>21</maven.compiler.release>
<!-- Encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Dependency Versions -->
<log4j.version>2.20.0</log4j.version>
<slf4j.version>2.0.7</slf4j.version>
<junit.version>5.9.2</junit.version>
<mockito.version>5.23.0</mockito.version>
<!-- Plugin Versions -->
<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
<maven-dependency-plugin.version>3.6.0</maven-dependency-plugin.version>
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
<maven-surefire-plugin.version>3.0.0</maven-surefire-plugin.version>
<jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version>
</properties>
<dependencies>
<!-- SLF4J API (Logging-Fassade; Bindung an Log4j2 erfolgt zur Laufzeit) -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<!-- Log4j2-SLF4J-Bridge (Runtime-Bindung: SLF4J → Log4j2) -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>${log4j.version}</version>
<scope>runtime</scope>
</dependency>
<!-- Log4j2 API (bis AP04 direkt genutzt; danach nur noch indirekt via SLF4J) -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</dependency>
<!-- Log4j2 Core -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>
<!-- JUnit 5 für Tests -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<!-- Mockito für Mocking in Tests -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<!-- ArchUnit: Automatisierte Architekturtests (hexagonale Struktur, Log4j2-Isolation) -->
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>1.3.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>21</release>
</configuration>
</plugin>
<!-- Löst Jar-Pfade für Dependencies auf; liefert u.a. den Pfad
zum Mockito-Core-JAR für den expliziten Java-Agent in Surefire -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven-dependency-plugin.version}</version>
<executions>
<execution>
<id>get-mockito-agent-path</id>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<!-- @{argLine} wird von JaCoCo prepare-agent (Late-Binding) befüllt.
Mockito wird als expliziter Java-Agent eingehängt, um die
ByteBuddy-Self-Attach-Warnung zu vermeiden (AP01, Rest-Risiko 2). -->
<argLine>@{argLine} -javaagent:${org.mockito:mockito-core:jar}</argLine>
</configuration>
</plugin>
<!-- Uber-JAR via maven-shade-plugin (ersetzt maven-jar-plugin-Platzhalter aus AP02) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.2</version>
<dependencies>
<!-- Stellt Log4j2PluginsCacheFileTransformer bereit (nicht im Shade-Plugin selbst enthalten) -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-transform-maven-shade-plugin-extensions</artifactId>
<version>0.1.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>de.gecheckt.asv.bootstrap.Main</mainClass>
</transformer>
<!-- Log4j2-Plugin-Cache korrekt zusammenführen, sonst fehlen Plugins im Uber-JAR -->
<transformer implementation="org.apache.logging.log4j.maven.plugins.shade.transformer.Log4j2PluginCacheFileTransformer"/>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
<!-- JaCoCo: Coverage-Messung ohne Schwellwerte (Schwellen kommen in M9) -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<id>jacoco-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-report</id>
<phase>verify</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<!-- Mutation-Tests via PIT; aktiviert mit: mvn -P mutation test
Schwellwerte werden erst in M9 gesetzt. -->
<profile>
<id>mutation</id>
<build>
<plugins>
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.15.3</version>
<dependencies>
<!-- JUnit 5 Adapter für PIT (ohne dieses Plugin kann PIT keine JUnit-5-Tests laufen lassen) -->
<dependency>
<groupId>org.pitest</groupId>
<artifactId>pitest-junit5-plugin</artifactId>
<version>1.2.1</version>
</dependency>
</dependencies>
<configuration>
<targetClasses>
<param>de.gecheckt.asv.*</param>
</targetClasses>
<targetTests>
<param>de.gecheckt.asv.*</param>
</targetTests>
</configuration>
<executions>
<execution>
<id>pit-mutation</id>
<phase>test</phase>
<goals>
<goal>mutationCoverage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>