<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>org.perfectable</groupId>
	<artifactId>buildable</artifactId>
	<version>7.0.0</version>

	<name>Buildable</name>
	<description>Restrictive configurations for Java static analysis tools</description>
	<url>https://perfectable.org/</url>
	<inceptionYear>2016</inceptionYear>
	<licenses>
		<license>
			<name>MIT License</name>
			<url>https://opensource.org/licenses/MIT</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<developers>
		<developer>
			<id>nivertius</id>
			<name>Paweł Płazieński</name>
			<email>nivertius@gmail.com</email>
			<roles>
				<role>Developer</role>
			</roles>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:https://source.perfectable.org/nivertius/buildable.git</connection>
		<developerConnection>scm:git:git@source.perfectable.org:nivertius/buildable.git</developerConnection>
		<tag>v7.0.0</tag>
		<url>https://source.perfectable.org/nivertius/buildable</url>
	</scm>

	<distributionManagement>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>
	
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	
	<build>
		<resources>
			<resource>
				<filtering>false</filtering>
				<directory>conf</directory>
				<includes>
					<include>**</include>
				</includes>
			</resource>
		</resources>

		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.10</version>
				<executions>
					<execution>
						<id>determine-snapshot-status</id>
						<goals>
							<goal>bsh-property</goal>
						</goals>
						<phase>initialize</phase>
						<configuration>
							<properties>
								<property>evaluated.isSnapshot</property>
							</properties>
							<source>evaluated.isSnapshot = project.getVersion().endsWith("-SNAPSHOT")</source>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.github.ekryd.sortpom</groupId>
				<artifactId>sortpom-maven-plugin</artifactId>
				<version>2.8.0</version>
				<configuration>
					<encoding>${project.build.sourceEncoding}</encoding>
					<verifyFail>Stop</verifyFail>
					<lineSeparator>\n</lineSeparator>
					<createBackupFile>false</createBackupFile>
					<predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
					<nrOfIndentSpace>-1</nrOfIndentSpace>
					<expandEmptyElements>false</expandEmptyElements>
					<keepBlankLines>true</keepBlankLines>
				</configuration>
				<executions>
					<execution>
						<id>require-sorted-pom</id>
						<goals>
							<goal>verify</goal>
						</goals>
						<phase>validate</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<executions>
					<execution>
						<id>default-compile</id>
						<phase>none</phase>
					</execution>
					<execution>
						<id>default-testCompile</id>
						<phase>none</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.0</version>
				<executions>
					<execution>
						<id>default-test</id>
						<phase>none</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.1.0</version>
				<executions>
					<execution>
						<id>default-testResources</id>
						<phase>none</phase>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.6</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<goals>
							<goal>sign</goal>
						</goals>
						<phase>verify</phase>
						<configuration>
							<skip>${evaluated.isSnapshot}</skip>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	
	<profiles>
		<profile>
			<id>git-defaults</id>
			<activation>
				<file>
					<exists>${basedir}/.git</exists>
				</file>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>pl.project13.maven</groupId>
						<artifactId>git-commit-id-plugin</artifactId>
						<version>2.2.4</version>
						<configuration>
							<dotGitDirectory>${basedir}/.git</dotGitDirectory>
							<failOnUnableToExtractRepoInfo>true</failOnUnableToExtractRepoInfo>
							<runOnlyOnce>true</runOnlyOnce>
						</configuration>
						<executions>
							<execution>
								<id>generate-git-properties</id>
								<goals>
									<goal>revision</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jar-plugin</artifactId>
						<version>3.1.0</version>
						<configuration>
							<archive>
								<manifestEntries>
									<SCM-Revision>${git.commit.id.describe-short}</SCM-Revision>
									<SCM-Revision-Id>${git.commit.id}</SCM-Revision-Id>
									<SCM-Revision-Date>${git.commit.time}</SCM-Revision-Date>
								</manifestEntries>
							</archive>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
