<?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>progress-indicator</artifactId>
    <version>1.0.0</version>

    <name>progress-indicator</name>
    <description>A simple progress bar for command line usage</description>
    <url>https://git.it.hs-heilbronn.de/it/development/progress-indicator</url>

    <scm>
        <connection>scm:git:git@git.it.hs-heilbronn.de:it/development/progress-indicator.git</connection>
        <developerConnection>scm:git:git@git.it.hs-heilbronn.de:it/development/progress-indicator.git</developerConnection>
        <url>https://git.it.hs-heilbronn.de/it/development/progress-indicator.git</url>
    </scm>

    <licenses>
        <license>
            <name>Apache 2.0</name>
            <url>http://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>sweis</id>
            <name>Sebastian Weis</name>
            <email>sebastian.weis@hs-heilbronn.de</email>
            <organization>University of Heilbronn - Medical Informatics</organization>
            <organizationUrl>https://www.mi.hs-heilbronn.de</organizationUrl>
            <roles>
                <role>founder</role>
            </roles>
        </developer>
        <developer>
            <id>zowallar</id>
            <name>Richard Zowalla</name>
            <roles>
                <role>maintainer</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>mwiesner</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>maintainer</role>
            </roles>
        </developer>
    </developers>

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

        <!-- Maven specific settings -->
        <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>

        <!-- additional dependencies -->
        <maven.surefire.plugin>3.0.0-M5</maven.surefire.plugin>
        <maven.compiler.plugin>3.8.1</maven.compiler.plugin>
        <maven.license.plugin>2.0.0</maven.license.plugin>
        <maven.javadoc.plugin>3.2.0</maven.javadoc.plugin>
        <maven.source.plugin>3.2.1</maven.source.plugin>
        <maven.pmd.plugin>3.13.0</maven.pmd.plugin>
        <maven.gpg.plugin>1.6</maven.gpg.plugin>
        <forbiddenapis.plugin>3.1</forbiddenapis.plugin>

        <!-- project dependencies -->
        <junit.jupiter.version>5.7.0</junit.jupiter.version>
    </properties>


    <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>

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

    <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 https://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>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>${maven.pmd.plugin}</version>
                    <configuration>
                        <targetJdk>${java.target}</targetJdk>
                        <failOnViolation>false</failOnViolation>
                        <minimumTokens>100</minimumTokens>
                        <analysisCache>true</analysisCache>
                        <includeTests>true</includeTests>
                        <linkXRef>false</linkXRef>
                    </configuration>
                    <executions>
                        <execution>
                            <id>pmd</id>
                            <phase>package</phase>
                            <goals>
                                <goal>check</goal>
                                <goal>pmd</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>de.thetaphi</groupId>
                <artifactId>forbiddenapis</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</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>
    </profiles>

</project>