<?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>

	<parent>
		<groupId>org.cibseven</groupId>
		<artifactId>release-parent</artifactId>
		<version>1.8.0</version>
	</parent>

	<groupId>org.cibseven.webapp.auth</groupId>
	<artifactId>common-auth</artifactId>
	<version>1.5.0</version>

	<name>CIB seven common authentication</name>
	<description>Common authentication library for CIB seven web applications</description>
	<url>https://github.com/cibseven/common-auth</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		
		<jjwt.version>0.12.6</jjwt.version>
		<!-- The Gson version Spring Boot 4.1 manages -->
		<gson.version>2.13.2</gson.version>
		<!-- The annotations of Jackson 2.21 and Jackson 3.1 -->
		<jackson-annotations.version>2.21</jackson-annotations.version>
		<javax-servlet-api.version>6.0.0</javax-servlet-api.version>
		<!-- JUnit 5: the library is compiled for Java 11 (release-parent), JUnit 6 needs Java 17 -->
		<junit-jupiter.version>5.13.4</junit-jupiter.version>
		
		<project.git.url>${gitlab.url}/web/common/common-auth.git</project.git.url>
		
		<!-- REWRITE COPYRIGHT PARAMEMER FROM SUPER POM (CAMUNDA COPYRIGHT) -->
		<license.inlineHeader>Copyright CIB software GmbH and/or licensed to CIB software GmbH
under one or more contributor license agreements. See the NOTICE file
distributed with this work for additional information regarding copyright
ownership. CIB software licenses this file to you under the Apache License,
Version 2.0; 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.</license.inlineHeader>
		
	</properties>
	
	<scm>
		<connection>scm:git:${project.git.url}</connection>
		<developerConnection>scm:git:${project.git.url}</developerConnection>
		<url>${project.git.url}</url>
		<tag>HEAD</tag>
	</scm>
	
	<dependencies>
		<dependency>
			<groupId>jakarta.servlet</groupId>
			<artifactId>jakarta.servlet-api</artifactId>
			<version>${javax-servlet-api.version}</version>
			<scope>provided</scope>
		</dependency>	
		
		<dependency> <!-- https://github.com/jwtk/jjwt -->
			<groupId>io.jsonwebtoken</groupId>
			<artifactId>jjwt-api</artifactId>
			<version>${jjwt.version}</version>
		</dependency>
		
		<dependency>
			<groupId>io.jsonwebtoken</groupId>
			<artifactId>jjwt-impl</artifactId>
			<version>${jjwt.version}</version>
		</dependency>
		
		<!-- The JSON implementation jjwt reads and writes the tokens with (found through the ServiceLoader).
		     Gson, not jjwt-jackson: jjwt has no Jackson 3 module, and jjwt-jackson would put Jackson 2
		     (jackson-databind) on the classpath of every application that uses this library. -->
		<dependency>
			<groupId>io.jsonwebtoken</groupId>
			<artifactId>jjwt-gson</artifactId>
			<version>${jjwt.version}</version>
		</dependency>

		<!-- Newer than the Gson 2.9.0 of jjwt-gson 0.12.6: since Gson 2.9.1 nested JSON is read without recursion,
		     since 2.12 its nesting depth is limited. The token header is read before its signature is checked. -->
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>${gson.version}</version>
		</dependency>

		<!-- @JsonTypeInfo on Login. Jackson 2 and Jackson 3 both use these annotations
		     (package com.fasterxml.jackson.annotation); they used to come in through jjwt-jackson. -->
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-annotations</artifactId>
			<version>${jackson-annotations.version}</version>
		</dependency>
		
		<dependency>
			<groupId>io.swagger.core.v3</groupId>
			<artifactId>swagger-annotations-jakarta</artifactId>
			<version>${swagger-annotations.version}</version>
		</dependency>

		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>${junit-jupiter.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<profiles>
		<profile>
			<id>add-missing-copyright</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.mycila</groupId>
						<artifactId>license-maven-plugin</artifactId>
						<version>5.0.0</version>
						<configuration>
							<mapping>
								<vue>XML_STYLE</vue>
							</mapping>
							<licenseSets>
								<licenseSet>
									<inlineHeader>${license.inlineHeader}</inlineHeader>
									<includes>
										<include>**/*.java</include>
										<include>**/*.js</include> 
										<include>**/*.vue</include>
									</includes>
								</licenseSet>
							</licenseSets>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>CIB software GmbH</name>
			<email>info@cib.de</email>
			<organization>CIB software GmbH</organization>
			<organizationUrl>https://www.cib.de</organizationUrl>
		</developer>
	</developers>

</project>
