<?xml version="1.0" encoding="UTF-8"?>
<!--
	Copyright 2017 Global Crop Diversity Trust

	Licensed under the Apache License, Version 2.0 (the "License");
	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.
-->
<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.genesys-pgr</groupId>
		<artifactId>application-blocks</artifactId>
		<version>2.1</version>
	</parent>
	<artifactId>application-blocks-parent</artifactId>
	<packaging>pom</packaging>
	<name>Application Blocks parent pom</name>
	<description>This is the main project pom.</description>
	<url>https://gitlab.croptrust.org/genesys-pgr/application-blocks</url>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>1.8</java.version>
		<jdk.target>1.8</jdk.target>
		<jdk.source>1.8</jdk.source>
		<skip.deploy.artifact>true</skip.deploy.artifact>
		<show.deprecations>false</show.deprecations>
		<slf4j.version>1.7.21</slf4j.version>
		<log4j.version>1.2.17</log4j.version>
		<junit.version>4.12</junit.version>

		<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>

		<jackson.version>2.10.1</jackson.version>
		<spring.version>5.2.4.RELEASE</spring.version>
		<spring.data.version>2.2.5.RELEASE</spring.data.version>
		<spring.security.oauth2.version>2.3.4.RELEASE</spring.security.oauth2.version>
		<querydsl.version>4.2.1</querydsl.version>
		<spring.security.version>5.2.2.RELEASE</spring.security.version>
		<!--<hibernate.version>5.3.15.Final</hibernate.version>-->
		<hibernate.version>5.4.12.Final</hibernate.version>
		<hsqldb.version>2.5.0</hsqldb.version>
		<tomcat-jdbc.version>8.5.8</tomcat-jdbc.version>
	</properties>

	<repositories>
		<repository>
			<id>central</id>
			<url>https://repo.maven.apache.org/maven2</url>
		</repository>
		<repository>
			<id>snapshots</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
		</repository>
	</repositories>

	<build>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>flatten-maven-plugin</artifactId>
				<version>1.0.1</version>
				<configuration>
					<flattenMode>ossrh</flattenMode>
				</configuration>
				<executions>
					<!-- enable flattening -->
					<execution>
						<id>flatten</id>
						<phase>process-resources</phase>
						<goals>
							<goal>flatten</goal>
						</goals>
					</execution>
					<!-- ensure proper cleanup -->
					<execution>
						<id>flatten.clean</id>
						<phase>clean</phase>
						<goals>
							<goal>clean</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- do not deploy artifacts by default -->
			<!-- <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.8.2</version>
				<configuration>
					<skip>${skip.deploy.artifact}</skip>
				</configuration>
			</plugin> -->
			<!--buildnumber-maven-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>
					<!-- first check to see if you have locally modified files, and will
						fail if there are any. -->
					<doCheck>false</doCheck>
					<doUpdate>false</doUpdate>
				</configuration>
			</plugin>
			<!--maven-compiler-plugin -->
			<plugin>
				<inherited>true</inherited>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>
				<configuration>
					<source>${jdk.source}</source>
					<target>${jdk.target}</target>
					<optimize>true</optimize>
					<showWarnings>true</showWarnings>
					<showDeprecation>false</showDeprecation>
					<failOnWarning>true</failOnWarning>
				</configuration>
			</plugin>
			<!--maven-surefire-plugin -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.19.1</version>
				<configuration>
					<testFailureIgnore>false</testFailureIgnore>
	                <useSystemClassLoader>false</useSystemClassLoader>
					<includes>
						<include>**/*Test.java</include>
						<include>**/*Tests.java</include>
					</includes>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<!-- Logging dependencies -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>${slf4j.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>${slf4j.version}</version>
			<scope>provided</scope>
		</dependency>

		<!-- Apache commons -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-collections4</artifactId>
			<version>4.1</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.3.2</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>${hibernate.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-jpa</artifactId>
			<version>${spring.data.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>${jackson.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.querydsl</groupId>
			<artifactId>querydsl-jpa</artifactId>
			<version>${querydsl.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${spring.version}</version>
			<scope>test</scope>
		</dependency>

		<!-- Test dependencies -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-library</artifactId>
			<version>1.3</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.tomcat</groupId>
			<artifactId>tomcat-jdbc</artifactId>
			<version>${tomcat-jdbc.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<version>${hsqldb.version}</version>
			<scope>test</scope>
		</dependency>

	</dependencies>
</project>
