<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2017-2026 Dominic Heutelbeck (dominic@heutelbeck.com)

    SPDX-License-Identifier: Apache-2.0

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<!--
	Build Commands:

	* Build all modules:
	  mvn install

	* Build with coverage:
	  mvn install -Pcoverage

	Utility Goals:

	* Update the version of all modules:
	  mvn versions:set -DnewVersion=4.1.0-RC1 -DprocessAllModules -DgenerateBackupPoms=false

	* Correct the license headers of all source files:
	  mvn com.mycila:license-maven-plugin:format
	  (sapl-bom and sapl-code-style are automatically skipped via license.skip property)
-->
<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>io.sapl</groupId>
	<artifactId>sapl-policy-engine</artifactId>
	<version>4.1.2</version>
	<packaging>pom</packaging>
	<name>Streaming Attribute Policy Language (SAPL) Engine</name>
	<description>Authorization Engine for Attribute Stream-Based Access Control
		(ASBAC)</description>
	<url>https://sapl.io</url>
	<developers>
		<developer>
			<name>Dominic Heutelbeck</name>
			<email>dominic@heutelbeck.com</email>
			<roles>
				<role>Project Owner</role>
			</roles>
			<url>https://github.com/heutelbeck</url>
			<id>heutelbeck</id>
		</developer>
	</developers>
	<organization>
		<name>Dominic Heutelbeck</name>
		<url>https://heutelbeck.com</url>
	</organization>
	<inceptionYear>2017-2026</inceptionYear>
	<licenses>
		<license>
			<name>Apache 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0</url>
		</license>
	</licenses>
	<scm>
		<connection>scm:git:git://github.com/heutelbeck/sapl-policy-engine.git</connection>
		<developerConnection>
			scm:git:git@github.com:heutelbeck/sapl-policy-engine.git</developerConnection>
		<url>https://github.com/heutelbeck/sapl-policy-engine</url>
	</scm>

	<properties>
		<java.version>21</java.version>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<maven.compiler.release>${java.version}</maven.compiler.release>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<license.skip>false</license.skip>
		<formatter.skip>false</formatter.skip>
		<maven.deploy.skip>true</maven.deploy.skip>
		<docker-registry-url>ghcr.io/heutelbeck</docker-registry-url>

		<!-- Heavy differential/scenario tests run a quick smoke size by default and
		     their full size under the it profile (mvn verify -Pit). -->
		<sapl.full.tests>false</sapl.full.tests>

		<!-- Dependencies -->
		<asm.version>9.10.1</asm.version>
		<lsp4j.version>1.0.0</lsp4j.version>
		<antlr.version>4.13.2</antlr.version>
		<okhttp.version>5.4.0</okhttp.version>
		<scalar.version>0.6.49</scalar.version>
		<vaadin.version>25.2.1</vaadin.version>
		<picocli.version>4.7.7</picocli.version>
		<lombok.version>1.18.46</lombok.version>
		<jupiter.version>6.1.1</jupiter.version>
		<mockito.version>5.23.0</mockito.version>
		<guava.version>33.6.0-jre</guava.version>
		<assertj.version>3.27.7</assertj.version>
		<jspecify.version>1.0.0</jspecify.version>
		<protobuf.version>4.35.1</protobuf.version>
		<flexmark.version>0.64.8</flexmark.version>
		<springdoc.version>3.0.3</springdoc.version>
		<jsqlparser.version>5.3</jsqlparser.version>
		<slf4j-test.version>3.0.3</slf4j-test.version>
		<springboot.version>4.1.0</springboot.version>
		<commons-io.version>2.22.0</commons-io.version>
		<classgraph.version>4.8.184</classgraph.version>
		<bouncycastle.version>1.84</bouncycastle.version>
		<flatbuffers.version>25.2.10</flatbuffers.version>
		<commons-lang.version>3.20.0</commons-lang.version>
		<!--
		  Pinned to 1.3.5, not 1.3.6. reactor-netty 1.3.6 places connections on
		  only every other event loop (stride-2 selection over netty 4.2's
		  MultiThreadIoEventLoopGroup), so half the I/O threads stay idle and
		  RSocket throughput drops about 30% for both the PDP server and the
		  RSocket clients (sapl-node, sapl-pdp-remote). 1.3.5 uses all loops.
		  Workaround if a future constraint forces 1.3.6: start the JVM with
		  reactor.netty.ioWorkerCount set to twice the core count.
		  On the next reactor-netty upgrade, verify the stride-2 behavior is
		  fixed before raising this. If it is still broken, prefer setting
		  ioWorkerCount on the LoopResources programmatically over pinning.
		-->
		<reactor-netty.version>1.3.5</reactor-netty.version>
		<testcontainers.version>2.0.5</testcontainers.version>
		<nimbus-jose-jwt.version>10.9.1</nimbus-jose-jwt.version>
		<json-schema-validator.version>3.0.5</json-schema-validator.version>
		<jetbrains-annotations.version>26.1.0</jetbrains-annotations.version>

		<!-- Maven Plug-Ins -->
		<sb-contrib.version>7.7.4</sb-contrib.version>
		<maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
		<maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
		<exec-maven-plugin.version>3.6.3</exec-maven-plugin.version>
		<maven-clean-plugin.version>3.5.0</maven-clean-plugin.version>
		<maven-shade-plugin.version>3.6.2</maven-shade-plugin.version>
		<native-maven-plugin.version>1.1.3</native-maven-plugin.version>
		<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
		<maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
		<jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
		<maven-install-plugin.version>3.1.4</maven-install-plugin.version>
		<license-maven-plugin.version>5.0.0</license-maven-plugin.version>
		<sonar-maven-plugin.version>5.7.0.6970</sonar-maven-plugin.version>
		<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
		<maven-surefire-plugin.version>3.5.6</maven-surefire-plugin.version>
		<maven-failsafe-plugin.version>3.5.6</maven-failsafe-plugin.version>
		<maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
		<maven-resources-plugin.version>3.5.0</maven-resources-plugin.version>
		<cyclonedx-maven-plugin.version>2.9.2</cyclonedx-maven-plugin.version>
		<spotbugs-maven-plugin.version>4.10.2.0</spotbugs-maven-plugin.version>
		<formatter-maven-plugin.version>2.29.0</formatter-maven-plugin.version>
		<maven-dependency-plugin.version>3.11.0</maven-dependency-plugin.version>
		<build-helper-maven-plugin.version>3.6.1</build-helper-maven-plugin.version>
		<central-publishing-maven-plugin.version>0.11.0</central-publishing-maven-plugin.version>

		<!-- Base argLine for JDK21+ profiles -->
		<argLine />
		
		<!-- Path to project/module with the license file -->
		<main.basedir>${project.basedir}</main.basedir>

		<sonar.exclusions>**/gen/**/*</sonar.exclusions>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.google.protobuf</groupId>
				<artifactId>protobuf-java</artifactId>
				<version>${protobuf.version}</version>
			</dependency>
			<dependency>
				<groupId>com.google.flatbuffers</groupId>
				<artifactId>flatbuffers-java</artifactId>
				<version>${flatbuffers.version}</version>
			</dependency>
			<dependency>
				<groupId>com.google.guava</groupId>
				<artifactId>guava</artifactId>
				<version>${guava.version}</version>
			</dependency>
			<dependency>
				<groupId>org.ow2.asm</groupId>
				<artifactId>asm</artifactId>
				<version>${asm.version}</version>
			</dependency>
			<dependency>
				<groupId>org.ow2.asm</groupId>
				<artifactId>asm-tree</artifactId>
				<version>${asm.version}</version>
			</dependency>
			<dependency>
				<groupId>org.ow2.asm</groupId>
				<artifactId>asm-commons</artifactId>
				<version>${asm.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.lsp4j</groupId>
				<artifactId>org.eclipse.lsp4j</artifactId>
				<version>${lsp4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.lsp4j</groupId>
				<artifactId>org.eclipse.lsp4j.jsonrpc</artifactId>
				<version>${lsp4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.antlr</groupId>
				<artifactId>antlr4-runtime</artifactId>
				<version>${antlr.version}</version>
			</dependency>
			<dependency>
				<groupId>org.assertj</groupId>
				<artifactId>assertj-bom</artifactId>
				<version>${assertj.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>com.squareup.okhttp3</groupId>
				<artifactId>okhttp</artifactId>
				<version>${okhttp.version}</version>
			</dependency>
			<dependency>
				<groupId>com.squareup.okhttp3</groupId>
				<artifactId>mockwebserver</artifactId>
				<version>${okhttp.version}</version>
			</dependency>
			<dependency>
				<groupId>com.squareup.okhttp3</groupId>
				<artifactId>okhttp-tls</artifactId>
				<version>${okhttp.version}</version>
			</dependency>
			<!-- Aligns Jupiter and Platform. Must precede spring-boot-dependencies to override its managed JUnit. -->
			<dependency>
				<groupId>org.junit</groupId>
				<artifactId>junit-bom</artifactId>
				<version>${jupiter.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${mockito.version}</version>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-junit-jupiter</artifactId>
				<version>${mockito.version}</version>
			</dependency>
            <dependency>
                <groupId>com.github.valfirst</groupId>
                <artifactId>slf4j-test</artifactId>
                <version>${slf4j-test.version}</version>
            </dependency>
			<dependency>
				<groupId>io.github.classgraph</groupId>
				<artifactId>classgraph</artifactId>
				<version>${classgraph.version}</version>
			</dependency>
			<!-- Must precede spring-boot-dependencies to override the reactor-netty it manages. See reactor-netty.version for why this is pinned. -->
			<dependency>
				<groupId>io.projectreactor.netty</groupId>
				<artifactId>reactor-netty-core</artifactId>
				<version>${reactor-netty.version}</version>
			</dependency>
			<dependency>
				<groupId>io.projectreactor.netty</groupId>
				<artifactId>reactor-netty-http</artifactId>
				<version>${reactor-netty.version}</version>
			</dependency>
            <!-- Spring-Boot -->
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>${springboot.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<!-- Vaadin -->
			<dependency>
				<groupId>com.vaadin</groupId>
				<artifactId>vaadin-bom</artifactId>
				<version>${vaadin.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok</artifactId>
				<version>${lombok.version}</version>
			</dependency>
			<dependency>
				<groupId>info.picocli</groupId>
				<artifactId>picocli</artifactId>
				<version>${picocli.version}</version>
			</dependency>
			<dependency>
				<groupId>info.picocli</groupId>
				<artifactId>picocli-codegen</artifactId>
				<version>${picocli.version}</version>
			</dependency>
			<dependency>
				<groupId>org.jetbrains</groupId>
				<artifactId>annotations</artifactId>
				<version>${jetbrains-annotations.version}</version>
			</dependency>
			<dependency>
				<groupId>io.projectreactor.netty</groupId>
				<artifactId>reactor-netty</artifactId>
				<version>${reactor-netty.version}</version>
			</dependency>
			<dependency>
				<groupId>com.networknt</groupId>
				<artifactId>json-schema-validator</artifactId>
				<version>${json-schema-validator.version}</version>
			</dependency>
			<dependency>
				<groupId>com.github.jsqlparser</groupId>
				<artifactId>jsqlparser</artifactId>
				<version>${jsqlparser.version}</version>
			</dependency>
			<dependency>
				<groupId>com.vladsch.flexmark</groupId>
				<artifactId>flexmark</artifactId>
				<version>${flexmark.version}</version>
			</dependency>
			<dependency>
				<groupId>com.vladsch.flexmark</groupId>
				<artifactId>flexmark-ext-tables</artifactId>
				<version>${flexmark.version}</version>
			</dependency>
			<!-- Utility Libraries -->
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>${commons-lang.version}</version>
			</dependency>
            <dependency>
                <groupId>com.nimbusds</groupId>
                <artifactId>nimbus-jose-jwt</artifactId>
                <version>${nimbus-jose-jwt.version}</version>
            </dependency>
			<dependency>
				<groupId>org.bouncycastle</groupId>
				<artifactId>bcpkix-jdk18on</artifactId>
				<version>${bouncycastle.version}</version>
			</dependency>
			<dependency>
				<groupId>org.bouncycastle</groupId>
				<artifactId>bcprov-jdk18on</artifactId>
				<version>${bouncycastle.version}</version>
			</dependency>
			<dependency>
				<groupId>org.bouncycastle</groupId>
				<artifactId>bcutil-jdk18on</artifactId>
				<version>${bouncycastle.version}</version>
			</dependency>
			<!-- Testcontainers -->
			<dependency>
				<groupId>org.testcontainers</groupId>
				<artifactId>testcontainers-bom</artifactId>
				<version>${testcontainers.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<!-- JSpecify nullness annotations -->
			<dependency>
				<groupId>org.jspecify</groupId>
				<artifactId>jspecify</artifactId>
				<version>${jspecify.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springdoc</groupId>
				<artifactId>springdoc-openapi-starter-webflux-api</artifactId>
				<version>${springdoc.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springdoc</groupId>
				<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
				<version>${springdoc.version}</version>
			</dependency>
			<!-- Scalar API Reference renderer -->
			<dependency>
				<groupId>com.scalar.maven</groupId>
				<artifactId>scalar-webflux</artifactId>
				<version>${scalar.version}</version>
			</dependency>
			<dependency>
				<groupId>com.scalar.maven</groupId>
				<artifactId>scalar-webmvc</artifactId>
				<version>${scalar.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
					<configuration>
						<source>${java.version}</source>
						<target>${java.version}</target>
						<showDeprecation>true</showDeprecation>
						<showWarnings>true</showWarnings>
						<annotationProcessorPaths>
							<path>
								<groupId>org.projectlombok</groupId>
								<artifactId>lombok</artifactId>
								<version>${lombok.version}</version>
							</path>
						</annotationProcessorPaths>
						<compilerArgs>
							<arg>-parameters</arg>
						</compilerArgs>
						<failOnError>true</failOnError>
						<failOnWarning>true</failOnWarning>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>${build-helper-maven-plugin.version}</version>
				</plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven-install-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-plugin.version}</version>
                </plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>${maven-resources-plugin.version}</version>
                    <configuration>
                        <propertiesEncoding>UTF-8</propertiesEncoding>
                    </configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-shade-plugin</artifactId>
					<version>${maven-shade-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>${maven-dependency-plugin.version}</version>
					<executions>
				       <execution>
				          <goals>
				             <goal>properties</goal>
				          </goals>
				       </execution>
				    </executions>
				</plugin>
				<plugin>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-maven-plugin</artifactId>
					<version>${springboot.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven-jar-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>${maven-clean-plugin.version}</version>
					<configuration>
						<filesets>
							<fileset>
								<directory>${basedir}/gen</directory>
								<includes>
									<include>**/*</include>
								</includes>
							</fileset>
						</filesets>
					</configuration>
				</plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                    <configuration>
                        <argLine>@{argLine}
                            -javaagent:${project.build.directory}/mockito-agent/mockito-core.jar -Xshare:off
                            -XX:+EnableDynamicAgentLoading</argLine>
                        <systemPropertyVariables>
                            <sapl.fullTests>${sapl.full.tests}</sapl.fullTests>
                        </systemPropertyVariables>
                        <includes>
                            <include>**/*Test.java</include>
                            <include>**/*Tests.java</include>
                            <include>**/Test*.java</include>
                        </includes>
                        <excludes>
                            <exclude>**/*FuzzTests.java</exclude>
                            <exclude>%regex[.*IT.*]</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${maven-failsafe-plugin.version}</version>
                    <configuration>
                        <argLine>@{argLine}
                            -javaagent:${project.build.directory}/mockito-agent/mockito-core.jar -Xshare:off
                            -XX:+EnableDynamicAgentLoading</argLine>
                    </configuration>
                </plugin>
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>${license-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.cyclonedx</groupId>
					<artifactId>cyclonedx-maven-plugin</artifactId>
					<version>${cyclonedx-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>exec-maven-plugin</artifactId>
					<version>${exec-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin.version}</version>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
                        <detectOfflineLinks>false</detectOfflineLinks>
						<verbose>false</verbose>
						<failOnWarnings>true</failOnWarnings>
						<doclint>none</doclint>
						<tags>
							<tag>
								<name>generated</name>
								<placement>a</placement>
								<head>Generated Code</head>
							</tag>
							<tag>
								<name>ordered</name>
								<placement>a</placement>
								<head>EMF Ordered</head>
							</tag>
							<tag>
								<name>model</name>
								<placement>a</placement>
								<head>EMF Model</head>
							</tag>
							<tag>
								<name>returns</name>
								<placement>a</placement>
								<head>EMF Returns:</head>
							</tag>
						</tags>
					</configuration>
				</plugin>
				<plugin>
					<groupId>net.revelc.code.formatter</groupId>
					<artifactId>formatter-maven-plugin</artifactId>
					<version>${formatter-maven-plugin.version}</version>
					<dependencies>
						<dependency>
							<groupId>io.sapl</groupId>
							<artifactId>sapl-code-style</artifactId>
							<version>${project.version}</version>
						</dependency>
					</dependencies>
					<executions>
						<execution>
							<goals>
								<goal>format</goal>
							</goals>
							<configuration>
								<configFile>eclipse/formatter.xml</configFile>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${jacoco-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>com.github.spotbugs</groupId>
					<artifactId>spotbugs-maven-plugin</artifactId>
					<version>${spotbugs-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.central</groupId>
					<artifactId>central-publishing-maven-plugin</artifactId>
					<version>${central-publishing-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${maven-gpg-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.graalvm.buildtools</groupId>
					<artifactId>native-maven-plugin</artifactId>
					<version>${native-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.antlr</groupId>
					<artifactId>antlr4-maven-plugin</artifactId>
					<version>${antlr.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-mockito-agent</id>
						<phase>process-test-classes</phase>
						<goals>
							<goal>copy</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>org.mockito</groupId>
									<artifactId>mockito-core</artifactId>
									<version>${mockito.version}</version>
									<outputDirectory>${project.build.directory}/mockito-agent</outputDirectory>
									<destFileName>mockito-core.jar</destFileName>
								</artifactItem>
							</artifactItems>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>net.revelc.code.formatter</groupId>
				<artifactId>formatter-maven-plugin</artifactId>
				<configuration>
					<skip>${formatter.skip}</skip>
				</configuration>
			</plugin>
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<configuration>
					<skip>${license.skip}</skip>
					<licenseSets>
						<licenseSet>
							<header>
								${main.basedir}/APACHE-2.txt</header>
							<excludes>
								<exclude>**/*.sapl</exclude>
								<exclude>**/*.vim</exclude>
								<exclude>**/*.lua</exclude>
								<exclude>**/types.d.ts</exclude>
								<exclude>**/vite.config.ts</exclude>
								<exclude>**/vite.generated.ts</exclude>
								<exclude>**/README</exclude>
								<exclude>**/node_modules/**</exclude>
								<exclude>**/frontend/**</exclude>
								<exclude>**/gen/**</exclude>
								<exclude>**/src/test/resources/**</exclude>
								<exclude>**/src/main/bundles/**</exclude>
								<exclude>src/main/resources/**</exclude>
								<exclude>.gitattributes</exclude>
								<exclude>.npmrc</exclude>
								<exclude>**/*.pem</exclude>
								<exclude>**/*.saplbundle</exclude>
								<exclude>**/PKGBUILD</exclude>
								<exclude>**/reference/**</exclude>
								<exclude>**/*.csv</exclude>
								<exclude>**/*.lock</exclude>
								<exclude>**/*.1</exclude>
								<exclude>**/__pycache__/**</exclude>
								<exclude>**/*.pyc</exclude>
								<exclude>**/.attach_pid*</exclude>
								<exclude>**/sapl-benchmark/bin/**</exclude>
							</excludes>
						</licenseSet>
					</licenseSets>
					<properties>
						<owner>Dominic Heutelbeck</owner>
						<email>dominic@heutelbeck.com</email>
					</properties>
					<mapping>
						<md>XML_STYLE</md>
						<java>SLASHSTAR_STYLE</java>
						<adoc>DOUBLESLASH_STYLE</adoc>
						<ad>DOUBLESLASH_STYLE</ad>
						<config>SCRIPT_STYLE</config>
						<target>XML_STYLE</target>
						<g4>SLASHSTAR_STYLE</g4>
						<sapltest>SLASHSTAR_STYLE</sapltest>
						<service>SCRIPT_STYLE</service>
						<install>SCRIPT_STYLE</install>
						<nix>SCRIPT_STYLE</nix>
						<rego>SCRIPT_STYLE</rego>
						<fbs>DOUBLESLASH_STYLE</fbs>
					</mapping>
				</configuration>
				<executions>
					<execution>
						<phase>process-sources</phase>
						<goals>
							<goal>format</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonarsource.scanner.maven</groupId>
				<artifactId>sonar-maven-plugin</artifactId>
				<version>${sonar-maven-plugin.version}</version>
			</plugin>
		</plugins>
	</build>

	<modules>
		<module>sapl-code-style</module>

		<!-- Core modules -->
		<module>sapl-api</module>
		<module>sapl-api-proto</module>
		<module>sapl-api-test</module>
		<module>sapl-attribute-utils</module>
		<module>sapl-parser</module>
		<module>sapl-pdp</module>
		<module>sapl-pdp-reactive</module>

		<!-- PDP extensions (depend on sapl-api) -->
		<module>pdp-extensions/geo-functions</module>
		<module>pdp-extensions/geo-traccar</module>
		<module>pdp-extensions/mqtt-functions</module>
		<module>pdp-extensions/mqtt-pip</module>

		<!-- Testing modules -->
		<module>sapl-test-parser</module>
		<module>sapl-test</module>
		<module>sapl-maven-plugin</module>

		<!-- Integration modules -->
		<module>sapl-pdp-remote</module>
		<module>sapl-spring-pdp</module>
		<module>sapl-spring-boot-starter</module>

		<!-- IDE and tooling -->
		<module>sapl-language-server</module>
		<module>sapl-documentation-generator</module>

		<!-- Web endpoints -->
		<module>sapl-vaadin-theme</module>
		<module>sapl-vaadin-editor</module>

		<!-- Server applications -->
		<module>sapl-node</module>
		<module>sapl-playground</module>

		<!-- Benchmarks (not published, not in BOM) -->
		<module>sapl-benchmark/sapl-benchmark-sapl4</module>

		<!-- BOM (after all artifacts it references) -->
		<module>sapl-bom</module>
	</modules>

	<profiles>
		<profile>
			<id>it</id>
			<properties>
				<sapl.full.tests>true</sapl.full.tests>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>${maven-failsafe-plugin.version}</version>
						<executions>
							<execution>
								<goals>
									<goal>integration-test</goal>
									<goal>verify</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>coverage</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>prepare-agent</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>report</id>
								<goals>
									<goal>report</goal>
								</goals>
								<configuration>
									<formats>
										<format>XML</format>
									</formats>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>spotbugs</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.github.spotbugs</groupId>
						<artifactId>spotbugs-maven-plugin</artifactId>
						<configuration>
							<excludeFilterFile>spotbugsExcludeFilter.xml</excludeFilterFile>
							<includeTests>true</includeTests>
							<addSourceDirs>true</addSourceDirs>
							<plugins>
								<plugin>
									<groupId>com.mebigfatguy.sb-contrib</groupId>
									<artifactId>sb-contrib</artifactId>
									<version>${sb-contrib.version}</version>
								</plugin>
							</plugins>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>		
	    <profile>
	      <id>sonatypeDeploy</id>
	      <build>
	        <plugins>
	          <plugin>
	            <groupId>org.sonatype.central</groupId>
	            <artifactId>central-publishing-maven-plugin</artifactId>
	            <extensions>true</extensions>
	            <configuration>
	              <publishingServerId>central</publishingServerId>
	              <autoPublish>true</autoPublish>
	              <waitUntil>published</waitUntil>
	            </configuration>
	          </plugin>
	          <plugin>
	            <groupId>org.apache.maven.plugins</groupId>
	            <artifactId>maven-source-plugin</artifactId>
	            <version>${maven-source-plugin.version}</version>
	            <executions>
	              <execution>
	                <id>attach-sources</id>
	                <goals>
	                  <goal>jar-no-fork</goal>
	                </goals>
	              </execution>
	            </executions>
	          </plugin>
	          <plugin>
	            <groupId>org.apache.maven.plugins</groupId>
	            <artifactId>maven-javadoc-plugin</artifactId>
	            <executions>
	              <execution>
	                <id>attach-javadocs</id>
	                <goals>
	                  <goal>jar</goal>
	                </goals>
	              </execution>
	            </executions>
	          </plugin>
	          <plugin>
	            <groupId>org.apache.maven.plugins</groupId>
	            <artifactId>maven-gpg-plugin</artifactId>
	            <executions>
	              <execution>
	                <id>sign-artifacts</id>
	                <phase>verify</phase>
	                <goals>
	                  <goal>sign</goal>
	                </goals>
	                <configuration>
	                  <gpgArguments>
	                    <arg>--pinentry-mode</arg>
	                    <arg>loopback</arg>
	                  </gpgArguments>
	                </configuration>
	              </execution>
	            </executions>
	          </plugin>
	        </plugins>
	      </build>
	    </profile>		
	</profiles>

	<repositories>
		<repository>
			<id>central-portal-snapshots</id>
			<name>Central Portal Snapshots</name>
			<url>https://central.sonatype.com/repository/maven-snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<pluginRepositories>
		<pluginRepository>
			<id>central-portal-snapshots</id>
			<name>Central Portal Snapshots</name>
			<url>https://central.sonatype.com/repository/maven-snapshots/</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</pluginRepository>
	</pluginRepositories>

</project>
