<!-- Palmetto - Palmetto is a quality measure tool for topics. Copyright 
	© 2014 Data Science Group (DICE) (michael.roeder@uni-paderborn.de) 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>
	<groupId>org.aksw</groupId>
	<artifactId>palmetto</artifactId>
	<version>0.1.3</version>
	<name>Palmetto</name>
	<description>Palmetto is a quality measure tool for topics.</description>
	<packaging>jar</packaging>
	<inceptionYear>2014</inceptionYear>

	<!-- PROPERTIES -->
	<properties>
		<java.version>1.7</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<slf4j-version>1.7.32</slf4j-version>
		<lucene-version>4.4.0</lucene-version>
		<project.inceptionYear>2014</project.inceptionYear>
	</properties>

	<!-- DEVELOPERS -->
	<developers>
		<developer>
			<id>m.roeder</id>
			<name>Michael Röder</name>
			<email>roeder@informatik.uni-leipzig.de</email>
		</developer>
	</developers>

	<!-- LICENSE -->
	<licenses>
		<license>
			<name>AGPL 3.0</name>
			<url>http://www.gnu.org/licenses/agpl.txt</url>
		</license>
	</licenses>

	<!-- DEPENDENCIES -->
	<dependencies>
		<!-- HPPC Maps -->
		<dependency>
			<groupId>com.carrotsearch</groupId>
			<artifactId>hppc</artifactId>
			<version>0.5.3</version>
		</dependency>
		<!-- Lucene -->
		<dependency>
			<groupId>org.apache.lucene</groupId>
			<artifactId>lucene-core</artifactId>
			<version>${lucene-version}</version>
		</dependency>
		<!-- Lucene analyzers -->
		<dependency>
			<groupId>org.apache.lucene</groupId>
			<artifactId>lucene-analyzers-common</artifactId>
			<version>${lucene-version}</version>
		</dependency>
		<!-- Apache Commons IO -->
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.11.0</version>
		</dependency>
		<!-- cache implementations -->
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
            <version>31.0.1-jre</version>
		</dependency>

		<!-- ~~~~~~~~~~~~~~~~~~~ Logging ~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- slf4j: Logging API -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j-version}</version>
		</dependency>
		<!-- log4j binding -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>${slf4j-version}</version>
		</dependency>
		<!-- make Logging with java.util.Logging possible -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jul-to-slf4j</artifactId>
            <version>${slf4j-version}</version>
		</dependency>
		<!-- ~~~~~~~~~~~~~~~~~~~ End Logging ~~~~~~~~~~~~~~~~~~~~~~ -->

		<!-- ~~~~~~~~~~~~~~~~~~~ Testing ~~~~~~~~~~~~~~~~~~~~~~ -->
		<!-- JUnit -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
            <version>4.13.2</version>
			<scope>test</scope>
		</dependency>
		<!-- ~~~~~~~~~~~~~~~~~~~ End Testing ~~~~~~~~~~~~~~~~~~~~~~ -->
	</dependencies>

	<build>
		<finalName>Palmetto</finalName>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>2.4.3</version>
				<configuration>
					<finalName>palmetto-exec</finalName>
					<shadedArtifactAttached>true</shadedArtifactAttached>
					<!-- filter all the META-INF files of other artifacts -->
					<filters>
						<filter>
							<artifact>*:*</artifact>
							<excludes>
								<exclude>META-INF/*.SF</exclude>
								<exclude>META-INF/*.DSA</exclude>
								<exclude>META-INF/*.RSA</exclude>
							</excludes>
						</filter>
					</filters>
					<transformers>
						<transformer
							implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
							<manifestEntries>
								<X-Compile-Source-JDK>${maven.compile.source}</X-Compile-Source-JDK>
								<X-Compile-Target-JDK>${maven.compile.target}</X-Compile-Target-JDK>
								<!-- Define main class -->
								<mainClass>org.aksw.palmetto.Palmetto</mainClass>
							</manifestEntries>
						</transformer>
						<transformer
							implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
					</transformers>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- Javadoc plugin for generating documentation -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.1</version>
				<configuration>
					<show>private</show>
					<nohelp>true</nohelp>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- Source plugin for creating source file jar -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.1</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- License management plugin -->
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>3.0</version>
				<configuration>
					<header>com/mycila/maven/plugin/license/templates/AGPL-3.txt</header>
					<properties>
						<owner>Data Science Group (DICE)</owner>
						<email>michael.roeder@uni-paderborn.de</email>
					</properties>
					<excludes>
						<exclude>**/README</exclude>
						<exclude>**/LICENSE</exclude>
						<exclude>**/Dockerfile</exclude>
						<exclude>diagrams/**</exclude>
						<exclude>src/test/resources/**</exclude>
						<exclude>src/main/resources/**</exclude>
						<exclude>src/main/webapp/**</exclude>
					</excludes>
				</configuration>
			</plugin>
			<!-- Surefire plugin for JUnit tests -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.2</version>
				<configuration>
					<!-- connect with JaCoCo -->
					<systemPropertyVariables>
						<jacoco-agent.destfile>target/jacoco.exec</jacoco-agent.destfile>
					</systemPropertyVariables>
				</configuration>
			</plugin>
			<!-- JaCoCo plugin for test coverage reports -->
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.4</version>
				<executions>
					<execution>
						<id>default-prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>default-report</id>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
