<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>be.vito.rma.configtools</groupId>
	<artifactId>configtools</artifactId>
	<version>2.2.1</version>
	<packaging>pom</packaging>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>Tools for handling the configuration of your applications</description>
	<url>https://github.com/VITObelgium/java-configtools</url>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://www.opensource.org/licenses/mit-license.php</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Stijn Van Looy</name>
			<email>Stijn.VanLooy@vito.be</email>
			<organization>VITO</organization>
			<organizationUrl>http://www.vito.be</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git://github.com/VITObelgium/java-configtools.git</connection>
		<developerConnection>scm:git:ssh://github.com/VITObelgium/java-configtools.git</developerConnection>
		<url>https://github.com/VITObelgium/java-configtools/tree/master</url>
	</scm>

	<modules>
		<module>configtools-common</module>
		<module>configtools-spring</module>
	</modules>
	
	<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>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<version.spring>5.1.6.RELEASE</version.spring>
		<version.slf4j>1.7.25</version.slf4j>
		<version.logback>1.2.2</version.logback>
	</properties>

	<build>
		<!-- This tells maven to scan the given directory for property files and 
			replaces maven properties in those files This is used here to get the project 
			version into src/main/resources/configuration.properties automatically -->
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.10.1</version>
				<configuration>
			        <release>11</release>
			    </configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.2.0</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-javadoc-plugin</artifactId>
				<version>3.4.0</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.13</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>3.0.1</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<!-- Prevent gpg from using pinentry programs -->
					<gpgArguments>
						<arg>--pinentry-mode</arg>
						<arg>loopback</arg>
					</gpgArguments>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>be.vito.rma.configtools</groupId>
				<artifactId>configtools-common</artifactId>
				<version>${project.version}</version>
			</dependency>
		
			<dependency>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok</artifactId>
				<version>1.18.6</version>
			</dependency>
		
			<!-- logging -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${version.slf4j}</version>
			</dependency>
			<!-- Spring uses JCL, so we redirect that over slf4j -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>jcl-over-slf4j</artifactId>
				<version>${version.slf4j}</version>
			</dependency>
			<!-- bind slf4j logging to logback -->
			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>${version.logback}</version>
			</dependency>
			
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-core</artifactId>
				<version>${version.spring}</version>
				<exclusions>
					<!-- we use SLF4J & logback-classic, including spring-jcl 
						will introduce overlapping classes when the shade plugin builds the .jar -->
					<exclusion>
						<groupId>org.springframework</groupId>
						<artifactId>spring-jcl</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-context</artifactId>
				<version>${version.spring}</version>
			</dependency>
			
			<!-- unit testing -->
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.12</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-test</artifactId>
				<version>${version.spring}</version>
				<scope>test</scope>
			</dependency>
			
			<!-- These dependencies are no longer part of the JRE since Java 9 -->
			<dependency>
			    <groupId>javax.annotation</groupId>
			    <artifactId>javax.annotation-api</artifactId>
			    <version>1.3.1</version>
			</dependency>
			
		</dependencies>
	</dependencyManagement>

</project>