<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~  Copyright 2019 the original author or authors.
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~     it under the terms of the GNU General Public License as published by
  ~     the Free Software Foundation, either version 3 of the License, or
  ~     (at your option) any later version.
  ~
  ~     This program is distributed in the hope that it will be useful,
  ~     but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~     GNU General Public License for more details.
  ~
  ~     You should have received a copy of the GNU General Public License
  ~     along with this program.  If not, see <https://www.gnu.org/licenses />.
  -->
<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.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.3.0.RELEASE</version>
		<relativePath /> <!-- lookup parent from repository -->
	</parent>

	<groupId>io.github.rafhael-s-p</groupId>
	<artifactId>mssc-brewery-bom</artifactId>
	<version>1.0.0</version>
	<packaging>pom</packaging>

	<description>Parent Project for SFG Beer Works Projects</description>

	<licenses>
		<license>
			<name>GNU General Public License v3.0</name>
			<url>https://www.gnu.org/licenses/gpl.txt</url>
		</license>
	</licenses>

	<organization>
		<name>Studies</name>
	</organization>

	<developers>
		<developer>
			<name>Rafhael</name>
			<organization>Studies</organization>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<java.version>11</java.version>
		<jaxb.version>2.3.0</jaxb.version>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
		<org.mapstruct.version>1.3.1.Final</org.mapstruct.version>
		<org.projectlombok.version>1.18.12</org.projectlombok.version>
		<swagger-request-validator.version>2.10.0</swagger-request-validator.version>
		<!--Surefire plugin argLine value to suppress UnresolvedMavenProperty -->
		<argLine>--illegal-access=permit</argLine>
		<kotlin.version>1.3.70</kotlin.version>
		<awaitility.version>4.0.2</awaitility.version>
		<spock.version>1.3-groovy-2.5</spock.version>
		<spring-boot-admin.version>2.2.3</spring-boot-admin.version>
		<spring-cloud.version>Hoxton.SR4</spring-cloud.version>
		<!--set this to your docker acct name-->
		<docker.image.prefix>rafhaeldev</docker.image.prefix>
		<!--Set to name of project-->
		<docker.image.name>${project.artifactId}</docker.image.name>
		<logstash.logback.version>6.3</logstash.logback.version>
		<maven-release-plugin.version>2.5.2</maven-release-plugin.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<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>de.codecentric</groupId>
				<artifactId>spring-boot-admin-dependencies</artifactId>
				<version>${spring-boot-admin.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>javax.xml.bind</groupId>
				<artifactId>jaxb-api</artifactId>
				<version>${jaxb.version}</version>
			</dependency>
			<dependency>
				<groupId>com.sun.xml.bind</groupId>
				<artifactId>jaxb-core</artifactId>
				<version>${jaxb.version}</version>
			</dependency>
			<dependency>
				<groupId>com.sun.xml.bind</groupId>
				<artifactId>jaxb-impl</artifactId>
				<version>${jaxb.version}</version>
			</dependency>
			<dependency>
				<groupId>org.mapstruct</groupId>
				<artifactId>mapstruct</artifactId>
				<version>${org.mapstruct.version}</version>
			</dependency>
			<dependency>
				<groupId>org.awaitility</groupId>
				<artifactId>awaitility</artifactId>
				<version>${awaitility.version}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-artemis</artifactId>
		</dependency>
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-config</artifactId>
		</dependency>
		<dependency>
			<groupId>net.logstash.logback</groupId>
			<artifactId>logstash-logback-encoder</artifactId>
			<version>${logstash.logback.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-sleuth-zipkin</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-validation</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-core</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.mapstruct</groupId>
			<artifactId>mapstruct</artifactId>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-junit-jupiter</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.awaitility</groupId>
			<artifactId>awaitility</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.spockframework</groupId>
			<artifactId>spock-spring</artifactId>
			<version>${spock.version}</version>
		</dependency>
		<dependency>
			<groupId>org.spockframework</groupId>
			<artifactId>spock-core</artifactId>
			<version>${spock.version}</version>
		</dependency>
		<dependency>
			<groupId>com.github.JensPiegsa</groupId>
			<artifactId>wiremock-extension</artifactId>
			<version>0.4.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.statemachine</groupId>
			<artifactId>spring-statemachine-core</artifactId>
			<version>2.1.2.RELEASE</version>
		</dependency>
		<dependency>
			<groupId>com.atlassian.oai</groupId>
			<artifactId>swagger-request-validator-core</artifactId>
			<version>${swagger-request-validator.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.atlassian.oai</groupId>
			<artifactId>swagger-request-validator-mockmvc</artifactId>
			<version>${swagger-request-validator.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.atlassian.oai</groupId>
			<artifactId>swagger-request-validator-springmvc</artifactId>
			<version>${swagger-request-validator.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>

	<repositories>
		<!--        Needed for Spring Milestone Releases-->
		<repository>
			<id>spring-milestones</id>
			<name>Spring Milestones</name>
			<url>https://repo.spring.io/milestone</url>
		</repository>
		<repository>
			<id>jitpack.io</id>
			<url>https://jitpack.io</url>
		</repository>
	</repositories>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<layers>
						<enabled>true</enabled>
						<includeLayerTools>true</includeLayerTools>
					</layers>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-clean-plugin</artifactId>
				<executions>
					<execution>
						<id>auto-clean</id>
						<phase>initialize</phase>
						<goals>
							<goal>clean</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<annotationProcessorPaths>
						<path>
							<groupId>org.mapstruct</groupId>
							<artifactId>mapstruct-processor</artifactId>
							<version>${org.mapstruct.version}</version>
						</path>
						<path>
							<groupId>org.projectlombok</groupId>
							<artifactId>lombok</artifactId>
							<version>${org.projectlombok.version}</version>
						</path>
					</annotationProcessorPaths>
					<compilerArgs>
						<compilerArg>
							-Amapstruct.defaultComponentModel=spring
						</compilerArg>
					</compilerArgs>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonarsource.scanner.maven</groupId>
				<artifactId>sonar-maven-plugin</artifactId>
				<version>3.6.0.1398</version>
			</plugin>

			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.3</version>
				<executions>
					<!--
                         Prepares the property pointing to the JaCoCo runtime agent which
                         is passed as VM argument when the Maven Surefire plugin is executed.
                     -->
					<execution>
						<id>default-prepare-agent</id>
						<phase>initialize</phase>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
						<configuration>
							<!-- Sets the path to the file which contains the execution data.
                                 ============
                                 Defaults to ${project.build.directory}/jacoco.exec              -->
							<!--<destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>-->
							<!--
                                Sets the name of the property containing the settings
                                for JaCoCo runtime agent.
                                =============
                                Defaults to "argLine"
                            -->
							<!--<propertyName>surefireArgLine</propertyName>-->
						</configuration>
					</execution>
					<!--
                        Ensures that the code coverage report for unit tests is created after
                        unit tests have been run.
                    -->
					<execution>
						<id>post-unit-test</id>
						<phase>verify</phase>
						<goals>
							<goal>report</goal>
						</goals>
						<configuration>
							<!-- Sets the path to the file which contains the execution data.
                                 ================
                                 Defaults to ${project.build.directory}/jacoco.exec           -->
							<!--<dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>-->
							<!-- Sets the output directory for the code coverage report.
                                 ================
                                 Defaults to ${project.reporting.outputDirectory}/jacoco      -->
							<!--<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>-->
						</configuration>
					</execution>
					<execution>
						<id>pre-integration-test</id>
						<phase>initialize</phase>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
						<configuration>
							<!-- Sets the path to the file which contains the execution data. -->
							<!--<destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>-->
							<!--
                                Sets the name of the property containing the settings
                                for JaCoCo runtime agent.
                            -->
							<!--<propertyName>failsafeArgLine</propertyName>-->
						</configuration>
					</execution>
					<!--
                        Ensures that the code coverage report for integration tests after
                        integration tests have been run.
                    -->
					<execution>
						<id>post-integration-test</id>
						<phase>verify</phase>
						<goals>
							<goal>report</goal>
						</goals>
						<configuration>
							<!-- Sets the path to the file which contains the execution data.
                                 ===========
                                 Defaults to ${project.build.directory/jacoco.exec}             -->
							<!--<dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>-->
							<!-- Sets the output directory for the code coverage report.
                                 ===========
                                 Defaults to ${project.reporting.outputDirectory/jacoco}-->
							<!--<outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>-->
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-versions</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<requireMavenVersion>
									<version>[3.6.0,)</version>
								</requireMavenVersion>
								<requireJavaVersion>
									<version>11</version>
								</requireJavaVersion>
								<requireReleaseDeps>
									<onlyWhenRelease>true</onlyWhenRelease>
									<message>Release builds must not have on snapshot dependencies</message>
								</requireReleaseDeps>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>io.fabric8</groupId>
				<artifactId>docker-maven-plugin</artifactId>
				<version>0.33.0</version>
				<configuration>
					<!--<dockerHost>http://127.0.0.1:2375</dockerHost>-->
					<!--                    <dockerHost>unix:///var/run/docker.sock</dockerHost>-->
					<verbose>true</verbose>
					<images>
						<image>
							<name>${docker.image.prefix}/${docker.image.name}</name>
							<alias>${project.artifactId}</alias>
							<build>
								<!--copies artifact to docker build dir in target-->
								<assembly>
									<descriptorRef>artifact</descriptorRef>
								</assembly>
								<dockerFile>Dockerfile</dockerFile>
								<tags>
									<tag>latest</tag>
									<tag>${project.version}</tag>
								</tags>
							</build>
						</image>
					</images>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.sonarsource.scanner.maven</groupId>
					<artifactId>sonar-maven-plugin</artifactId>
					<version>3.6.0.1398</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.7</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.0.1</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>3.0.1</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<homedir>${gpg.homedir}</homedir>
									<passphrase>${gpg.passphrase}</passphrase>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-release-plugin</artifactId>
						<version>${maven-release-plugin.version}</version>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<scm>
		<connection>scm:git:git@github.com:rafhael-s-p/mssc-brewery-bom.git</connection>
		<developerConnection>scm:git:git@github.com:rafhael-s-p/mssc-brewery-bom.git</developerConnection>
		<url>https://github.com/rafhael-s-p/mssc-brewery-bom</url>
		<tag>1.0.0</tag>
	</scm>

	<issueManagement>
		<url>https://github.com/rafhael-s-p/mssc-brewery-bom/issues</url>
		<system>GitHub</system>
	</issueManagement>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
	</distributionManagement>
</project>