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

  <parent>
    <groupId>org.heigit.ohsome</groupId>
    <artifactId>ohsome-parent</artifactId>
    <version>2.7</version>
  </parent>

  <artifactId>oshdb-parent</artifactId>
  <version>0.6.2</version>
  <name>OSHDB parent module</name>
  <description>Common dependencies, settings and profiles that are shared by all components of the OSHDB</description>
  <packaging>pom</packaging>

  <modules>
    <module>oshdb</module>
    <module>oshdb-api</module>
    <module>oshdb-tool</module>
    <module>oshdb-util</module>
  </modules>

  <properties>
    <apachecommons.version>3.1</apachecommons.version>
    <commonsio.version>2.5</commonsio.version>
    <fastutil.version>8.1.1</fastutil.version>
    <gitcommitplugin.version>2.2.6</gitcommitplugin.version>
    <glassfish.version>1.1</glassfish.version>
    <googlejson.version>1.1.1</googlejson.version>
    <guava.version>29.0-jre</guava.version>
    <h2.version>1.4.197</h2.version>
    <ignite.version>2.9.0</ignite.version>
    <jacoco.version>0.8.5</jacoco.version>
    <jcommander.version>1.72</jcommander.version>
    <jetbrainsannotations.version>13.0</jetbrainsannotations.version>
    <jts.version>1.16.1</jts.version>
    <junit.version>4.13.1</junit.version>
    <mavenassembly.version>3.1.1</mavenassembly.version>
    <mavenpmd.version>3.11.0</mavenpmd.version>
    <mavensurefire.version>2.22.2</mavensurefire.version>
    <orgjson.version>20160810</orgjson.version>
    <osmosis.version>0.45</osmosis.version>
    <pmd.version>6.11.0</pmd.version>
    <postgresql.version>42.1.4</postgresql.version>
    <protobuf.version>2.6.1</protobuf.version>
    <roaringbitmap.version>0.6.59</roaringbitmap.version>
    <rxjava2.version>2.1.9</rxjava2.version>
    <slf4j.version>1.7.25</slf4j.version>
    <wololo.version>0.13.0</wololo.version>
  </properties>

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

  <repositories>
    <repository>
      <!--This will resolve artefacts of Osgeo, Boundless and potentially others through our own reopository (https://www.jfrog.com/confluence/display/RTF/Maven+Repository#MavenRepository-ResolvingArtifactsthroughArtifactory).-->
      <id>HeiGIT main</id>
      <name>Central Repository for OSHDB dependency related artefacts</name>
      <url>http://repo.heigit.org/artifactory/main</url>
    </repository>

    <repository>
      <id>HeiGIT snapshots</id>
      <name>Heigit/GIScience maven repository (snapshots)</name>
      <url>http://repo.heigit.org/artifactory/libs-snapshot-local</url>
      <snapshots />
    </repository>
  </repositories>

  <scm>
    <!-- https://maven.apache.org/pom.html#SCM -->
    <connection>scm:git:git@github.com/GIScience/oshdb.git</connection>
    <developerConnection>scm:git:git@github.com/GIScience/oshdb.git</developerConnection>
    <url>https://github.com/GIScience/oshdb.git</url>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/GIScience/oshdb/issues</url>
  </issueManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${mavensurefire.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>${mavenpmd.version}</version>
        <dependencies>
          <dependency>
            <groupId>net.sourceforge.pmd</groupId>
            <artifactId>pmd-core</artifactId>
            <version>${pmd.version}</version>
          </dependency>
          <dependency>
            <groupId>net.sourceforge.pmd</groupId>
            <artifactId>pmd-java</artifactId>
            <version>${pmd.version}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>jacoco</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco.version}</version>
            <executions>
              <execution>
                <id>default-prepare-agent</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
              </execution>
              <execution>
                <id>default-report</id>
                <goals>
                  <goal>report</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>git</id>
      <build>
        <plugins>
          <plugin>
            <groupId>pl.project13.maven</groupId>
            <artifactId>git-commit-id-plugin</artifactId>
            <version>${gitcommitplugin.version}</version>
            <executions>
              <execution>
                <id>get-the-git-infos</id>
                <goals>
                  <goal>revision</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
              <prefix>git</prefix>
              <verbose>false</verbose>
              <generateGitPropertiesFile>true</generateGitPropertiesFile>
              <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
              <format>json</format>
              <gitDescribe>
                <skip>false</skip>
                <always>false</always>
                <dirty>-dirty</dirty>
              </gitDescribe>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
