<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright 2019 Immutables Authors and Contributors

   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.
 -->
<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>io.immutables</groupId>
	<artifactId>that</artifactId>
	<version>0.0.0</version>
	<packaging>jar</packaging>

	<name>${project.groupId}.${project.artifactId}</name>
	<description>Matchers for testing</description>
	<url>http://immutables.io</url>

	<organization>
		<name>Immutables</name>
		<url>http://immutables.io</url>
	</organization>

	<developers>
		<developer>
			<id>elucash</id>
			<name>Ievgen Lukash</name>
			<email>e.lucash@gmail.com</email>
			<timezone>-8</timezone>
		</developer>
	</developers>

	<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>
			<comments>For all published artifacts and runtime dependencies unless otherwise noted</comments>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:https://github.com/immutables/io.git</connection>
		<developerConnection>scm:git:git@github.com:immutables/io.git</developerConnection>
		<url>https://github.com/immutables/io.git</url>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<module.name>${project.groupId}.${project.artifactId}</module.name>
		<maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<!-- Shared versions -->
	</properties>

	<repositories>
		<repository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Nexus Release Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

  <dependencies>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>3.0.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

	<build>
		<sourceDirectory>src</sourceDirectory>
		<testSourceDirectory>test</testSourceDirectory>
		<resources>
			<resource>
				<directory>src</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</resource>
		</resources>
		<testResources>
			<testResource>
				<directory>test</directory>
				<excludes>
					<exclude>**/*.java</exclude>
				</excludes>
			</testResource>
		</testResources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.0.2</version>

				<executions>
					<execution>
						<id>default-jar</id>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<archive>
								<addMavenDescriptor>false</addMavenDescriptor>
								<manifestEntries>
									<Automatic-Module-Name>${module.name}</Automatic-Module-Name>
								</manifestEntries>
							</archive>
						</configuration>
					</execution>
					<execution>
						<id>test-jar</id>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.6.1</version>
				<configuration>
					<useIncrementalCompilation>false</useIncrementalCompilation>
					<compilerArgs>
						<arg>-Xlint:unchecked</arg>
					</compilerArgs>
					<compilerArguments>
						<Xmaxerrs>1000000</Xmaxerrs>
					</compilerArguments>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>2.1</version>
					<configuration>
						<mavenExecutorId>forked-path</mavenExecutorId>
						<useReleaseProfile>false</useReleaseProfile>
						<arguments>-Psonatype-oss-release</arguments>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>oss-release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.10.4</version>
						<configuration>
							<quiet>true</quiet>
							<nonavbar>true</nonavbar>
							<notree>true</notree>
							<nocomment>true</nocomment>
							<nohelp>true</nohelp>
							<minmemory>1G</minmemory>
							<maxmemory>2G</maxmemory>
							<additionalparam>-Xdoclint:none</additionalparam>
						</configuration>
						<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>3.0.1</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>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>lint-javadoc</id>
			<build>
				<plugins>
					<plugin>
						<!-- Used to validate/lint javadocs -->
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.10.4</version>
						<configuration>
							<quiet>true</quiet>
							<nonavbar>true</nonavbar>
							<notree>true</notree>
							<nocomment>true</nocomment>
							<nohelp>true</nohelp>
							<minmemory>1G</minmemory>
							<maxmemory>2G</maxmemory>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
