<?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>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>2.0.2.RELEASE</version>
	</parent>

	<groupId>com.github.spt-oss</groupId>
	<artifactId>spt-java-parent</artifactId>
	<version>2.0.2.0</version>
	<packaging>pom</packaging>

	<description>Parent POM for Java projects</description>
	<url>https://github.com/spt-oss/spt-java-parent</url>
	<inceptionYear>2017</inceptionYear>

	<organization>
		<name>SPT</name>
		<url>https://github.com/spt-oss</url>
	</organization>

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

	<developers>
		<developer>
			<name>SPT Developer</name>
			<url>https://github.com/spt-developer</url>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/spt-oss/spt-java-parent/tree/master</url>
		<connection>scm:git:git@github.com:spt-oss/spt-java-parent.git</connection>
		<tag>2.0.2.0</tag>
	</scm>

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

	<properties>

		<checkstyle.version>8.10</checkstyle.version>

		<!-- TODO remove -->
		<usertype.version>6.0.1.GA</usertype.version>

		<!-- TODO remove -->
		<lombok.version>1.16.18</lombok.version>

		<maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<maven-pmd-plugin.version>3.9.0</maven-pmd-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<license-maven-plugin.version>3.0</license-maven-plugin.version>
		<minify-maven-plugin.version>1.7.6</minify-maven-plugin.version>

	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.jadira.usertype</groupId>
				<artifactId>usertype.core</artifactId>
				<version>${usertype.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<repositories>
		<repository>
			<id>central</id>
			<url>http://repo.maven.apache.org/maven2</url>
		</repository>
		<repository>
			<id>sonatype</id>
			<url>https://oss.sonatype.org/content/groups/staging</url>
		</repository>
		<repository>
			<id>spring-milestones</id>
			<url>https://repo.spring.io/libs-milestone</url>
		</repository>
	</repositories>

	<pluginRepositories>
		<pluginRepository>
			<id>central</id>
			<url>http://repo.maven.apache.org/maven2</url>
		</pluginRepository>
		<pluginRepository>
			<id>sonatype</id>
			<url>https://oss.sonatype.org/content/groups/staging</url>
		</pluginRepository>
		<pluginRepository>
			<id>spring-milestones</id>
			<url>https://repo.spring.io/libs-milestone</url>
		</pluginRepository>
	</pluginRepositories>

	<build>
		<defaultGoal>validate</defaultGoal>
		<pluginManagement>
			<plugins>

				<!-- Core -->

				<plugin>
					<groupId>org.jetbrains.kotlin</groupId>
					<artifactId>kotlin-maven-plugin</artifactId>
					<configuration>
						<sourceDirs>
							<sourceDir>${project.basedir}/src/main/java</sourceDir>
						</sourceDirs>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<executions>
						<execution>
							<id>default-compile</id>
							<phase>none</phase>
						</execution>
						<execution>
							<id>default-testCompile</id>
							<phase>none</phase>
						</execution>
						<execution>
							<id>java-compile</id>
							<phase>compile</phase>
							<goals>
								<goal>compile</goal>
							</goals>
						</execution>
						<execution>
							<id>java-test-compile</id>
							<phase>test-compile</phase>
							<goals>
								<goal>testCompile</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<parameters>true</parameters>
						<failOnWarning>true</failOnWarning>
						<showWarnings>true</showWarnings>
						<fork>true</fork>
						<compilerArgs>
							<arg>-Xlint:all,-deprecation,-processing</arg>
						</compilerArgs>
					</configuration>
				</plugin>

				<!-- Packaging -->

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<configuration>
						<archive>
							<addMavenDescriptor>false</addMavenDescriptor>
							<manifestEntries>
								<Built-By>Maven</Built-By>
								<Build-Jdk>${java.version}</Build-Jdk>
							</manifestEntries>
						</archive>
						<excludes>
							<exclude>**/.git*</exclude>
							<exclude>**/*.kt</exclude>
						</excludes>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<executions>
						<execution>
							<id>attach-sources</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<archive>
							<addMavenDescriptor>false</addMavenDescriptor>
							<manifestEntries>
								<Built-By>Maven</Built-By>
								<Build-Jdk>${java.version}</Build-Jdk>
							</manifestEntries>
						</archive>
						<excludes>
							<exclude>**/.git*</exclude>
						</excludes>
					</configuration>
				</plugin>

				<!-- Reporting -->

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-checkstyle-plugin</artifactId>
					<version>${maven-checkstyle-plugin.version}</version>
					<executions>
						<execution>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<includeTestSourceDirectory>true</includeTestSourceDirectory>
						<violationSeverity>warning</violationSeverity>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>com.puppycrawl.tools</groupId>
							<artifactId>checkstyle</artifactId>
							<version>${checkstyle.version}</version>
						</dependency>
					</dependencies>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<archive>
							<addMavenDescriptor>false</addMavenDescriptor>
							<manifestEntries>
								<Built-By>Maven</Built-By>
								<Build-Jdk>${java.version}</Build-Jdk>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-pmd-plugin</artifactId>
					<version>${maven-pmd-plugin.version}</version>
				</plugin>

				<!-- Tools -->

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${maven-gpg-plugin.version}</version>
					<executions>
						<execution>
							<goals>
								<goal>sign</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<gpgArguments>
							<arg>--pinentry-mode</arg>
							<arg>loopback</arg>
						</gpgArguments>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>${maven-release-plugin.version}</version>
					<configuration>
						<scmCommentPrefix xml:space="preserve">[maven-release-plugin] [ci skip] </scmCommentPrefix>
						<tagNameFormat>@{project.version}</tagNameFormat>
					</configuration>
				</plugin>

				<!-- Vendor -->

				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>${license-maven-plugin.version}</version>
					<configuration>
						<includes>
							<include>src/main/java/**/*.java</include>
							<include>src/test/java/**/*.java</include>
						</includes>
						<inlineHeader>Copyright ${license.git.copyrightYears} ${author}

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

    http://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.</inlineHeader>
						<mapping>
							<java>SLASHSTAR_STYLE</java>
						</mapping>
						<properties>
							<author>the original author or authors.</author>
						</properties>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>com.mycila</groupId>
							<artifactId>license-maven-plugin-git</artifactId>
							<version>${license-maven-plugin.version}</version>
						</dependency>
					</dependencies>
				</plugin>

				<plugin>
					<groupId>com.samaxes.maven</groupId>
					<artifactId>minify-maven-plugin</artifactId>
					<version>${minify-maven-plugin.version}</version>
					<executions>
						<execution>
							<id>default-minify</id>
							<goals>
								<goal>minify</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<closureLanguage>ECMASCRIPT6</closureLanguage>
						<cssEngine>YUI</cssEngine>
						<cssSourceDir>.</cssSourceDir>
						<cssSourceIncludes>
							<cssSourceInclude>**/*.css</cssSourceInclude>
						</cssSourceIncludes>
						<cssSourceExcludes>
							<cssSourceExclude>**/*.min.css</cssSourceExclude>
						</cssSourceExcludes>
						<jsEngine>CLOSURE</jsEngine>
						<jsSourceDir>.</jsSourceDir>
						<jsSourceIncludes>
							<jsSourceInclude>**/*.js</jsSourceInclude>
						</jsSourceIncludes>
						<jsSourceExcludes>
							<jsSourceExclude>**/*.min.js</jsSourceExclude>
						</jsSourceExcludes>
						<nosuffix>true</nosuffix>
						<skipMerge>true</skipMerge>
						<webappSourceDir>${project.basedir}/src/main/resources/webapp</webappSourceDir>
						<webappTargetDir>${project.build.directory}/classes/webapp</webappTargetDir>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-maven-plugin</artifactId>
					<configuration>
						<executable>true</executable>
					</configuration>
				</plugin>

			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>gpg</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>