<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.dice-research</groupId>
    <artifactId>squirrel</artifactId>
    <version>0.4.0</version>
    <packaging>pom</packaging>
    <inceptionYear>2017</inceptionYear>
    <name>Squirrel</name>

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

    <!-- DEVELOPERS -->
    <developers>
        <developer>
            <id>m.roeder</id>
            <name>Michael Röder</name>
            <email>michael.roeder@uni-paderborn.de</email>
        </developer>
        <developer>
            <id>g.souza</id>
            <name>Geraldo Souza</name>
            <email>gsjunior@mail.uni-paderborn.de</email>
        </developer>
    </developers>

    <!-- MODULES -->
    <modules>
        <module>squirrel.api</module>
        <module>squirrel.deduplication</module>
        <module>squirrel.frontier</module>
        <module>squirrel.mockup</module>
        <module>squirrel.reports</module>
        <module>squirrel.web</module>
        <module>squirrel.web-api</module>
        <module>squirrel.worker</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
        <slf4j-version>1.7.10</slf4j-version>
        <jackan-version>0.4.2</jackan-version>
        <httpcore-version>4.4.11</httpcore-version>
        <httpclient-version>4.5.7</httpclient-version>
        <tika-version>1.22</tika-version>

    </properties>

    <repositories>
        <repository>
            <id>maven.aksw.internal</id>
            <name>AKSW Internal Release Repository</name>
            <url>https://maven.aksw.org/repository/internal/</url>
        </repository>
        <repository>
            <id>maven.aksw.snapshots</id>
            <name>University Leipzig, AKSW Maven2 Repository</name>
            <url>https://maven.aksw.org/repository/snapshots</url>
        </repository>
        <repository>
            <id>spring-releases</id>
            <url>https://repo.spring.io/libs-release</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>spring-releases</id>
            <url>https://repo.spring.io/libs-release</url>
        </pluginRepository>
    </pluginRepositories>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.dice-research</groupId>
                <artifactId>squirrel.api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.dice-research</groupId>
                <artifactId>squirrel.deduplication</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.dice-research</groupId>
                <artifactId>squirrel.frontier</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.dice-research</groupId>
                <artifactId>squirrel.mockup</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.dice-research</groupId>
                <artifactId>squirrel.web</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.dice-research</groupId>
                <artifactId>squirrel.web-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.dice-research</groupId>
                <artifactId>squirrel.worker</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.hobbit</groupId>
                <artifactId>core</artifactId>
                <version>1.0.12</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.httpcomponents</groupId>
                        <artifactId>httpclient</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.httpcomponents</groupId>
                        <artifactId>httpclient-cache</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- Jackason databind and Jackson’s YAML extension -->
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-yaml</artifactId>
                <version>2.9.9</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.9.9.3</version>
            </dependency>

            <!-- Content detect utility tool -->
            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-core</artifactId>
                <version>${tika-version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tika</groupId>
                <artifactId>tika-parsers</artifactId>
                <version>${tika-version}</version>
            </dependency>

            <!-- ~~~~~~~~~~~~~~~~~~~ HTML libraries ~~~~~~~~~~~~~~~~~~~~~~ -->
            <!-- https://mvnrepository.com/artifact/org.jsoup/jsoup -->
            <dependency>
                <groupId>org.jsoup</groupId>
                <artifactId>jsoup</artifactId>
                <version>1.11.2</version>
            </dependency>

            <!-- ~~~~~~~~~~~~~~~~~~~ HTML libraries END ~~~~~~~~~~~~~~~~~~~~~~ -->



            <!-- ~~~~~~~~~~~~~~~~~~~ Apache Commons ~~~~~~~~~~~~~~~~~~~~~~ -->
            <dependency>
                <groupId>commons-cli</groupId>
                <artifactId>commons-cli</artifactId>
                <version>1.2</version>
            </dependency>

            <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-csv -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-csv</artifactId>
                <version>1.7</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.4</version>
            </dependency>
            <!--compress commons -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>1.19</version>
            </dependency>
            <!-- Apache commons net for FTP -->
            <dependency>
                <groupId>commons-net</groupId>
                <artifactId>commons-net</artifactId>
                <version>3.6</version>
            </dependency>
            <!--commons IO -->
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.6</version>
            </dependency>
            <!-- ~~~~~~~~~~~~~~~~~~~ Apache Commons END ~~~~~~~~~~~~~~~~~~~~~~ -->

            <!-- ~~~~~~~~~~~~~~~~~~~ Spring ~~~~~~~~~~~~~~~~~~~~~~ -->
            <!-- Spring Context -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>5.0.6.RELEASE</version>
            </dependency>
            <!-- Spring JDBC -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-jdbc</artifactId>
                <version>5.0.6.RELEASE</version>
            </dependency>
            <!-- Spring JDBC -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>5.0.6.RELEASE</version>
            </dependency>
            <!-- ~~~~~~~~~~~~~~~~~~~ Spring END ~~~~~~~~~~~~~~~~~~~~~~ -->

            <!-- crawler commons -->
            <dependency>
                <groupId>com.github.crawler-commons</groupId>
                <artifactId>crawler-commons</artifactId>
                <version>0.7</version>
            </dependency>

            <!-- jena-sparql-api -->
            <dependency>
                <groupId>org.aksw.jena-sparql-api</groupId>
                <artifactId>jena-sparql-api-core</artifactId>
                <version>3.1.0-2-SNAPSHOT</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.httpcomponents</groupId>
                        <artifactId>httpclient</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- ~~~~~~~~~~~~~~~~~~~ HDT ~~~~~~~~~~~~~~~~~~~~~~ -->
            <!-- https://mvnrepository.com/artifact/org.rdfhdt/hdt-java-package -->
            <dependency>
                <groupId>org.rdfhdt</groupId>
                <artifactId>hdt-java-package</artifactId>
                <version>1.1</version>
                <type>pom</type>
                <exclusions>
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit-dep</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.rdfhdt</groupId>
                <artifactId>hdt-jena</artifactId>
                <version>1.1</version>
            </dependency>
            <dependency>
                <groupId>org.rdfhdt</groupId>
                <artifactId>hdt-api</artifactId>
                <version>1.1</version>
            </dependency>
            <!-- ~~~~~~~~~~~~~~~~~~~ HDT END ~~~~~~~~~~~~~~~~~~~~~~ -->


            <!-- Zip archives -->
            <dependency>
                <groupId>net.lingala.zip4j</groupId>
                <artifactId>zip4j</artifactId>
                <version>1.3.2</version>
            </dependency>
            <!-- End Zip archives -->

            <!-- HPPC Maps -->
            <dependency>
                <groupId>com.carrotsearch</groupId>
                <artifactId>hppc</artifactId>
                <version>0.5.3</version>
            </dependency>

            <!-- JSON processing -->
            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>20140107</version>
            </dependency>
            <!-- End JSON processing -->

            <!-- MongoDBDriver -->
            <dependency>
                <groupId>org.mongodb</groupId>
                <artifactId>mongodb-driver</artifactId>
                <version>3.6.4</version>
            </dependency>

            <!-- RethinkDB client -->
            <!-- https://mvnrepository.com/artifact/com.rethinkdb/rethinkdb-driver -->
            <dependency>
                <groupId>com.rethinkdb</groupId>
                <artifactId>rethinkdb-driver</artifactId>
                <version>2.3.3</version>
            </dependency>
            <!-- End RethinkDB client -->

            <!-- HSQLDB (used inside of workers to store URIs) -->
            <dependency>
                <groupId>org.hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>2.3.2</version>
            </dependency>

            <!-- We use the simpleframework to use local HTTP servers for 
                our JUnit tests and test scenarios -->
            <dependency>
                <groupId>org.simpleframework</groupId>
                <artifactId>simple</artifactId>
                <version>5.1.6</version>
            </dependency>

            <dependency>
                <groupId>org.xerial.snappy</groupId>
                <artifactId>snappy-java</artifactId>
                <version>1.1.4</version>
            </dependency>

            <!-- ~~~~~~~~~~~~~~~~~~~ Testing ~~~~~~~~~~~~~~~~~~~~~~ -->
            <!-- JUnit -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
                <scope>test</scope>
            </dependency>
            <!-- System Lambda for setting environment variables -->
            <dependency>
                <groupId>com.github.stefanbirkner</groupId>
                <artifactId>system-lambda</artifactId>
                <version>1.0.0</version>
            </dependency>
            <!-- ~~~~~~~~~~~~~~~~~~~ End Testing ~~~~~~~~~~~~~~~~~~~~~~ -->

            <!-- ~~~~~~~~~~~~~~~~~~~ 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>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>apache-log4j-extras</artifactId>
                <version>1.2.17</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 ~~~~~~~~~~~~~~~~~~~~~~ -->
        </dependencies>
    </dependencyManagement>

    <build>
        <!-- <finalName>${project.artifactId}</finalName> -->
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </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>
                    <failOnError>false</failOnError>
                </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>2.11</version>
                <configuration>
                    <header>com/mycila/maven/plugin/license/templates/GPL-3.txt</header>
                    <properties>
                        <owner>The Data Science Group (DICE, UPB)</owner>
                        <email>axel.ngonga@upb.de</email>
                    </properties>
                    <excludes>
                        <exclude>**/README</exclude>
                        <exclude>**/LICENSE</exclude>
                        <exclude>Makefile</exclude>
                        <exclude>Dockerfile</exclude>
                        <exclude>*.sh</exclude>
                        <exclude>**/logstash.conf</exclude>
                        <exclude>src/test/resources/**</exclude>
                        <exclude>src/main/resources/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <!--<plugin> <groupId>com.gavinmogan</groupId> <artifactId>codacy-maven-plugin</artifactId> 
                <version>1.2.0</version> <configuration> <apiToken>${env.CODACY_API_TOKEN}</apiToken> 
                <projectToken>${env.CODACY_PROJECT_TOKEN}</projectToken> <coverageReportFile>squirrel.reports/target/site/jacoco-aggregate/jacoco.xml</coverageReportFile> 
                <commit>${env.TRAVIS_COMMIT}</commit> <codacyApiBaseUrl>https://api.codacy.com</codacyApiBaseUrl> 
                <failOnMissingReportFile>false</failOnMissingReportFile> </configuration> 
                <executions> <execution> <id>post-test</id> <phase>post-integration-test</phase> 
                <goals> <goal>coverage</goal> </goals> </execution> </executions> </plugin> -->
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>2.4.3</version>
                    <configuration>
                        <!-- 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>
                                </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>
                <!-- 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.5</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>
        </pluginManagement>
    </build>
</project>
