<?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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.antiaction</groupId>
	<artifactId>common-json</artifactId>
	<version>0.7.1</version>

	<packaging>jar</packaging>

	<name>Common JSON Library</name>
	<description>A library for encoding/decoding JSON strings.</description>
	<url>http://www.antiaction.com/</url>

	<inceptionYear>2012</inceptionYear>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
			<comments>A business-friendly OSS license</comments>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:https://github.com/nclarkekb/antiaction-common-json.git</connection>
		<developerConnection>scm:git:https://github.com/nclarkekb/antiaction-common-json.git</developerConnection>
		<url>https://github.com/nclarkekb/antiaction-common-json</url>
	</scm>

	<developers>
		<developer>
			<name>Nicholas Clarke</name>
			<roles>
				<role>developer</role>
			</roles>
			<email>nclarke@antiaction.com</email>
			<organization>Antiaction</organization>
			<organizationUrl>http://www.antiaction.com</organizationUrl>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<!--profile.antiaction>true</profile.antiaction-->
		<junit.version>4.13.2</junit.version>
		<hamcrest-all.version>1.3</hamcrest-all.version>
		<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
		<license-maven-plugin.version>2.0.0</license-maven-plugin.version>
		<license.skip>false</license.skip>
		<jacoco.skip>true</jacoco.skip>
		<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
		<maven-javadoc-plugin.version>3.3.0</maven-javadoc-plugin.version>
		<!--maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version-->
		<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
	</properties>
<!--
	<repositories>
		<repository>
			<id>antiaction-snapshots</id>
			<name>Antiaction Snapshots Repository</name>
			<url>${antiactionSnapshotsUrl}</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>antiaction-releases</id>
			<name>Antiaction Releases Repository</name>
			<url>${antiactionReleasesUrl}</url>
			<releases>
				<enabled>true</enabled>
			</releases>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>
-->
<!--
	<distributionManagement>
		<snapshotRepository>
			<id>antiaction-snapshots</id>
			<name>Antiaction Snapshots Repository</name>
			<url>${antiactionSnapshotsUrl}</url>
		</snapshotRepository>
		<repository>
			<id>antiaction-staging</id>
			<name>Antiaction Release Repository</name>
			<url>${antiactionStagingUrl}</url>
		</repository>
	</distributionManagement>
-->
	<distributionManagement>
		<snapshotRepository>
			<id>central-portal-snapshots</id>
			<name>Central Portal Snapshots</name>
			<url>https://central.sonatype.com/repository/maven-snapshots/</url>
		</snapshotRepository>
	</distributionManagement>

	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<version>${hamcrest-all.version}</version> 
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<!-- Profiles used to make this work with jdk8 vs jdk9+.
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<release>8</release>
				</configuration>
				-->
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>${license-maven-plugin.version}</version>
				<configuration>
					<generateBundle>true</generateBundle>
					<licenseName>apache_v2</licenseName>
					<failIfWarning>true</failIfWarning>
					<useMissingFile>true</useMissingFile>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.7.5.201505241946</version>
				<executions>
					<execution>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>report</id>
						<phase>test</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>  

			<plugin>
				<groupId>org.sonatype.central</groupId>
				<artifactId>central-publishing-maven-plugin</artifactId>
				<version>0.9.0</version>
				<extensions>true</extensions>
				<configuration>
					<publishingServerId>central</publishingServerId>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>javac8-release</id>
			<activation>
				<jdk>8</jdk>
			</activation>
			<properties>
				<maven.compiler.source>1.8</maven.compiler.source>
				<maven.compiler.target>1.8</maven.compiler.target>
			</properties>
		</profile>
		<profile>
			<id>javac9-release</id>
			<activation>
				<jdk>[9,)</jdk>
			</activation>
			<properties>
				<maven.compiler.release>8</maven.compiler.release>
			</properties>
		</profile>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<!-- Generate source jar. (http://maven.apache.org/plugins/maven-source-plugin/usage.html) -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>${maven-source-plugin.version}</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<phase>verify</phase>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<!-- Generate javadoc jar. Note: Java 8 (doclint) check has been disabled. -->
					<plugin> 
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId> 
						<version>${maven-javadoc-plugin.version}</version>
						<configuration>
							<source>8</source>
							<detectJavaApiLink>false</detectJavaApiLink>
							<aggregate>true</aggregate>
							<linksource>true</linksource>
							<quiet>true</quiet>
							<!-- Note: This fails with a JVM older than Java 8 -->
							<additionalparam>-Xdoclint:none</additionalparam>
						</configuration>
						<executions> 
							<execution> 
								<id>attach-javadocs</id>
								<phase>verify</phase>
								<goals>
									<goal>jar</goal>
								</goals> 
							</execution> 
						</executions> 
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</version>
						<configuration>
							<bestPractices>${gpgkey.bestPractices}</bestPractices>
							<skip>${gpgkey.skip}</skip>
							<keyname>${gpgkey.keyname}</keyname>
							<passphrase>${gpgkey.passphrase}</passphrase>
						</configuration>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
