<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2011 The Open Source Research Group,
                   University of Erlangen-Nürnberg

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see http://www.gnu.org/licenses/.

-->
<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>de.fau.cs.osr.hddiff</groupId>
		<artifactId>hddiff-parent</artifactId>
		<version>2.0.4</version>
	</parent>

	<artifactId>hddiff-perfsuite</artifactId>
	<packaging>jar</packaging>
	<name>HDDiff - Performance Suite</name>
	<inceptionYear>2014</inceptionYear>
	<description>HighDefinition Diff Performance Suite</description>

	<!-- =================================================================== -->
	<!-- Properties - Properties - Properties - Properties - Properties - Pr -->
	<!-- =================================================================== -->

	<properties>
		<hddiff-parent.path>../</hddiff-parent.path>
	</properties>

	<!-- =================================================================== -->
	<!-- Dependencies - Dependencies - Dependencies - Dependencies - Depende -->
	<!-- =================================================================== -->

	<dependencies>

		<dependency>
			<groupId>com.sksamuel.diff</groupId>
			<artifactId>diff</artifactId>
			<version>1.1.11</version>
		</dependency>

		<dependency>
			<groupId>fc.xml.diff</groupId>
			<artifactId>xmldiff</artifactId>
			<version>0.14</version>
		</dependency>

		<!-- Apache Commons -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
		</dependency>
		<dependency>
			<!-- Also add signature "commons-io-unsafe-<ver>" to forbiddenapis plugin -->
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>

		<!-- XML APIs -->
		<dependency>
			<groupId>xml-apis</groupId>
			<artifactId>xml-apis</artifactId>
		</dependency>

		<!-- Gson -->
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
		</dependency>

		<!-- Utils -->
		<dependency>
			<groupId>de.fau.cs.osr.utils</groupId>
			<artifactId>utils</artifactId>
		</dependency>

		<!-- Sweble Wikitext Components - Engine -->
		<dependency>
			<groupId>org.sweble.wikitext</groupId>
			<artifactId>swc-engine</artifactId>
		</dependency>

		<!-- Sweble - WOM 3.0 -->
		<dependency>
			<groupId>org.sweble.wom3</groupId>
			<artifactId>sweble-wom3-core</artifactId>
		</dependency>

		<!-- Sweble - WOM 3.0 SWC Adapter-->
		<dependency>
			<groupId>org.sweble.wom3</groupId>
			<artifactId>sweble-wom3-swc-adapter</artifactId>
		</dependency>

		<!-- Sweble Engine - Serialization -->
		<dependency>
			<groupId>org.sweble.engine</groupId>
			<artifactId>sweble-engine-serialization</artifactId>
		</dependency>

		<!-- HDDiff -->
		<dependency>
			<groupId>de.fau.cs.osr.hddiff</groupId>
			<artifactId>hddiff</artifactId>
		</dependency>

		<!-- HDDiff WOM Adapter -->
		<dependency>
			<groupId>de.fau.cs.osr.hddiff</groupId>
			<artifactId>hddiff-wom-adapter</artifactId>
		</dependency>

		<!-- =============================================================== -->
		<!-- Testing - Testing - Testing - Testing - Testing - Testing - Tes -->
		<!-- =============================================================== -->

		<!-- JUnit -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>

		<!-- Utils - Testing -->
		<dependency>
			<groupId>de.fau.cs.osr.utils</groupId>
			<artifactId>utils-testing</artifactId>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>

		<!-- =============================================================== -->
		<!-- Plugins - Plugins - Plugins - Plugins - Plugins - Plugins - Plu -->
		<!-- =============================================================== -->

		<plugins>

			<!-- Create a JAR package -->
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifest>
							<mainClass>de.fau.cs.osr.hddiff.perfsuite.PerformanceSuite</mainClass>
							<classpathPrefix>lib/</classpathPrefix>
							<addClasspath>true</addClasspath>
						</manifest>
					</archive>
				</configuration>
			</plugin>

			<!-- Forbidden APIs -->
			<plugin>
				<groupId>de.thetaphi</groupId>
				<artifactId>forbiddenapis</artifactId>
				<configuration>
					<bundledSignatures combine.children="append">
						<bundledSignature>commons-io-unsafe-1.4</bundledSignature>
					</bundledSignatures>
				</configuration>
			</plugin>

			<!-- Maven Enforcer Plugin -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>enforce-ban-duplicate-classes</id>
						<configuration>
							<rules>
								<banDuplicateClasses>
									<ignoreClasses>
										<!--
											It appears xmldiff has junit baked
											into its .jar :(

											junit:junit:jar:4.12:test
											fc.xml.diff:xmldiff:jar:0.14:compile
										-->
										<ignoreClass>junit.**</ignoreClass>
									</ignoreClasses>
								</banDuplicateClasses>
							</rules>
							<fail>true</fail>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<!-- Check and format license headers -->
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<configuration>
					<excludes combine.children="append">
						<exclude>src/test/resources/nopkg-wikidiff/*.wikitext</exclude>
					</excludes>
				</configuration>
			</plugin>

		</plugins>

	</build>

	<!-- =================================================================== -->
	<!-- Profiles - Profiles - Profiles - Profiles - Profiles - Profiles - P -->
	<!-- =================================================================== -->

	<profiles>

		<profile>
			<id>build-aggregates</id>
			<build>
				<plugins>

					<!-- Generate Jar with dependencies -->
					<plugin>
						<artifactId>maven-assembly-plugin</artifactId>
						<inherited>false</inherited>
						<configuration>
							<descriptorRefs>
								<descriptorRef>jar-with-dependencies</descriptorRef>
							</descriptorRefs>
							<archive>
								<manifest>
									<mainClass>de.fau.cs.osr.hddiff.perfsuite.PerformanceSuite</mainClass>
								</manifest>
							</archive>
						</configuration>
						<executions>
							<execution>
								<id>make-assembly</id>
								<phase>package</phase>
								<goals>
									<goal>single</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>
		</profile>

	</profiles>
</project>
