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

  <groupId>com.github.funthomas424242</groupId>
  <artifactId>nitrite-spring-boot-starter</artifactId>
  <version>0.0.2</version>
  <packaging>jar</packaging>
  <name>Nitrite Spring Boot Starter</name>
  <description>Spring Boot Starter für die Nitrite Datenbank</description>
  <inceptionYear>2019</inceptionYear>
  <url>https://github.com/FunThomas424242/nitrite-spring-boot-starter</url>
  <licenses>
    <license>
      <url>https://www.gnu.org/licenses/lgpl-3.0.de.html</url>
      <name>GNU LESSER GENERAL PUBLIC LICENSE
        Version 3, 29 June 2007
      </name>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:https://github.com/FunThomas424242/nitrite-spring-boot-starter.git</connection>
    <developerConnection>scm:git:git@github.com:FunThomas424242/nitrite-spring-boot-starter.git</developerConnection>
    <url>https://github.com/FunThomas424242/nitrite-spring-boot-starter</url>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/FunThomas424242/nitrite-spring-boot-starter/issues/new</url>
  </issueManagement>
  <ciManagement>
    <system>Travis</system>
    <url>https://travis-ci.org/FunThomas424242/nitrite-spring-boot-starter</url>
  </ciManagement>
  <distributionManagement>
    <snapshotRepository>
      <id>bintray-funthomas424242-funthomas424242-libs</id>
      <name>oss-jfrog-artifactory-snapshots</name>
      <url>https://oss.jfrog.org/artifactory/oss-snapshot-local</url>
    </snapshotRepository>
    <repository>
      <id>bintray-funthomas424242-funthomas424242-libs</id>
      <name>funthomas424242-funthomas424242-libs</name>
      <url>https://api.bintray.com/maven/funthomas424242/funthomas424242-libs/${project.artifactId}/;publish=1
      </url>
    </repository>
  </distributionManagement>


  <properties>
    <java.version>11</java.version>
    <spring-boot-version>2.2.2.RELEASE</spring-boot-version>
    <spring-cloud.version>Hoxton.RC2</spring-cloud.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
    <maven.compiler.release>11</maven.compiler.release>
    <junit-jupiter-engine.version>5.5.2</junit-jupiter-engine.version>
    <junit-excluded-groups/>
  </properties>

  <prerequisites>
    <maven>3.6.2</maven>
  </prerequisites>

  <dependencies>
    <!-- für Spring Boot Starter notwendig -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-autoconfigure</artifactId>
      <version>${spring-boot-version}</version>
      <scope>compile</scope>
    </dependency>

    <!-- nitrite db -->
    <dependency>
      <groupId>org.dizitart</groupId>
      <artifactId>nitrite</artifactId>
      <version>3.3.0</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <!-- ab 1.8. wird die Implementierung z.B. logback als javaModul benötigt -->
      <version>1.7.29</version>
      <scope>compile</scope>
    </dependency>


    <!-- Test Abhängigkeiten -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <version>${spring-boot-version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.junit.vintage</groupId>
          <artifactId>junit-vintage-engine</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.5.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit-jupiter-engine.version}</version>
      <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-core -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>1.2.3</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <!-- Import dependency management from Spring Boot -->
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot-version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>


  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>2.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.5</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M3</version>
        <executions>
          <execution>
            <id>enforce-java</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>3.6.2</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>13</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <licenseFile>LICENSE</licenseFile>
          <licenseName>lgpl_v3</licenseName>
          <useMissingFile>true</useMissingFile>
          <excludedLicenses>
            <excludedLicense>GNU General Public License (GPL) 1.0</excludedLicense>
            <excludedLicense>GNU General Public License (GPL) 2.0</excludedLicense>
            <excludedLicense>GNU General Public License (GPL) 3.0</excludedLicense>
          </excludedLicenses>
          <failIfWarning>true</failIfWarning>
          <includes>
            <include>**/*.java</include>
            <include>**/*.properties</include>
            <include>**/*.xml</include>
          </includes>
          <excludes>
            <exclude>**/*.png</exclude>
            <exclude>**/*.json</exclude>
          </excludes>
        </configuration>
        <executions>
          <execution>
            <id>update-header</id>
            <phase>process-sources</phase>
            <goals>
              <goal>update-file-header</goal>
              <goal>update-project-license</goal>
              <goal>add-third-party</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <generateBackupPoms>false</generateBackupPoms>
          <rulesUri>file:///${project.basedir}/etc/version-rules.xml</rulesUri>
        </configuration>
        <executions>
          <execution>
            <id>show-dep-updates</id>
            <phase>
              validate
            </phase>
            <goals>
              <goal>display-dependency-updates</goal>
              <goal>display-plugin-updates</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>clean-site</id>
            <phase>pre-site</phase>
            <goals>
              <goal>clean</goal>
            </goals>
            <configuration>
              <filesets>
                <fileset>
                  <directory>${basedir}/docs</directory>
                  <followSymlinks>false</followSymlinks>
                </fileset>
              </filesets>
            </configuration>
          </execution>
          <execution>
            <id>clean-test</id>
            <phase>initialize</phase>
            <goals>
              <goal>clean</goal>
            </goals>
            <configuration>
              <filesets>
                <fileset>
                  <directory>${basedir}/generated/</directory>
                  <followSymlinks>false</followSymlinks>
                </fileset>
              </filesets>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>process-sources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/target/</outputDirectory>
              <resources>
                <resource>
                  <directory>src/main/non-packaged-resources</directory>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <encoding>UTF-8</encoding>
          <release>11</release>
          <compilerArgs>
            <arg>-Xlint:all</arg>
            <arg>--add-opens=java.base/java.lang=ALL-UNNAMED</arg>
            <arg>--add-opens=java.base/java.net=ALL-UNNAMED</arg>
          </compilerArgs>
          <fork>true</fork>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M2</version>
        <configuration>
          <!--          <forkCount>0</forkCount>-->
          <!--          <reuseForks>true</reuseForks>-->
          <argLine>
            --illegal-access=deny
          </argLine>
          <excludedGroups>
            ${junit-excluded-groups}
          </excludedGroups>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-contract-maven-plugin</artifactId>
        <version>2.2.0.RELEASE</version>
        <extensions>true</extensions>
        <configuration>
          <skip>true</skip>
          <testFramework>JUNIT5</testFramework>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>${spring-boot-version}</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.8.2</version>
        <configuration>
          <outputDirectory>${basedir}/docs</outputDirectory>
          <locales>de</locales>
          <relativizeDecorationLinks>false</relativizeDecorationLinks>
          <requires>
            <require>asciidoctor-diagram</require>
          </requires>
          <backend>html5</backend>
          <asciidoc>
            <attributes>
              <icons>font</icons>
              <source-highlighter>coderay</source-highlighter>
              <coderay-css>style</coderay-css>
              <toc>left</toc>
              <!--<toclevels>2</toclevels>-->
            </attributes>
          </asciidoc>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <version>2.0.0-RC.1</version>
          </dependency>
        </dependencies>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>headless</id>
      <properties>
        <junit-excluded-groups>headfull</junit-excluded-groups>
      </properties>
    </profile>
  </profiles>

  <organization>
    <name>PIUG</name>
    <url>https://piug.slack.com</url>
  </organization>

  <developers>
    <developer>
      <name>FunThomas424242 (Thomas Schubert)</name>
      <email>funthomas424242@gmail.com</email>
      <roles>
        <role>project owner</role>
        <role>developer</role>
      </roles>
    </developer>
  </developers>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.9</version>
        <reportSets>
          <reportSet>
            <configuration>
              <skip>true</skip>
            </configuration>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

</project>
