<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>
  <parent>
    <groupId>com.github.titisan</groupId>
    <artifactId>parent</artifactId>
    <version>0.3.2</version>
  </parent>

  <!-- <groupId>com.titisan.ldap</groupId> -->
  <artifactId>ldapcollector</artifactId>
  <packaging>jar</packaging>
  <!-- <version>0.3.0</version> -->
  <name>ldapcollector</name>
  <description>
    See https://github.com/titisan/ldap_exporter
  </description>
  <url>https://github.com/titisan/ldap_exporter</url>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/io.prometheus/simpleclient -->
    <dependency>
      <groupId>io.prometheus</groupId>
      <artifactId>simpleclient</artifactId>
      <version>0.6.0</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.unboundid/unboundid-ldapsdk -->
    <dependency>
      <groupId>com.unboundid</groupId>
      <artifactId>unboundid-ldapsdk</artifactId>
      <version>4.0.9</version>
      <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.yaml/snakeyaml -->
    <dependency>
      <groupId>org.yaml</groupId>
      <artifactId>snakeyaml</artifactId>
      <version>1.24</version>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <!-- Compile version (1.5 for generics) -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.0</version>
        <configuration>
           <systemProperties>
             <property>
               <name>java.util.logging.config.file</name>
               <value>src/test/resources/logging.properties</value>
             </property>
           </systemProperties>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.3</version>
        <configuration>
          <destFile>${basedir}/target/coverage-reports/jacoco-unit.exec</destFile>
          <dataFile>${basedir}/target/coverage-reports/jacoco-unit.exec</dataFile>
        </configuration>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>3.1.11</version>
        <dependencies>
          <!-- overwrite dependency on spotbugs if you want to specify the version of spotbugs -->
          <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs</artifactId>
            <version>3.1.12</version>
          </dependency>
        </dependencies>
        <configuration>
            <threshold>Low</threshold>
            <maxRank>20</maxRank>
            <includeTests>false</includeTests>
        </configuration>
        <executions>
          <execution>
            <phase>test-compile</phase>
              <goals>
                <goal>spotbugs</goal>
                  </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <plugins>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>3.1.12</version>
          <configuration>
            <threshold>Low</threshold>
            <maxRank>20</maxRank>
            <includeTests>false</includeTests>
          </configuration>
      </plugin>
    </plugins>
  </reporting>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>
</project>
