<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>de.uni-mannheim.informatik.dws.melt</groupId>
    <artifactId>matching-parent</artifactId>
    <packaging>pom</packaging>
    <version>3.2</version>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <junit.version>5.8.0-RC1</junit.version>
        <slf4j.version>1.7.32</slf4j.version>
        <surefire.version>3.0.0-M5</surefire.version>
        <javadoc.version>3.3.0</javadoc.version>
    </properties>

    <modules>
        <module>matching-assembly</module>
        <module>matching-base</module>
        <module>matching-eval</module>
        <module>matching-jena</module>
        <module>matching-jena-matchers</module>
        <module>matching-maven-plugin</module>
        <module>matching-ml</module>
        <module>matching-owlapi</module>
        <module>matching-validation</module>
        <module>yet-another-alignment-api</module>
        <module>matching-data</module>
        <module>receiver-cli</module>
        <module>receiver-hobbit</module>
        <module>receiver-http</module>
        <module>matching-eval-client</module>
    </modules>

    <name>MELT - Matching EvaLuation Toolkit</name>
    <description>MELT is a helpful maven framework for developing, tuning, evaluating, and packaging ontology matching
        systems. It is optimized to be used in OAEI campaigns and allows to submit matchers to the SEALS and HOBBIT
        evaluation platform easily. MELT can also be used for non OAEI-related matching tasks and evaluation.
    </description>
    <url>http://melt.dws.informatik.uni-mannheim.de</url>
    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Sven Hertling</name>
            <email>sven@informatik.uni-mannheim.de</email>
            <organization>University of Mannheim</organization>
            <organizationUrl>https://www.uni-mannheim.de/dws/</organizationUrl>
        </developer>
        <developer>
            <name>Jan Portisch</name>
            <email>jan@informatik.uni-mannheim.de</email>
            <url>http://www.jan-portisch.eu/</url>
            <organization>University of Mannheim</organization>
            <organizationUrl>https://www.uni-mannheim.de/dws/</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/dwslab/melt.git</connection>
        <developerConnection>scm:git:git@github.com:dwslab/melt.git</developerConnection>
        <url>https://github.com/dwslab/melt</url>
        <tag>melt-3.2</tag>
    </scm>

    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>


    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>3.0.0-M1</version>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.0.0-M1</version>
                <configuration>
                    <goals>deploy</goals>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${javadoc.version}</version>
                <configuration>
                    <show>private</show>
                    <nohelp>true</nohelp>
                    <failOnWarnings>true</failOnWarnings>
                    <notimestamp>true</notimestamp>
                    <doclint>all,-missing</doclint>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <goals>
                            <goal>jar</goal>
                            <goal>aggregate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- for checkstyle reports -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.9.1</version>
            </plugin>

            <!-- Test Code Coverage -->
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>4.3.0</version>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.7</version>
                <configuration>
                    <excludes>
                        <exclude>de/uni_mannheim/informatik/dws/melt/matching_validation/**/*</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>1.20</version>
                <executions>
                    <execution>
                        <id>aggregate-download-licenses</id>
                        <goals>
                            <goal>aggregate-download-licenses</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.1.2</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>checkstyle</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>

    <profiles>

        <!-- Default profile: Skip all BK test that require a local set-up of resources. -->
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${surefire.version}</version>
                        <configuration>
                            <excludes>
                                <exclude>**/WiktionaryLinkerTdbTest.java</exclude>
                                <exclude>**/WiktionaryKnowledgeSourceTdbTest.java</exclude>
                                <exclude>**/BabelNetLinkerTest.java</exclude>
                                <exclude>**/BabelNetKnowledgeSourceTest.java</exclude>
                                <exclude>**/DBpediaKnowledgeSourceTdbTest.java</exclude>
                                <exclude>**/DBpediaLinkerTdbTest.java</exclude>
                                <exclude>**/BabelNetRdfLinkerTest.java</exclude>
                            </excludes>
                            <!-- By default, we will not include tests that require a specific java version -->
                            <excludedGroups>Java8</excludedGroups>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- Background Knowledge Test Case Execution (this requires that BK resources are set up correctly) -->
        <profile>
            <id>run-bk-tests</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${surefire.version}</version>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- This profile runs tests that strictly require Java 8 -->
        <profile>
            <id>java8-tests</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${surefire.version}</version>
                        <configuration>
                            <groups>Java8</groups>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- GPG Signature on release -->
        <profile>
            <id>melt-release</id> <!-- mvn ... -P melt-release,default -->
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- This will only work in Java 8 -->
        <profile>
            <id>ci-run</id>
            <reporting>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${javadoc.version}</version>
                        <configuration>
                            <doclet>de.uni_mannheim.informatik.dws.melt.doclet.MarkdownDoclet</doclet>
                            <!-- can be found at /documentation/melt_doclet - not installed by default -->
                            <docletArtifact>
                                <groupId>de.uni-mannheim.informatik.dws.melt</groupId>
                                <artifactId>doclet</artifactId>
                                <version>1.0</version>
                            </docletArtifact>
                        </configuration>
                    </plugin>
                </plugins>
            </reporting>
        </profile>
    </profiles>
</project>
