<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2013-2019 the original author or authors.
  ~
  ~ 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
  ~
  ~      https://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:xsi="http://www.w3.org/2001/XMLSchema-instance"
		 xmlns="http://maven.apache.org/POM/4.0.0"
		 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>
	<parent>
		<groupId>org.springframework.cloud</groupId>
		<artifactId>spring-cloud-build</artifactId>
		<version>3.0.0</version>
		<relativePath/><!-- lookup parent from repository -->
	</parent>

	<groupId>io.awspring.cloud</groupId>
	<artifactId>spring-cloud-aws</artifactId>
	<version>2.3.1</version>
	<packaging>pom</packaging>
	<name>Spring Cloud AWS</name>
	<description>Spring Cloud AWS</description>

	<scm>
		<url>https://github.com/awspring/spring-cloud-aws</url>
		<connection>scm:git:git://github.com/awspring/spring-cloud-aws.git
		</connection>
		<developerConnection>
			scm:git:ssh://git@github.com/awspring/spring-cloud-aws.git
		</developerConnection>
		<tag>HEAD</tag>
	</scm>

	<properties>
		<bintray.package>aws</bintray.package>
		<tomcat.version>8.0.33</tomcat.version>
		<javax-mail.version>1.5.5</javax-mail.version>
		<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
		<javax.activation.version>1.2.0</javax.activation.version>
		<spring-cloud-commons.version>3.0.0</spring-cloud-commons.version>
		<spring-javaformat.version>0.0.25</spring-javaformat.version>
	</properties>

	<modules>
		<module>spring-cloud-aws-dependencies</module>
		<module>spring-cloud-aws-core</module>
		<module>spring-cloud-aws-context</module>
		<module>spring-cloud-aws-jdbc</module>
		<module>spring-cloud-aws-messaging</module>
		<module>spring-cloud-aws-autoconfigure</module>
		<module>spring-cloud-aws-parameter-store-config</module>
		<module>spring-cloud-aws-secrets-manager-config</module>
		<module>spring-cloud-aws-ses</module>
		<module>spring-cloud-starter-aws</module>
		<module>spring-cloud-starter-aws-jdbc</module>
		<module>spring-cloud-starter-aws-messaging</module>
		<module>spring-cloud-starter-aws-parameter-store-config</module>
		<module>spring-cloud-starter-aws-secrets-manager-config</module>
		<module>spring-cloud-starter-aws-ses</module>
		<module>spring-cloud-aws-integration-test</module>
		<module>docs</module>
		<module>spring-cloud-aws-samples</module>
		</modules>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>io.awspring.cloud</groupId>
				<artifactId>spring-cloud-aws-dependencies</artifactId>
				<version>${project.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-commons-dependencies</artifactId>
				<version>${spring-cloud-commons.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.tomcat.extras</groupId>
				<artifactId>tomcat-extras-juli-adapters</artifactId>
				<version>${tomcat.version}</version>
			</dependency>
			<dependency>
				<groupId>javax.mail</groupId>
				<artifactId>javax.mail-api</artifactId>
				<version>${javax-mail.version}</version>
				<exclusions>
					<exclusion>
						<groupId>javax.activation</groupId>
						<artifactId>activation</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>org.junit.vintage</groupId>
					<artifactId>junit-vintage-engine</artifactId>
				</exclusion>
				<exclusion>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-compiler-plugin</artifactId>
					<configuration>
						<compilerArgs>
							<!-- Enable all warnings -->
							<compilerArg>-Xlint:all</compilerArg>
							<!-- Disable options warning because we will have differences between the compiler and source code level-->
							<compilerArg>-Xlint:-options</compilerArg>
							<!-- Disable serialversionuid warnings -->
							<compilerArg>-Xlint:-serial</compilerArg>
							<!--compilerArg>-Werror</compilerArg-->
						</compilerArgs>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<configuration>
						<argLine>-Xms512m -Xmx512m</argLine>
						<excludedGroups>aws-integration-test</excludedGroups>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>io.spring.javaformat</groupId>
				<artifactId>spring-javaformat-maven-plugin</artifactId>
				<executions>
					<execution>
						<phase>validate</phase>
						<inherited>true</inherited>
						<goals>
							<goal>validate</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.2.0</version>
				<configuration>
					<links>
						<link>https://docs.oracle.com/javase/8/docs/api/</link>
						<link>https://docs.oracle.com/javaee/8/api/</link>
						<link>https://fasterxml.github.io/jackson-core/javadoc/2.8/</link>
						<link>https://docs.spring.io/spring/docs/5.3.x/javadoc-api/</link>
					</links>
					<author>true</author>
					<header>${project.name}</header>
					<reportOutputDirectory>${project.build.directory}/site/${project.version}/apidocs</reportOutputDirectory>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
			</plugin>
		</plugins>
	</reporting>

	<profiles>
		<profile>
			<id>spring</id>
			<repositories>
				<repository>
					<id>spring-snapshots</id>
					<name>Spring Snapshots</name>
					<url>https://repo.spring.io/libs-snapshot-local</url>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
					<releases>
						<enabled>false</enabled>
					</releases>
				</repository>
				<repository>
					<id>spring-milestones</id>
					<name>Spring Milestones</name>
					<url>https://repo.spring.io/libs-milestone-local</url>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
				<repository>
					<id>spring-releases</id>
					<name>Spring Releases</name>
					<url>https://repo.spring.io/release</url>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
					<id>spring-snapshots</id>
					<name>Spring Snapshots</name>
					<url>https://repo.spring.io/libs-snapshot-local</url>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
					<releases>
						<enabled>false</enabled>
					</releases>
				</pluginRepository>
				<pluginRepository>
					<id>spring-milestones</id>
					<name>Spring Milestones</name>
					<url>https://repo.spring.io/libs-milestone-local</url>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</pluginRepository>
				<pluginRepository>
					<id>spring-releases</id>
					<name>Spring Releases</name>
					<url>https://repo.spring.io/libs-release-local</url>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
				</pluginRepository>
			</pluginRepositories>
		</profile>
		<profile>
			<id>java11+</id>
			<activation>
				<jdk>[11,)</jdk>
			</activation>
			<dependencies>
				<dependency>
					<groupId>javax.activation</groupId>
					<artifactId>javax.activation-api</artifactId>
				</dependency>
			</dependencies>
		</profile>
		<profile>
			<id>aws-integration-tests</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>3.0.0-M5</version>
						<configuration combine.self="override">
							<groups>aws-integration-test</groups>
							<excludedGroups/>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<distributionManagement>
		<repository>
			<id>bintray-awspring</id>
			<url>https://api.bintray.com/maven/awspring/releases/spring-cloud-aws/;publish=1</url>
		</repository>
	</distributionManagement>

</project>
