<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>com.github.vanroy</groupId>
	<artifactId>spring-data-jest-build</artifactId>
	<version>3.2.2.RELEASE</version>
	<packaging>pom</packaging>

	<name>Spring Data Jest Build</name>
	<description>Build configuration of Spring Data Implementation for Jest</description>
	<url>https://github.com/vanroy/spring-data-jest</url>

	<developers>
		<developer>
			<id>vanroy</id>
			<name>Julien Roy</name>
			<email>julien.vanroy@gmail.com</email>
			<url>http://github.com/vanroy</url>
			<timezone>+1</timezone>
			<roles>
				<role>Java Developer</role>
			</roles>
		</developer>
	</developers>

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

	<scm>
		<url>https://github.com/vanroy/spring-data-jest/</url>
		<connection>scm:git:ssh://git@github.com/vanroy/spring-data-jest.git</connection>
		<developerConnection>scm:git:ssh://git@github.com/vanroy/spring-data-jest.git</developerConnection>
	</scm>

	<properties>

		<!-- Java Version -->
		<java.version>1.8</java.version>
		<encoding>UTF-8</encoding>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>

		<!-- Dependencies version -->
		<springboot>2.1.2.RELEASE</springboot>
		<spring>5.1.4.RELEASE</spring>
		<springdataes>3.1.3.RELEASE</springdataes>
		<springdatacommons>2.1.4.RELEASE</springdatacommons>
		<jest>6.3.1</jest>
		<gson>2.8.0</gson>
		<awssigning>0.0.21</awssigning>
		<springcloudaws>2.0.0.RELEASE</springcloudaws>
		<jna>4.2.2</jna>
		<hamcrest>1.3</hamcrest>
		<junit>4.12</junit>
		<lombok>1.18.2</lombok>
		<mockito>1.10.19</mockito>
		<logback>1.1.9</logback>
		<aws>1.11.132</aws>
		<log4j>2.7</log4j>

		<elasticsearch>6.4.3</elasticsearch>

		<!-- Version of maven plugins -->
		<version.plugin.maven-compiler-plugin>3.6.1</version.plugin.maven-compiler-plugin>
		<version.plugin.maven-deploy-plugin>2.8.2</version.plugin.maven-deploy-plugin>
		<version.plugin.maven-surefire-plugin>2.20</version.plugin.maven-surefire-plugin>
		<version.plugin.maven-source-plugin>2.1.2</version.plugin.maven-source-plugin>
		<version.plugin.maven-javadoc-plugin>2.7</version.plugin.maven-javadoc-plugin>
		<version.plugin.maven-release-plugin>2.5</version.plugin.maven-release-plugin>
		<version.plugin.nexus-staging-maven-plugin>1.6.7</version.plugin.nexus-staging-maven-plugin>
		<version.plugin.maven-gpg-plugin>1.6</version.plugin.maven-gpg-plugin>
		<version.plugin.maven-spring-boot-plugin>2.0.5.RELEASE</version.plugin.maven-spring-boot-plugin>

		<!-- Source encoding -->
		<source.encoding>UTF-8</source.encoding>

	</properties>

	<dependencyManagement>
		<dependencies>

			<!-- Spring Data Elasticsearch -->
			<dependency>
				<groupId>org.springframework.data</groupId>
				<artifactId>spring-data-elasticsearch</artifactId>
				<version>${springdataes}</version>
				<exclusions>
					<exclusion>
						<groupId>org.elasticsearch</groupId>
						<artifactId>*</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.elasticsearch.client</groupId>
						<artifactId>transport</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.elasticsearch.plugin</groupId>
						<artifactId>transport-netty4-client</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.springframework.data</groupId>
						<artifactId>spring-data-commons</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

			<dependency>
				<groupId>org.springframework.data</groupId>
				<artifactId>spring-data-commons</artifactId>
				<version>${springdatacommons}</version>
			</dependency>

			<dependency>
				<groupId>org.elasticsearch</groupId>
				<artifactId>elasticsearch</artifactId>
				<version>${elasticsearch}</version>
			</dependency>

			<dependency>
				<groupId>org.elasticsearch.client</groupId>
				<artifactId>transport</artifactId>
				<version>${elasticsearch}</version>
			</dependency>

			<dependency>
				<groupId>org.elasticsearch.plugin</groupId>
				<artifactId>transport-netty4-client</artifactId>
				<version>${elasticsearch}</version>
			</dependency>

			<!-- JEST -->
			<dependency>
				<groupId>io.searchbox</groupId>
				<artifactId>jest</artifactId>
				<version>${jest}</version>
				<exclusions>
					<exclusion>
						<groupId>commons-logging</groupId>
						<artifactId>commons-logging</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>com.google.code.gson</groupId>
				<artifactId>gson</artifactId>
				<version>${gson}</version>
			</dependency>

			<!-- Test -->
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-library</artifactId>
				<version>${hamcrest}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-core</artifactId>
				<version>${hamcrest}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>${junit}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${mockito}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>${logback}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-api</artifactId>
				<version>${log4j}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.logging.log4j</groupId>
				<artifactId>log4j-core</artifactId>
				<version>${log4j}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-test</artifactId>
				<version>${spring}</version>
				<scope>test</scope>
				<exclusions>
					<exclusion>
						<groupId>commons-logging</groupId>
						<artifactId>commons-logging</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok</artifactId>
				<version>${lombok}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>

	</dependencyManagement>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${version.plugin.maven-compiler-plugin}</version>
				<configuration>
					<compilerArgs>
						<arg>-Xlint</arg>
					</compilerArgs>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>${version.plugin.maven-deploy-plugin}</version>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${version.plugin.maven-surefire-plugin}</version>
			</plugin>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<version>${version.plugin.maven-spring-boot-plugin}</version>
			</plugin>
		</plugins>
	</build>

	<repositories>
		<repository>
			<id>spring-libs-snapshot</id>
			<url>https://repo.spring.io/libs-snapshot</url>
		</repository>
	</repositories>

	<!-- Deploy snapshots to the Sonatype OSSRH (OSS Repository Hosting) -->
	<distributionManagement>
		<downloadUrl>https://github.com/vanroy/spring-data-jest</downloadUrl>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<modules>
				<module>spring-data-jest</module>
				<module>spring-boot-starter-data-jest</module>
				<module>spring-boot-sample-data-jest</module>
				<module>spring-boot-sample-data-jest-aws</module>
			</modules>
		</profile>
		<profile>
			<!-- Specific profile for release or artifact deployment -->
			<!-- Sources et javadoc are packaged -->
			<id>release</id>
			<modules>
				<module>spring-data-jest</module>
				<module>spring-boot-starter-data-jest</module>
			</modules>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>${version.plugin.maven-source-plugin}</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>${version.plugin.maven-javadoc-plugin}</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-release-plugin</artifactId>
						<version>${version.plugin.maven-release-plugin}</version>
						<configuration>
							<autoVersionSubmodules>true</autoVersionSubmodules>
							<useReleaseProfile>false</useReleaseProfile>
							<releaseProfiles>release</releaseProfiles>
							<goals>deploy</goals>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>${version.plugin.nexus-staging-maven-plugin}</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${version.plugin.maven-gpg-plugin}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<executable>gpg</executable>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
