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

	<groupId>de.adorsys.sts</groupId>
	<artifactId>secure-token-service</artifactId>
	<version>0.23.2</version>
	<packaging>pom</packaging>

	<name>SecureTokenService</name>
	<url>https://github.com/adorsys/secure-token-service</url>
	<description>SecureTokenService modules</description>

	<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>Boris Skert</name>
			<email>bsk@adorsys.de</email>
			<organization>adorsys</organization>
			<organizationUrl>https://adorsys.de/</organizationUrl>
		</developer>
		<developer>
			<name>Francis Pouatcha</name>
			<email>fpo@adorsys.de</email>
			<organization>adorsys</organization>
			<organizationUrl>https://adorsys.de/</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:https://git.adorsys.de/adorsys/secure-token-service.git</connection>
		<developerConnection>scm:git:git@github.com:adorsys/secure-token-service.git</developerConnection>
		<url>git@github.com:adorsys/secure-token-service.git</url>
		<tag>HEAD</tag>
	</scm>

	<properties>
		<spring-boot.version>2.0.1.RELEASE</spring-boot.version>
		<swagger.version>2.6.1</swagger.version>
		<java.version>1.8</java.version>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ssZZ</maven.build.timestamp.format>
		<maven.build-timestamp>${maven.build.timestamp}</maven.build-timestamp>
		<cryptoutils.version>0.12.0</cryptoutils.version>
		<lock-persistence.version>0.3.1</lock-persistence.version>
		<jackson.version>2.9.5</jackson.version>
		<scmBranch />
	</properties>
	
	<modules>
		<module>sts-common</module>
		<module>sts-starter</module>
		<module>sts-pop</module>
		<module>sts-token</module>
		<module>sts-server-info</module>
		<module>sts-token-auth</module>
		<module>sts-resource-server</module>
		<module>sts-worksheet-loader</module>
		<module>sts-example</module>
		<module>sts-keymanagement</module>
		<module>sts-spring</module>
		<module>sts-service-component-example</module>
		<module>sts-persistence-jpa</module>
		<module>sts-persistence-mongo</module>
		<module>sts-persistence-fs</module>
	</modules>

	<dependencyManagement>
		<dependencies>
			<!--https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-build-systems.html#using-boot-maven-without-a-parent -->
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>${spring-boot.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>

			<dependency>
				<groupId>io.springfox</groupId>
				<artifactId>springfox-swagger2</artifactId>
				<version>${swagger.version}</version>
			</dependency>
			<dependency>
				<groupId>io.springfox</groupId>
				<artifactId>springfox-swagger-ui</artifactId>
				<version>${swagger.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.sts</groupId>
				<artifactId>sts-common</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.sts</groupId>
				<artifactId>sts-pop</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.sts</groupId>
				<artifactId>sts-token</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.sts</groupId>
				<artifactId>sts-token-auth</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.sts</groupId>
				<artifactId>sts-resource-server</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.sts</groupId>
				<artifactId>sts-server-info</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.sts</groupId>
				<artifactId>sts-worksheet-loader</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.sts</groupId>
				<artifactId>sts-keymanagement</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.sts</groupId>
				<artifactId>sts-spring</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.sts</groupId>
				<artifactId>sts-persistence-jpa</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.sts</groupId>
				<artifactId>sts-persistence-mongo</artifactId>
				<version>${project.version}</version>
			</dependency>
	        <dependency>
	            <groupId>de.adorsys.sts</groupId>
	            <artifactId>sts-persistence-fs</artifactId>
				<version>${project.version}</version>
	        </dependency>

			<dependency>
				<groupId>com.nimbusds</groupId>
				<artifactId>nimbus-jose-jwt</artifactId>
				<version>4.34.1</version>
			</dependency>
			<dependency>
				<groupId>org.bouncycastle</groupId>
				<artifactId>bcprov-jdk15on</artifactId>
				<version>1.58</version>
			</dependency>

			<!-- Environment -->
			<dependency>
				<groupId>de.adorsys.envutils</groupId>
				<artifactId>envutils4j</artifactId>
				<version>0.2</version>
			</dependency>

			<!-- commons -->
			<dependency>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok</artifactId>
				<version>1.16.18</version>
			</dependency>

			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>3.5</version>
				<scope>compile</scope>
			</dependency>

			<!-- Environment -->
			<dependency>
				<groupId>de.adorsys.cryptoutils</groupId>
				<artifactId>jkeyutils</artifactId>
				<version>${cryptoutils.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.cryptoutils</groupId>
				<artifactId>encobject</artifactId>
				<version>${cryptoutils.version}</version>
			</dependency>
	        <dependency>
	            <groupId>de.adorsys.cryptoutils</groupId>
	            <artifactId>filesystemstoreconnection</artifactId>
				<version>${cryptoutils.version}</version>
	        </dependency>
			<dependency>
				<groupId>de.adorsys.cryptoutils</groupId>
				<artifactId>jjwk</artifactId>
				<version>${cryptoutils.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.lock-persistence</groupId>
				<artifactId>lock-persistence-jpa</artifactId>
				<version>${lock-persistence.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.lock-persistence</groupId>
				<artifactId>lock-persistence-mongo</artifactId>
				<version>${lock-persistence.version}</version>
			</dependency>
			<dependency>
				<groupId>de.adorsys.lock-persistence</groupId>
				<artifactId>lock-persistence-core</artifactId>
				<version>${lock-persistence.version}</version>
			</dependency>

			<dependency>
				<groupId>com.google.code.gson</groupId>
				<artifactId>gson</artifactId>
				<version>2.5</version>
			</dependency>

			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-databind</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.datatype</groupId>
				<artifactId>jackson-datatype-jdk8</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.datatype</groupId>
				<artifactId>jackson-datatype-jsr310</artifactId>
				<version>${jackson.version}</version>
			</dependency>

			<!-- Database -->
			<dependency>
				<groupId>org.flywaydb</groupId>
				<artifactId>flyway-core</artifactId>
				<version>5.0.7</version>
				<scope>runtime</scope>
			</dependency>
			<dependency>
				<groupId>org.postgresql</groupId>
				<artifactId>postgresql</artifactId>
				<version>42.2.2</version>
				<scope>runtime</scope>
			</dependency>
			<dependency>
				<groupId>com.h2database</groupId>
				<artifactId>h2</artifactId>
				<version>1.4.197</version>
				<scope>runtime</scope>
			</dependency>

			<!-- Excel Parsing -->
			<dependency>
				<groupId>org.apache.poi</groupId>
				<artifactId>poi</artifactId>
				<version>3.16</version>
			</dependency>

			<!-- Testing Libraries -->
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>com.nitorcreations</groupId>
				<artifactId>junit-runners</artifactId>
				<version>1.3</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>2.13.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-all</artifactId>
				<version>1.3</version>
				<scope>test</scope>
			</dependency>

		</dependencies>
	</dependencyManagement>

	<build>
		<finalName>${project.artifactId}</finalName>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-project-info-reports-plugin</artifactId>
					<version>2.7</version>
				</plugin>

				<!-- Maven Release Build fails if javadoc comments are invalid. http://stackoverflow.com/questions/15886209/maven-is-not-working-in-java-8-when-javadoc-tags-are-incomplete -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>2.9.1</version>
					<configuration>
						<charset>${project.build.sourceEncoding}</charset>
						<encoding>${project.build.sourceEncoding}</encoding>
						<docencoding>${project.build.sourceEncoding}</docencoding>
						<additionalparam>-Xdoclint:none</additionalparam>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.5.2</version>
					<configuration>
						<releaseProfiles>release</releaseProfiles>
						<autoVersionSubmodules>true</autoVersionSubmodules>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.7.0</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.6</version>
					<configuration>
						<archive>
							<manifest>
								<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							</manifest>
							<manifestEntries>
								<Implementation-Version>${project.version}_${maven.build.timestamp}</Implementation-Version>
								<Project-buildArtifact>${project.artifactId}</Project-buildArtifact>
								<Project-buildVersion>${project.version}</Project-buildVersion>
								<Project-buildTimestamp>${maven.build.timestamp}</Project-buildTimestamp>
								<Project-buildNumber>${buildNumber}</Project-buildNumber>
								<Project-buildScmBranch>${scmBranch}</Project-buildScmBranch>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>buildnumber-maven-plugin</artifactId>
					<version>1.3</version>
					<executions>
						<execution>
							<phase>validate</phase>
							<goals>
								<goal>create</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<!-- Die commit id bei "git log -abbrev-commit" ist ebenfalls 7 Zeichen. -->
						<shortRevisionLength>7</shortRevisionLength>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.projectlombok</groupId>
					<artifactId>lombok-maven-plugin</artifactId>
					<version>1.16.18.1</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.8</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>sonatype</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.0.1</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-gpg-plugin</artifactId>
						<version>1.6</version>
						<configuration>
						</configuration>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<additionalparam>-Xdoclint:none</additionalparam>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<phase>package</phase>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<distributionManagement>
		<repository>
			<id>sonatype</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
		<snapshotRepository>
			<id>sonatype</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>
</project>
