<?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>com.github.gundy</groupId>
	<artifactId>semver4j</artifactId>
	<version>0.16.4</version>

	<name>SemVer4J</name>
	<description>Java implementation of a node-style SemVer expression parser/evaluator</description>
	<url>http://github.com/gundy/semver4j</url>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://www.opensource.org/licenses/mit-license.php</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<email>gundy@acm.org</email>
			<name>David Gundersen</name>
			<url>https://github.com/gundy</url>
			<id>gundy</id>
		</developer>
	</developers>

	<scm>
		<url>https://github.com/gundy/semver4j</url>
	</scm>


	<issueManagement>
		<url>https://github.com/gundy/semver4j/issues</url>
		<system>GitHub Issues</system>
	</issueManagement>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>1.6</maven.compiler.source>
		<maven.compiler.target>1.6</maven.compiler.target>

		<!-- build plugin versions -->
		<maven-source-plugin.version>3.0.0</maven-source-plugin.version>
		<maven-jar-plugin.version>2.6</maven-jar-plugin.version>
		<maven-compiler-plugin.version>3.5.1</maven-compiler-plugin.version>
		<maven-shade-plugin.version>2.4.3</maven-shade-plugin.version>
		<maven-project-info-reports-plugin.version>2.2</maven-project-info-reports-plugin.version>
		<maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version>
		<maven-surefire-report-plugin.version>2.6</maven-surefire-report-plugin.version>
		<maven-site-plugin.version>3.0</maven-site-plugin.version>
		<maven-pmd-plugin.version>3.6</maven-pmd-plugin.version>
		<maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>

		<nexus-staging-maven-plugin.version>1.6.7</nexus-staging-maven-plugin.version>

		<!-- test dependencies -->
		<junit.version>4.12</junit.version>
		<jacoco.version>0.7.6.201602180812</jacoco.version>

		<!-- runtime dependencies -->
		<antlr.version>4.5.2-1</antlr.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.antlr</groupId>
			<artifactId>antlr4-runtime</artifactId>
			<version>${antlr.version}</version>
		</dependency>
	</dependencies>

	<build>
		<finalName>semver4j</finalName>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<version>${maven-site-plugin.version}</version>
				<configuration>
					<reportPlugins>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-project-info-reports-plugin</artifactId>
							<version>${maven-project-info-reports-plugin.version}</version>
							<configuration>
								<dependencyDetailsEnabled>true</dependencyDetailsEnabled>
								<dependencyLocationsEnabled>true</dependencyLocationsEnabled>
							</configuration>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-javadoc-plugin</artifactId>
							<version>${maven-javadoc-plugin.version}</version>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-surefire-report-plugin</artifactId>
							<version>${maven-surefire-report-plugin.version}</version>
						</plugin>
					</reportPlugins>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<configuration>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>${maven-jar-plugin.version}</version>
				<configuration>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
						</manifest>
					</archive>
				</configuration>
			</plugin>

			<!-- antlr -->
			<plugin>
				<groupId>org.antlr</groupId>
				<artifactId>antlr4-maven-plugin</artifactId>
				<version>${antlr.version}</version>
				<executions>
					<execution>
						<id>antlr</id>
						<goals>
							<goal>antlr4</goal>
						</goals>
						<phase>generate-sources</phase>
						<configuration>
							<visitor>true</visitor>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>${maven-shade-plugin.version}</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<minimizeJar>true</minimizeJar>
							<createDependencyReducedPom>true</createDependencyReducedPom>
							<shadedArtifactAttached>true</shadedArtifactAttached>
							<createSourcesJar>true</createSourcesJar>
							<shadeSourcesContent>true</shadeSourcesContent>
							<shadedClassifierName>nodeps</shadedClassifierName>
							<relocations>
								<relocation>
									<pattern>org.antlr</pattern>
									<shadedPattern>com.github.gundy.hidden.antlr</shadedPattern>
								</relocation>
							</relocations>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacoco.version}</version>
				<configuration>
					<excludes>
						<exclude>**/generated/grammar/*</exclude>
					</excludes>
				</configuration>
				<executions>
					<execution>
						<id>default-prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>default-report</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
					<execution>
						<id>default-check</id>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<rules>
								<!-- implementation is needed only for Maven 2 -->
								<rule implementation="org.jacoco.maven.RuleConfiguration">
									<element>BUNDLE</element>
									<limits>
										<!-- implementation is needed only for Maven 2 -->
										<limit implementation="org.jacoco.report.check.Limit">
											<counter>COMPLEXITY</counter>
											<value>COVEREDRATIO</value>
											<minimum>0.65</minimum>
										</limit>
									</limits>
								</rule>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-pmd-plugin</artifactId>
				<version>${maven-pmd-plugin.version}</version>
				<configuration>
					<excludes>
						<exclude>**/generated/grammar/*</exclude>
					</excludes>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>check</goal>
							<goal>cpd-check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>${nexus-staging-maven-plugin.version}</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>${maven-javadoc-plugin.version}</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<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-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>
				</plugins>
			</build>
		</profile>
	</profiles>

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

</project>
