<?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.javadocmd</groupId>
	<artifactId>simplelatlng</artifactId>
	<packaging>jar</packaging>
	<version>1.4.0</version>

	<name>SimpleLatLng</name>
	<description>Simple Java implementation of common latitude and longitude calculations.</description>
	<url>https://github.com/JavadocMD/simplelatlng</url>
	<inceptionYear>2010</inceptionYear>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<properties>
		<maven.compiler.source>1.8</maven.compiler.source>
  	<maven.compiler.target>1.8</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<!-- <buildNumber>is generated automatically (below)</buildNumber> -->
	</properties>

	<build>
		<plugins>
			<!-- Compiler -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.10.1</version>
				<configuration>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
				</configuration>
			</plugin>

			<!-- Jar -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.2.2</version>
				<configuration>
					<archive>
						<manifestEntries>
							<Built-By>${user.name}</Built-By>
							<Implementation-Title>${project.name}</Implementation-Title>
							<Implementation-Version>${project.version}</Implementation-Version>
							<Built-Date>${buildNumber}</Built-Date>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>

			<!-- Generate build timestamp -->
			<plugin>
				<groupId>org.codehaus.gmaven</groupId>
				<artifactId>groovy-maven-plugin</artifactId>
				<version>2.1.1</version>
				<executions>
					<execution>
						<phase>initialize</phase>
						<goals>
							<goal>execute</goal>
						</goals>
						<configuration>
							<source>
								import java.time.Instant
								import java.time.temporal.ChronoUnit
								project.properties.buildNumber = Instant.now().truncatedTo(ChronoUnit.SECONDS).toString()
								println "Using buildNumber: " + project.properties.buildNumber
							</source>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- JaCoCo: Java Code Coverage -->
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.8</version>
				<executions>
					<execution>
						<id>default-prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>default-report</id>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
					<execution>
						<id>default-check</id>
						<phase>test</phase>
						<goals>
							<goal>check</goal>
						</goals>
						<configuration>
							<rules>
								<rule>
									<element>BUNDLE</element>
									<limits>
										<limit>
											<counter>INSTRUCTION</counter>
											<value>COVEREDRATIO</value>
											<minimum>90%</minimum>
										</limit>
									</limits>
								</rule>
							</rules>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- Source jar -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.2.1</version>
				<configuration>
					<archive>
						<manifestEntries>
							<Built-By>${user.name}</Built-By>
							<Implementation-Title>${project.name}</Implementation-Title>
							<Implementation-Version>${project.version}</Implementation-Version>
							<Built-Date>${buildNumber}</Built-Date>
						</manifestEntries>
					</archive>
				</configuration>
				<executions>
					<execution>
						<phase>verify</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Javadoc jar -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.7</version>
				<configuration>
					<overview>${basedir}/src/main/java/overview.html</overview>
					<archive>
						<manifestEntries>
							<Built-By>${user.name}</Built-By>
							<Implementation-Title>${project.name}</Implementation-Title>
							<Implementation-Version>${project.version}</Implementation-Version>
							<Built-Date>${buildNumber}</Built-Date>
						</manifestEntries>
					</archive>
				</configuration>
				<executions>
					<execution>
						<phase>verify</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- GPG Signature -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>3.0.1</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.2</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<scm>
		<connection>scm:git:https://github.com/JavadocMD/simplelatlng.git</connection>
		<url>https://github.com/JavadocMD/simplelatlng</url>
	</scm>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<name>Central Repository OSSRH</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<name>Central Repository OSSRH</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<developers>
		<developer>
			<id>tylercoles</id>
			<name>Tyler Coles</name>
			<email>tylercoles@gmail.com</email>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
	</developers>
</project>
