<?xml version="1.0"?>
<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>io.earcam</groupId>
		<artifactId>io.earcam.utilitarian</artifactId>
		<version>0.0.1</version>
	</parent>

	<groupId>io.earcam.utilitarian</groupId>
	<artifactId>io.earcam.utilitarian.site.sitemap</artifactId>
	<packaging>jar</packaging>

	<description>Create robots.txt, sitemaps and sitemap-indices, submit to search engines</description>
	<url>${site.url}${earcam.project.name.short}</url>

	<distributionManagement>
		<site>
			<id>netlify</id>
			<url>${site.url}${earcam.project.name.short}/</url>
		</site>
	</distributionManagement>

	<properties>
		<skip.execution.pitest>false</skip.execution.pitest>
		<earcam.project.name.short>site/sitemap</earcam.project.name.short>
	</properties>

	<dependencies>
		<dependency>
			<groupId>io.earcam.utilitarian</groupId>
			<artifactId>io.earcam.utilitarian.io</artifactId>
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>io.earcam.utilitarian</groupId>
			<artifactId>io.earcam.utilitarian.net</artifactId>
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>com.google.code.findbugs</groupId>
			<artifactId>jsr305</artifactId>
		</dependency>

		<dependency>
			<groupId>io.earcam</groupId>
			<artifactId>io.earcam.unexceptional</artifactId>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
		</dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>java-hamcrest</artifactId>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>de.thetaphi</groupId>
				<artifactId>forbiddenapis</artifactId>
				<version>2.3</version>
				<executions>
					<execution>
						<id>test-check</id>
						<goals>
							<goal>testCheck</goal>
						</goals>
						<configuration>
							<bundledSignatures>
								<bundledSignature>jdk-unsafe</bundledSignature>
								<bundledSignature>jdk-deprecated</bundledSignature>
								<!-- <bundledSignature>jdk-non-portable</bundledSignature> -->
								<bundledSignature>jdk-system-out</bundledSignature>
								<bundledSignature>jdk-reflection</bundledSignature>
							</bundledSignatures>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>jaxb2-maven-plugin</artifactId>
				<version>2.3.1</version>
				<executions>
					<execution>
						<id>schemagen-sitemap</id>
						<goals>
							<goal>testXjc</goal>
						</goals>
						<phase>generate-test-sources</phase>
						<configuration>
							<testSources>
								<testSource>src/main/resources/META-INF/schema/sitemap.xsd</testSource>
							</testSources>
							<addGeneratedAnnotation>true</addGeneratedAnnotation>
							<clearOutputDir>false</clearOutputDir>
							<packageName>org.sitemaps</packageName>
							<generateEpisode>false</generateEpisode>
						</configuration>
					</execution>

					<execution>
						<id>schemagen-sitemapindex</id>
						<goals>
							<goal>testXjc</goal>
						</goals>
						<phase>generate-test-sources</phase>
						<configuration>
							<testSources>
								<testSource>src/main/resources/META-INF/schema/siteindex.xsd</testSource>
							</testSources>
							<addGeneratedAnnotation>true</addGeneratedAnnotation>
							<clearOutputDir>false</clearOutputDir>
							<packageName>org.sitemaps.index</packageName>
							<generateEpisode>false</generateEpisode>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin><!-- 
					jaxb2-maven-plugin adds source/test-source for normal "clean install" 
					but seemingly not when running report/site? 
				-->
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>3.0.0</version>
				<executions>
					<execution>
						<id>add-jaxb-test-source</id>
						<phase>process-test-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>${project.build.directory}/generated-test-sources/jaxb</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<!-- is this related/cause of jaxb2-maven-plugin issues when running report/site ? -->
					<useIncrementalCompilation>false</useIncrementalCompilation>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
			</plugin>

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

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>
		</plugins>
	</build>
</project>
