<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>de.hs-heilbronn.mi</groupId>
    <artifactId>zlibsvm</artifactId>
    <packaging>pom</packaging>
    <version>2.0.4</version>

    <name>zlibsvm</name>
    <description>A Java binding for the famous LIBSVM library</description>
    <url>https://github.com/rzo1/zlibsvm</url>

    <modules>
        <module>zlibsvm-api</module>
        <module>zlibsvm-core</module>
    </modules>

    <scm>
        <connection>scm:git:git://github.com/rzo1/zlibsvm.git</connection>
        <developerConnection>scm:git:git@github.com:rzo1/zlibsvm.git</developerConnection>
        <url>https://github.com/rzo1/zlibsvm</url>
    </scm>

    <licenses>
        <license>
            <name>Apache 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <organization>
        <name>Heilbronn University - Medical Informatics</name>
        <url>https://www.mi.hs-heilbronn.de</url>
    </organization>

    <developers>
        <developer>
            <id>rzo1</id>
            <name>Richard Zowalla</name>
            <roles>
                <role>developer</role>
            </roles>
            <email>richard.zowalla@hs-heilbronn.de</email>
            <organization>University of Heilbronn - Medical Informatics</organization>
            <organizationUrl>https://www.mi.hs-heilbronn.de</organizationUrl>
        </developer>
        <developer>
            <id>mawiesne</id>
            <name>Martin Wiesner</name>
            <email>martin.wiesner@hs-heilbronn.de</email>
            <organization>University of Heilbronn - Medical Informatics</organization>
            <organizationUrl>https://www.mi.hs-heilbronn.de</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <properties>
        <!-- Application settings -->
        <copyright.year>2021</copyright.year>
        <license.inceptionYear>2014</license.inceptionYear>
        <license.licenseName>apache_v2</license.licenseName>

        <!-- Maven specific settings -->
        <minimum.maven.version>3.6.0</minimum.maven.version>
        <!-- Maven Range Syntax -->
        <required.maven.version>[${minimum.maven.version},)</required.maven.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
        <java.source>11</java.source>
        <java.target>11</java.target>
        <maven.compile.encoding>UTF-8</maven.compile.encoding>
        <maven.compiler.target>${java.target}</maven.compiler.target>

        <zlibsvm.version>2.0.4</zlibsvm.version>
        <libsvm.version>3.25</libsvm.version>
        <!-- apache commons stuff -->
        <commons.lang3.version>3.12.0</commons.lang3.version>

        <!-- additional dependencies -->
        <junit.version>4.13.2</junit.version>

        <slf4j.version>1.7.32</slf4j.version>
        <log4j.version>2.15.0</log4j.version>

        <maven.license.plugin>2.0.0</maven.license.plugin>
        <maven.compiler.plugin>3.8.1</maven.compiler.plugin>
        <maven.source.plugin>3.2.1</maven.source.plugin>
        <maven.javadoc.plugin>3.3.1</maven.javadoc.plugin>
        <forbiddenapis.plugin>3.2</forbiddenapis.plugin>
        <maven.surefire.plugin>3.0.0-M5</maven.surefire.plugin>
        <maven.gpg.plugin>3.0.1</maven.gpg.plugin>
        <maven.versions.version>2.8.1</maven.versions.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j-impl</artifactId>
                <version>${log4j.version}</version>
                <scope>runtime</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

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

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${maven.license.plugin}</version>

                    <configuration>
                        <verbose>false</verbose>
                        <includes>
                            <includes>**/*.java</includes>
                        </includes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>generate-license-headers</id>
                            <goals>
                                <goal>update-file-header</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <roots>
                                    <root>src/main/java</root>
                                    <root>src/test/java</root>
                                </roots>
                                <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
                                <processStartTag>
                                    ========================LICENSE_START=================================
                                </processStartTag>
                                <processEndTag>=========================LICENSE_END==================================
                                </processEndTag>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.plugin}</version>
                    <configuration>
                        <source>${java.source}</source>
                        <target>${java.target}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven.source.plugin}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven.javadoc.plugin}</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                        <!-- workaround for httpss://bugs.openjdk.java.net/browse/JDK-8212233 -->
                        <javaApiLinks>
                            <property>
                                <name>foo</name>
                                <value>bar</value>
                            </property>
                        </javaApiLinks>
                        <encoding>utf-8</encoding>
                        <show>public</show>
                        <detectOfflineLinks>false</detectOfflineLinks>
                        <detectJavaApiLink>false</detectJavaApiLink>
                        <!-- Speeds up the build of the javadocs -->
                        <quiet>true</quiet>
                        <use>false</use>
                        <doclint>none</doclint>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.plugin}</version>
                    <configuration>
                        <argLine>-Xmx512m -Dfile.encoding=UTF-8</argLine>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>de.thetaphi</groupId>
                    <artifactId>forbiddenapis</artifactId>
                    <version>${forbiddenapis.plugin}</version>
                    <configuration>
                        <failOnUnsupportedJava>false</failOnUnsupportedJava>
                        <bundledSignatures>
                            <bundledSignature>jdk-deprecated</bundledSignature>
                            <bundledSignature>jdk-internal</bundledSignature>
                            <bundledSignature>jdk-reflection</bundledSignature>
                            <bundledSignature>jdk-non-portable</bundledSignature>
                            <bundledSignature>jdk-unsafe</bundledSignature>
                        </bundledSignatures>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                                <goal>testCheck</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven.gpg.plugin}</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>de.thetaphi</groupId>
                <artifactId>forbiddenapis</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release-deployment</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>version-check</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                        <version>${maven.versions.version}</version>
                        <executions>
                            <execution>
                                <id>show-updates</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>display-plugin-updates</goal>
                                    <goal>display-dependency-updates</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>