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

    Copyright (C) 2017-2025 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.

-->
<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>io.sapl</groupId>
		<artifactId>sapl-policy-engine</artifactId>
		<version>3.0.0</version>
	</parent>
	<artifactId>sapl-pdp-embedded</artifactId>

	<packaging>jar</packaging>

	<name>SAPL Embedded PDP</name>

	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>sapl-lang</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>io.github.classgraph</groupId>
			<artifactId>classgraph</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-text</artifactId>
			<version>1.11.0</version>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<scope>provided</scope>
		</dependency>
		<!-- Testing -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.google.jimfs</groupId>
			<artifactId>jimfs</artifactId>
			<version>1.3.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>io.projectreactor</groupId>
			<artifactId>reactor-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-library</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.spotify</groupId>
			<artifactId>hamcrest-jackson</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.spotify</groupId>
			<artifactId>hamcrest-optional</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.spotify</groupId>
			<artifactId>hamcrest-pojo</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>sapl-assertj</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>net.javacrumbs.json-unit</groupId>
			<artifactId>json-unit-assertj</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.code-intelligence</groupId>
			<artifactId>jazzer-junit</artifactId>
			<scope>test</scope>
			<version>0.22.1</version>
		</dependency>
		<!-- OSGi -->
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.annotation.bundle</artifactId>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>biz.aQute.bnd</groupId>
				<artifactId>bnd-maven-plugin</artifactId>
				<version>6.4.0</version>
				<executions>
					<execution>
						<goals>
							<goal>bnd-process</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<!-- Lombok is not needed as a runtime dependency but is
					automatically detected as one due when
                    SneakyThrows is in use because it leaves traces in the class files. This can be
					removed when the
                    project uses a version of lombok which contains a fix for
                     https://github.com/projectlombok/lombok/issues/3601 -->
					<bnd>
						Import-Package: com.google.common.*;version="32",\
						*
					</bnd>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestFile>
							${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>net.ju-n.maven.plugins</groupId>
				<artifactId>checksum-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>run_fuzz_tests</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<environmentVariables>
								<JAZZER_FUZZ>1</JAZZER_FUZZ>
							</environmentVariables>
							<includes>
								<include>FuzzTests.java</include>
							</includes>
							<excludes>
								<exclude>none</exclude>
							</excludes>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>

