<?xml version="1.0" encoding="UTF-8"?>
<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.1.0</version>
		<relativePath/><!-- lookup parent from repository -->
	</parent>

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

	<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>
		<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.1.0</spring-cloud-commons.version>
		<testcontainers.version>1.17.1</testcontainers.version>
		<spotless.version>2.22.0</spotless.version>
	</properties>

	<modules>
		<module>spring-cloud-aws-core</module>
		<module>spring-cloud-aws-autoconfigure</module>
		<module>spring-cloud-aws-dependencies</module>
		<module>spring-cloud-aws-parameter-store</module>
		<module>spring-cloud-aws-secrets-manager</module>
		<module>spring-cloud-aws-ses</module>
		<module>spring-cloud-aws-sns</module>
		<module>spring-cloud-aws-s3-parent</module>
		<module>spring-cloud-aws-starters</module>
		<module>spring-cloud-aws-samples</module>
		<module>docs</module>
        <module>spring-cloud-aws-messaging-support</module>
		<module>spring-cloud-aws-sqs</module>

		<!--
		these modules need to be rewritten
		<module>spring-cloud-aws-jdbc</module>
		<module>spring-cloud-aws-messaging</module>
		<module>spring-cloud-aws-test</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.testcontainers</groupId>
				<artifactId>testcontainers-bom</artifactId>
				<version>${testcontainers.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</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>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.diffplug.spotless</groupId>
					<artifactId>spotless-maven-plugin</artifactId>
					<version>${spotless.version}</version>
					<configuration>
						<java>
							<importOrder />
							<eclipse>
								<file>${maven.multiModuleProjectDirectory}/eclipse-code-formatter.xml</file>
							</eclipse>
							<removeUnusedImports/>
							<licenseHeader>
								<file>${maven.multiModuleProjectDirectory}/license-header.txt</file>
							</licenseHeader>
						</java>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<configuration>
					<skip>true</skip>
					<links>
						<link>https://docs.oracle.com/javase/8/docs/api/</link>
						<link>https://javaee.github.io/javaee-spec/javadocs/</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>
			<plugin>
				<groupId>com.diffplug.spotless</groupId>
				<artifactId>spotless-maven-plugin</artifactId>
				<executions>
					<execution>
						<phase>validate</phase>
						<configuration>
							<skip>${disable.checks}</skip>
						</configuration>
						<goals>
							<goal>apply</goal>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<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>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</version>
						<configuration>
							<!-- Prevent gpg from using pinentry programs -->
							<gpgArguments>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>docs</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<configuration>
							<skip>false</skip>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<distributionManagement>
		<repository>
			<id>ossrh-awspring</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0</url>
			<comments>
				Copyright 2013-$YEAR 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.
			</comments>
		</license>
	</licenses>
</project>
