<?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>
	<parent>
		<groupId>com.github.cowwoc.requirements</groupId>
		<artifactId>root</artifactId>
		<version>8.0.1</version>
	</parent>
	<artifactId>java</artifactId>
	<packaging>jar</packaging>

	<build>
		<plugins>
			<plugin>
				<groupId>com.github.cowwoc.requirements</groupId>
				<artifactId>maven_plugin</artifactId>
				<executions>
					<execution>
						<id>optimize-exceptions</id>
						<goals>
							<goal>optimize-exceptions</goal>
						</goals>
						<configuration>
							<exceptions>
								<exception>java.lang.NullPointerException</exception>
								<exception>java.lang.IllegalArgumentException</exception>
								<exception>java.io.IOException</exception>
							</exceptions>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<compilerArgs>
						<arg>-Xdiags:verbose</arg>
						<arg>-Werror</arg>
						<arg>-Xlint:all,-requires-automatic,-module</arg>
						<!-- WORKAROUND: https://issues.apache.org/jira/browse/MCOMPILER-368 -->
						<arg>-Xpkginfo:always</arg>
					</compilerArgs>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<!--
							NOTE: <docfilessubdirs> is only needed to generate Javadoc for ANSI String diffs, which is
							disabled by default.

							<docfilessubdirs>true</docfilessubdirs>
							-->
							<show>public</show>
							<doctitle>Requirements Java Module ${project.version} API</doctitle>
							<windowtitle>Requirements Java Module ${project.version} API</windowtitle>
							<additionalOptions>
								<!-- https://stackoverflow.com/a/54468139/14731 -->
								<option>--override-methods</option>
								<option>summary</option>
							</additionalOptions>
							<excludePackageNames>
								com.github.cowwoc.requirements.java.internal:com.github.cowwoc.requirements.java.internal.*
							</excludePackageNames>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>3rd-party-licenses</id>
						<goals>
							<goal>aggregate-add-third-party</goal>
						</goals>
						<phase>none</phase>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>annotations</artifactId>
		</dependency>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>natives</artifactId>
		</dependency>
		<dependency>
			<groupId>io.github.java-diff-utils</groupId>
			<artifactId>java-diff-utils</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>com.github.cowwoc.pouch</groupId>
			<artifactId>core</artifactId>
		</dependency>
	</dependencies>
</project>
