<?xml version="1.0" encoding="UTF-8"?>
<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>de.enterprise-starters</groupId>
	<artifactId>enterprise-dependencies</artifactId>
	<version>2.2.0-alpha4</version>
	<name>Enterprise Spring Boot Starter/Application Dependencies</name>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.2.7.RELEASE</version>
		<relativePath /> <!-- lookup parent from repository -->
	</parent>

	<packaging>pom</packaging>
	<description>Enterprise Dependencies Definition</description>

	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>Enterprise Starters</name>
			<email>info@enterprise-starters.de</email>
			<organization>Enterprise Starters</organization>
			<organizationUrl>https://github.com/enterprise-starters</organizationUrl>
		</developer>
	</developers>

	<properties>
		<enterprise-common.version>2.2.0-alpha4</enterprise-common.version>
		<enterprise-build-tools.version>2.2.0-alpha4</enterprise-build-tools.version>

		<spring-cloud.version>Hoxton.RELEASE</spring-cloud.version>
		<hazelcast-aws.version>2.1.0</hazelcast-aws.version>
		<micrometer-registry-cloudwatch.version>1.3.1</micrometer-registry-cloudwatch.version>
		<hazelcast.version>3.11.5</hazelcast.version>
		<hazelcast-kubernetes.version>1.5.2</hazelcast-kubernetes.version>
		<hazelcast-hibernate.version>1.3.2</hazelcast-hibernate.version>
		<spring-security-rsa.version>1.0.9.RELEASE</spring-security-rsa.version>
		<checkstyle.version>8.32</checkstyle.version>
		<wiremock.version>2.26.0</wiremock.version>
		<resilience4j-spring-boot2.version>1.1.0</resilience4j-spring-boot2.version>

		<swagger-annotations.version>1.6.0</swagger-annotations.version>
		<jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
		<swagger-maven-plugin.version>3.1.8</swagger-maven-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<findbugs-maven-plugin.version>3.0.5</findbugs-maven-plugin.version>
		<maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version>
		<maven-pmd-plugin.version>3.13.0</maven-pmd-plugin.version>

		<apt-maven-plugin.version>1.1.3</apt-maven-plugin.version>
		<nosqlunit-mongodb.version>1.0.0</nosqlunit-mongodb.version>

		<swagger.host>${project.artifactId}.enterprise-starters.de</swagger.host>
		<swagger.basePath />
		<swagger.info.title>${project.name} - API</swagger.info.title>
		<swagger.info.version>${project.version}</swagger.info.version>
		<swagger.info.description>${project.description}</swagger.info.description>
		<swagger.info.contact.email>info@enterprise-starters.de</swagger.info.contact.email>
		<swagger.info.contact.name>Enterprise Starters</swagger.info.contact.name>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>de.enterprise-starters</groupId>
				<artifactId>enterprise-common</artifactId>
				<version>${enterprise-common.version}</version>
			</dependency>
			<dependency>
				<groupId>io.swagger</groupId>
				<artifactId>swagger-annotations</artifactId>
				<version>${swagger-annotations.version}</version>
			</dependency>
			<dependency>
				<groupId>com.github.tomakehurst</groupId>
				<artifactId>wiremock</artifactId>
				<version>${wiremock.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-rsa</artifactId>
				<version>${spring-security-rsa.version}</version>
			</dependency>
			<dependency>
				<groupId>com.hazelcast</groupId>
				<artifactId>hazelcast</artifactId>
				<version>${hazelcast.version}</version>
			</dependency>
			<dependency>
				<groupId>com.hazelcast</groupId>
				<artifactId>hazelcast-aws</artifactId>
				<version>${hazelcast-aws.version}</version>
			</dependency>
			<dependency>
				<groupId>com.hazelcast</groupId>
				<artifactId>hazelcast-kubernetes</artifactId>
				<version>${hazelcast-kubernetes.version}</version>
			</dependency>
			<dependency>
				<groupId>com.hazelcast</groupId>
				<artifactId>hazelcast-hibernate53</artifactId>
				<version>${hazelcast-hibernate.version}</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-dependencies</artifactId>
				<version>${spring-cloud.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>io.micrometer</groupId>
				<artifactId>micrometer-registry-cloudwatch</artifactId>
				<version>${micrometer-registry-cloudwatch.version}</version>
			</dependency>
			<dependency>
				<groupId>io.github.resilience4j</groupId>
				<artifactId>resilience4j-spring-boot2</artifactId>
				<version>${resilience4j-spring-boot2.version}</version>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-junit-jupiter</artifactId>
				<version>${mockito.version}</version>
			</dependency>
			<dependency>
				<groupId>com.lordofthejars</groupId>
				<artifactId>nosqlunit-mongodb</artifactId>
				<version>${nosqlunit-mongodb.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>com.github.kongchen</groupId>
					<artifactId>swagger-maven-plugin</artifactId>
					<version>${swagger-maven-plugin.version}</version>
					<configuration>
						<apiSources>
							<apiSource>
								<springmvc>true</springmvc>
								<locations>
									<location>de.enterprise</location>
								</locations>
								<schemes>
									<scheme>http</scheme>
									<scheme>https</scheme>
								</schemes>
								<host>${swagger.host}</host>
								<basePath>${swagger.basePath}</basePath>
								<info>
									<title>${swagger.info.title}</title>
									<version>${swagger.info.version}</version>
									<description>${swagger.info.description}</description>
									<contact>
										<email>${swagger.info.contact.email}</email>
										<name>${swagger.info.contact.name}</name>
									</contact>
								</info>
								<templatePath>classpath:/swagger/strapdown.html.hbs</templatePath>
								<outputPath>${basedir}/target/classes/docs/api.html</outputPath>
								<outputFormats>json</outputFormats>
								<swaggerDirectory>${basedir}/target/classes/docs/</swaggerDirectory>
								<attachSwaggerArtifact>true</attachSwaggerArtifact>
							</apiSource>
						</apiSources>
					</configuration>
					<executions>
						<execution>
							<phase>prepare-package</phase>
							<goals>
								<goal>generate</goal>
							</goals>
						</execution>
					</executions>
					<dependencies>
						<dependency>
							<groupId>de.enterprise-starters</groupId>
							<artifactId>enterprise-build-tools</artifactId>
							<version>${enterprise-build-tools.version}</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<artifactId>maven-release-plugin</artifactId>
					<version>${maven-release-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>findbugs-maven-plugin</artifactId>
					<version>${findbugs-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${jacoco-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-checkstyle-plugin</artifactId>
					<version>${maven-checkstyle-plugin.version}</version>
					<configuration>
						<configLocation>checkstyle/checkstyle.xml</configLocation>
						<!-- Suppresions are referenced in the checkstyle.xml to get Checkstyle 
							working inside Eclipse. To make it working for both, maven and eclipse, the 
							file checkstyle_maven.properties is needed. -->
						<propertiesLocation>checkstyle/checkstyle_maven.properties</propertiesLocation>
						<propertyExpansion>checkstyle.build.directory=${project.build.directory}</propertyExpansion>
						<encoding>UTF-8</encoding>
						<consoleOutput>true</consoleOutput>
						<failOnViolation>true</failOnViolation>
						<includeTestSourceDirectory>true</includeTestSourceDirectory>
						<sourceDirectories>
							<sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
						</sourceDirectories>
					</configuration>
					<executions>
						<execution>
							<phase>validate</phase>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
					<dependencies>
						<dependency>
							<groupId>com.puppycrawl.tools</groupId>
							<artifactId>checkstyle</artifactId>
							<version>${checkstyle.version}</version>
						</dependency>
						<dependency>
							<groupId>de.enterprise-starters</groupId>
							<artifactId>enterprise-build-tools</artifactId>
							<version>${enterprise-build-tools.version}</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-pmd-plugin</artifactId>
					<version>${maven-pmd-plugin.version}</version>
					<executions>
						<execution>
							<phase>validate</phase>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<excludeRoots>
							<excludeRoot>target/generated-sources/java</excludeRoot>
						</excludeRoots>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.mysema.maven</groupId>
					<artifactId>apt-maven-plugin</artifactId>
					<version>${apt-maven-plugin.version}</version>
					<executions>
						<execution>
							<goals>
								<goal>process</goal>
							</goals>
							<configuration>
								<outputDirectory>target/generated-sources/java</outputDirectory>
								<processor>${apt-maven-plugin-processor-class}</processor>
							</configuration>
						</execution>
					</executions>
					<dependencies>
						<dependency>
							<groupId>com.querydsl</groupId>
							<artifactId>querydsl-apt</artifactId>
							<version>${querydsl.version}</version>
						</dependency>
					</dependencies>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>artifact-deploy</id>
			<properties>
				<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
				<maven-javadoc-plugin.version>3.1.1</maven-javadoc-plugin.version>
				<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
				<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
				<sonar-maven-plugin.version>3.6.1.1688</sonar-maven-plugin.version>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>${maven-source-plugin.version}</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>${maven-javadoc-plugin.version}</version>
						<configuration>
							<source>${java.version}</source>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
								<inherited>true</inherited>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>${nexus-staging-maven-plugin.version}</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>sonatype-nexus-staging</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.sonarsource.scanner.maven</groupId>
						<artifactId>sonar-maven-plugin</artifactId>
						<version>${sonar-maven-plugin.version}</version>
						<executions>
							<execution>
								<id>sonar</id>
								<phase>verify</phase>
								<goals>
									<goal>sonar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
