<?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">
	<parent>
		<artifactId>jans-lock-server-parent</artifactId>
		<groupId>io.jans</groupId>
		<version>2.1.0</version>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<artifactId>jans-lock-service</artifactId>
	<packaging>jar</packaging>
	<name>jans lock service</name>
	<url>http://maven.apache.org</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
		</resources>

		<testResources>
			<testResource>
				<directory>src/test/resources</directory>
			</testResource>
		</testResources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<skipTests>false</skipTests>
				</configuration>
			</plugin>

			<!-- Swagger -->
			<plugin>
				<groupId>io.swagger.core.v3</groupId>
				<artifactId>swagger-maven-plugin-jakarta</artifactId>
				<executions>
					<execution>
						<configuration>
							<outputFormat>YAML</outputFormat>
							<outputFileName>lock-server</outputFileName>
							<outputPath>${project.parent.basedir}/..</outputPath>
							<prettyPrint>true</prettyPrint>
							<resourcePackages>
								<package>io.jans.lock.service.ws.rs</package>
							</resourcePackages>
						</configuration>
						<phase>compile</phase>
						<goals>
							<goal>resolve</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Protobuf Maven Plugin -->
	        <plugin>
	            <groupId>org.xolstice.maven.plugins</groupId>
	            <artifactId>protobuf-maven-plugin</artifactId>
	            <configuration>
	                <protocArtifact>com.google.protobuf:protoc:4.33.2:exe:${os.detected.classifier}</protocArtifact>
	                <pluginId>grpc-java</pluginId>
	                <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.78.0:exe:${os.detected.classifier}</pluginArtifact>
	            </configuration>
	            <executions>
	                <execution>
                        <id>compile_proto</id>
                        <phase>process-sources</phase>
	                    <goals>
	                        <goal>compile</goal>
	                        <goal>compile-custom</goal>
	                    </goals>
	                </execution>
	            </executions>
	        </plugin>

			<!-- OS Maven Plugin for platform detection -->
	        <plugin>
	            <groupId>kr.motd.maven</groupId>
	            <artifactId>os-maven-plugin</artifactId>
	            <executions>
	                <execution>
	                    <phase>initialize</phase>
	                    <goals>
	                        <goal>detect</goal>
	                    </goals>
	                </execution>
	            </executions>
	        </plugin>
		</plugins>
	</build>

	<dependencies>
		<!-- Jans -->
		<dependency>
			<groupId>io.jans</groupId>
			<artifactId>jans-lock-model</artifactId>
		</dependency>

		<dependency>
			<groupId>io.jans</groupId>
			<artifactId>jans-lock-cedarling</artifactId>
		</dependency>

		<dependency>
			<groupId>io.jans</groupId>
			<artifactId>jans-core-model</artifactId>
		</dependency>

		<dependency>
			<groupId>io.jans</groupId>
			<artifactId>jans-core-message</artifactId>
		</dependency>

		<dependency>
			<groupId>io.jans</groupId>
			<artifactId>jans-core-service</artifactId>
		</dependency>

		<dependency>
			<groupId>io.jans</groupId>
			<artifactId>jans-auth-model</artifactId>
		</dependency>

		<dependency>
			<groupId>io.jans</groupId>
			<artifactId>jans-auth-client</artifactId>
		</dependency>

		<!-- CDI -->
		<dependency>
			<groupId>org.jboss.weld</groupId>
			<artifactId>weld-core-impl</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>jakarta.enterprise</groupId>
			<artifactId>jakarta.enterprise.cdi-api</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.inject</groupId>
			<artifactId>jakarta.inject-api</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.validation</groupId>
			<artifactId>jakarta.validation-api</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.ejb</groupId>
			<artifactId>jakarta.ejb-api</artifactId>
		</dependency>

		<!-- Servlet -->
		<!-- Note: using javax.servlet-api for compatibility with grpc-servlet; avoid mixing Jakarta and javax servlet APIs -->

		<!-- Compatibility: some gRPC/servlet libs compiled against javax.servlet -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>4.0.1</version>
			<scope>provided</scope>
		</dependency>

		<!-- Commons libs -->
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-collections</groupId>
			<artifactId>commons-collections</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>
		<dependency>
			<groupId>io.prometheus</groupId>
			<artifactId>simpleclient_common</artifactId>
		</dependency>
		<dependency>
			<groupId>net.agkn</groupId>
			<artifactId>hll</artifactId>
		</dependency>

		<!-- RestEasy -->
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-cdi</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-client</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-servlet-initializer</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-jaxb-provider</artifactId>
		</dependency>
		<dependency>
			<groupId>org.jboss.resteasy</groupId>
			<artifactId>resteasy-jackson2-provider</artifactId>
		</dependency>

		<!-- gRPC -->
		<dependency>
			<groupId>io.grpc</groupId>
			<artifactId>grpc-netty-shaded</artifactId>
		</dependency>
		<dependency>
			<groupId>io.grpc</groupId>
			<artifactId>grpc-protobuf</artifactId>
		</dependency>
		<dependency>
			<groupId>io.grpc</groupId>
			<artifactId>grpc-stub</artifactId>
		</dependency>
		<dependency>
			<groupId>io.grpc</groupId>
			<artifactId>grpc-servlet-jakarta</artifactId>
		</dependency>

		<!-- RESTEasy gRPC Bridge -->
		<dependency>
			<groupId>dev.resteasy.grpc</groupId>
			<artifactId>grpc-bridge</artifactId>
		</dependency>

		<!-- Swagger -->
		<dependency>
			<groupId>io.swagger.core.v3</groupId>
			<artifactId>swagger-core-jakarta</artifactId>
		</dependency>
		<dependency>
			<groupId>io.swagger.core.v3</groupId>
			<artifactId>swagger-jaxrs2</artifactId>
		</dependency>
		<dependency>
			<groupId>io.swagger.core.v3</groupId>
			<artifactId>swagger-annotations</artifactId>
		</dependency>

		<!-- Documentation -->
		<dependency>
			<groupId>io.jans</groupId>
			<artifactId>jans-doc</artifactId>
		</dependency>

		<!-- Test -->
		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.jboss.weld</groupId>
			<artifactId>weld-junit5</artifactId>
			<scope>test</scope>
		</dependency>

		<!-- Mockito -->
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-inline</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-junit-jupiter</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
</project>