<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>se.sundsvall.dept44</groupId>
	<artifactId>dept44-parent</artifactId>
	<version>3.2</version>
	<packaging>pom</packaging>
	<name>dept44-parent</name>
	<description>Sundsvalls kommun spring boot library</description>
	<url>https://github.com/Sundsvallskommun/dept44</url>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>https://opensource.org/licenses/MIT</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Utvecklingsfabriken Sundsvall kommun</name>
			<organization>Sundsvalls kommun</organization>
			<url>https://github.com/orgs/Sundsvallskommun/people</url>
		</developer>
	</developers>

	<modules>
		<module>dept44-models</module>
		<module>dept44-build-tools</module>
		<module>dept44-service-parent</module>
		<module>dept44-starter-parent</module>
		<module>dept44-starter</module>
		<module>dept44-starter-authorization</module>
		<module>dept44-starter-feign</module>
		<module>dept44-starter-logback-graylog</module>
		<module>dept44-starter-test</module>
		<module>dept44-starter-webclient</module>
		<module>dept44-starter-webservicetemplate</module>
		<module>dept44-common-validators</module>
		<module>dept44-example</module>
	</modules>
	
	<scm>
		<url>https://github.com/Sundsvallskommun/dept44</url>
		<developerConnection>scm:git:https://github.com/Sundsvallskommun/dept44.git</developerConnection>
		<connection>scm:git:git://github.com/Sundsvallskommun/dept44.git</connection>
		<tag>dept44-release-3.2</tag>
	</scm>

	<profiles>
		<profile>
			<id>maven-central</id>
			<distributionManagement>
				<snapshotRepository>
					<id>ossrh</id>
					<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
				</snapshotRepository>
				<repository>
					<id>ossrh</id>
					<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
			</distributionManagement>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</version>
						<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>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>${nexus-staging-maven-plugin.version}</version>
						<extensions>true</extensions>
						<configuration>
						        <serverId>ossrh</serverId>
						        <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
						        <autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<properties>
		<java.version>17</java.version>
		<spring-boot.version>3.1.4</spring-boot.version>
		<project.encoding>UTF-8</project.encoding>
		<project.build.sourceEncoding>${project.encoding}</project.build.sourceEncoding>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<downloadSources>true</downloadSources>
		<downloadJavadocs>true</downloadJavadocs>

		<!-- Dependency versions -->
		<apache-commons.version>3.13.0</apache-commons.version>
		<logbook.version>3.5.0</logbook.version>
		<problem.version>0.27.1</problem.version> <!-- Use different versions of problem and problem-spring-XYZ libraries, because of reasons... -->
		<problem-spring-web.version>0.29.1</problem-spring-web.version>
		<springdoc.version>2.2.0</springdoc.version>
		<spring-cloud.version>2022.0.4</spring-cloud.version>
		<bean-matchers.version>0.14</bean-matchers.version>
		<json-unit.version>3.2.2</json-unit.version>
		<logback-gelf.version>4.0.2</logback-gelf.version>
		<janino.version>3.1.10</janino.version>
		<jsonwebtoken.version>0.11.5</jsonwebtoken.version>

		<!-- Spring boot admin -->
		<spring-boot-admin.version>3.1.7</spring-boot-admin.version>

		<!-- Plugin versions -->
		<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
		<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
		<build-helper-maven-plugin.version>3.4.0</build-helper-maven-plugin.version>
		<maven-source-plugin.version>3.3.0</maven-source-plugin.version>
		<maven-javadoc-plugin.version>3.6.0</maven-javadoc-plugin.version>
		<maven-surefire-plugin.version>3.1.2</maven-surefire-plugin.version>
		<maven-failsafe-plugin.version>3.1.2</maven-failsafe-plugin.version>
		<jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version>
		<git-commit-id-maven-plugin.version>6.0.0</git-commit-id-maven-plugin.version>
		<nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>
		<maven-gpg-plugin.version>3.1.0</maven-gpg-plugin.version>

		<!-- Coverage and branch coverage settings for tests in Dept-44 -->
		<coverage.line.level>0.85</coverage.line.level>
		<coverage.branch.level>0.50</coverage.branch.level>
	</properties>

	<dependencyManagement>
		<dependencies>
			<!-- Spring Boot dependencies BOM -->
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>${spring-boot.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			
			<!-- Spring Cloud BOM -->
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-dependencies</artifactId>
				<version>${spring-cloud.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>

			<!-- Logbook BOM -->
			<dependency>
				<groupId>org.zalando</groupId>
				<artifactId>logbook-bom</artifactId>
				<version>${logbook.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>

			<!-- Framework -->
			<dependency>
				<groupId>se.sundsvall.dept44</groupId>
				<artifactId>dept44-starter</artifactId>
				<version>3.2</version>
			</dependency>
			<dependency>
				<groupId>se.sundsvall.dept44</groupId>
				<artifactId>dept44-starter-authorization</artifactId>
				<version>3.2</version>
			</dependency>
			<dependency>
				<groupId>se.sundsvall.dept44</groupId>
				<artifactId>dept44-common-validators</artifactId>
				<version>3.2</version>
			</dependency>
			<dependency>
				<groupId>se.sundsvall.dept44</groupId>
				<artifactId>dept44-models</artifactId>
				<version>3.2</version>
			</dependency>
			<dependency>
				<groupId>se.sundsvall.dept44</groupId>
				<artifactId>dept44-starter-feign</artifactId>
				<version>3.2</version>
			</dependency>
			<dependency>
				<groupId>se.sundsvall.dept44</groupId>
				<artifactId>dept44-starter-logback-graylog</artifactId>
				<version>3.2</version>
			</dependency>
			<dependency>
				<groupId>se.sundsvall.dept44</groupId>
				<artifactId>dept44-starter-test</artifactId>
				<version>3.2</version>
			</dependency>
			<dependency>
				<groupId>se.sundsvall.dept44</groupId>
				<artifactId>dept44-starter-webclient</artifactId>
				<version>3.2</version>
			</dependency>
			<dependency>
				<groupId>se.sundsvall.dept44</groupId>
				<artifactId>dept44-starter-webservicetemplate</artifactId>
				<version>3.2</version>
			</dependency>

			<!-- Problem -->
			<dependency>
				<groupId>org.zalando</groupId>
				<artifactId>problem</artifactId>
				<version>${problem.version}</version>
			</dependency>
			<dependency>
				<groupId>org.zalando</groupId>
				<artifactId>jackson-datatype-problem</artifactId>
				<version>${problem.version}</version>
			</dependency>
			<dependency>
				<groupId>org.zalando</groupId>
				<artifactId>problem-gson</artifactId>
				<version>${problem.version}</version>
			</dependency>
			<dependency>
				<groupId>org.zalando</groupId>
				<artifactId>problem-spring-web-starter</artifactId>
				<version>${problem-spring-web.version}</version>
			</dependency>

			<!-- SpringDoc -->
			<dependency>
				<groupId>org.springdoc</groupId>
				<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
				<version>${springdoc.version}</version>
			</dependency>

			<!-- Other -->
			<dependency>
				<groupId>com.google.code.bean-matchers</groupId>
				<artifactId>bean-matchers</artifactId>
				<version>${bean-matchers.version}</version>
			</dependency>
			<dependency>
				<groupId>net.javacrumbs.json-unit</groupId>
				<artifactId>json-unit</artifactId>
				<version>${json-unit.version}</version>
			</dependency>
			<dependency>
				<groupId>net.javacrumbs.json-unit</groupId>
				<artifactId>json-unit-assertj</artifactId>
				<version>${json-unit.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>${apache-commons.version}</version>
			</dependency>
			<dependency>
				<groupId>de.siegmar</groupId>
				<artifactId>logback-gelf</artifactId>
				<version>${logback-gelf.version}</version>
			</dependency>
			<dependency>
				<!-- Needed for conditionals in logback-spring.xml -->
				<groupId>org.codehaus.janino</groupId>
				<artifactId>janino</artifactId>
				<version>${janino.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven-surefire-plugin.version}</version>
				<configuration>
					<argLine>-Dspring.main.banner-mode=off</argLine>
				</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</goal>
						</goals>
					</execution>
				</executions>
			</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>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>3.0.1</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<tagNameFormat>dept44-release-@{project.version}</tagNameFormat>
					<releaseProfiles>maven-central</releaseProfiles>
					<goals>deploy</goals>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>
