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

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.5.12</version>
  </parent>

  <groupId>de.digitalcollections.cudami</groupId>
  <artifactId>dc-cudami</artifactId>
  <version>5.2.4</version>
  <packaging>pom</packaging>

  <name>DigitalCollections: cudami</name>
  <description>Cudami is a Digital Asset Management System for management and editing of cultural objects.</description>
  <url>https://github.com/dbmdz/cudami</url>

  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://github.com/dbmdz/cudami/blob/main/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Ralf Eichinger</name>
      <email>ralf.eichinger@bsb-muenchen.de</email>
      <id>datazuul</id>
    </developer>
    <developer>
      <name>Matthias Lindinger</name>
      <email>matthias.lindinger@bsb-muenchen.de</email>
      <id>morpheus-87</id>
    </developer>
    <developer>
      <name>Christoph Lorenz</name>
      <email>christoph.lorenz@bsb-muenchen.de</email>
      <id>clorenz</id>
    </developer>
    <developer>
      <name>David Förster</name>
      <email>david.foerster@bsb-muenchen.de</email>
      <id>daforster</id>
    </developer>
  </developers>
  <ciManagement>
    <system>GitHub Actions</system>
    <url>https://github.com/dbmdz/cudami/actions</url>
  </ciManagement>
  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/dbmdz/cudami/issues</url>
  </issueManagement>
  <scm>
    <connection>https://github.com/dbmdz/cudami.git</connection>
    <developerConnection>git@github.com:dbmdz/cudami.git</developerConnection>
    <url>https://github.com/dbmdz/cudami</url>
  </scm>

  <modules>
    <module>dc-cudami-admin</module>
    <module>dc-cudami-client</module>
    <module>dc-cudami-model</module>
    <module>dc-cudami-server</module>
    <module>dc-cudami-lobid-client</module>
  </modules>

  <properties>
    <java.version>11</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <version.assertj-core>3.22.0</version.assertj-core>
    <version.commons-beanutils>1.9.4</version.commons-beanutils>
    <version.commons-lang3>3.12.0</version.commons-lang3>
    <version.dc-model>9.1.0</version.dc-model>
    <version.flyway>7.15.0</version.flyway>
    <version.javax.servlet-api>4.0.1</version.javax.servlet-api>
    <version.junit>5.8.2</version.junit>
    <version.logstash-logback-encoder>6.6</version.logstash-logback-encoder>
    <version.mockito-core>4.4.0</version.mockito-core>
    <version.openjson>1.0.12</version.openjson>
    <version.passay>1.6.1</version.passay>
    <version.postgresql>42.2.24</version.postgresql>
    <version.slf4j>1.7.36</version.slf4j>
    <version.spotbugs>4.2.3</version.spotbugs>
    <version.unbescape>1.1.6.RELEASE</version.unbescape>

    <!-- plugins -->
    <version.githook-maven-plugin>1.0.5</version.githook-maven-plugin>
    <version.jacoco-maven-plugin>0.8.7</version.jacoco-maven-plugin>
    <version.maven-failsafe-plugin>3.0.0-M5</version.maven-failsafe-plugin>
    <version.maven-fmt-plugin>2.13</version.maven-fmt-plugin>
    <version.maven-gpg-plugin>3.0.1</version.maven-gpg-plugin>
    <version.maven-surefire-plugin>3.0.0-M5</version.maven-surefire-plugin>
    <version.nexus-staging-maven-plugin>1.6.12</version.nexus-staging-maven-plugin>
    <version.spotbugs-maven-plugin>4.5.0.0</version.spotbugs-maven-plugin>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.github.openjson</groupId>
        <artifactId>openjson</artifactId>
        <version>${version.openjson}</version>
      </dependency>
      <dependency>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-annotations</artifactId>
        <version>${version.spotbugs}</version>
      </dependency>
      <dependency>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>${version.commons-beanutils}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.cudami</groupId>
        <artifactId>dc-cudami-admin-backend-api</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.cudami</groupId>
        <artifactId>dc-cudami-admin-backend-rest</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.cudami</groupId>
        <artifactId>dc-cudami-admin-business</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.cudami</groupId>
        <artifactId>dc-cudami-client</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.cudami</groupId>
        <artifactId>dc-cudami-model</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.cudami</groupId>
        <artifactId>dc-cudami-lobid-client</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.cudami</groupId>
        <artifactId>dc-cudami-server-backend-api</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.cudami</groupId>
        <artifactId>dc-cudami-server-backend-file</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.cudami</groupId>
        <artifactId>dc-cudami-server-backend-inmemory</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.cudami</groupId>
        <artifactId>dc-cudami-server-backend-jdbi</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.cudami</groupId>
        <artifactId>dc-cudami-server-backend-lobid</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.cudami</groupId>
        <artifactId>dc-cudami-server-business</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.model</groupId>
        <artifactId>dc-model</artifactId>
        <version>${version.dc-model}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.model</groupId>
        <artifactId>dc-model-jackson</artifactId>
        <version>${version.dc-model}</version>
      </dependency>
      <dependency>
        <groupId>de.digitalcollections.model</groupId>
        <artifactId>dc-model-xml</artifactId>
        <version>${version.dc-model}</version>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>${version.javax.servlet-api}</version>
      </dependency>
      <dependency>
        <groupId>net.logstash.logback</groupId>
        <artifactId>logstash-logback-encoder</artifactId>
        <version>${version.logstash-logback-encoder}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${version.commons-lang3}</version>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${version.assertj-core}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-core</artifactId>
        <version>${version.flyway}</version>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter</artifactId>
        <version>${version.junit}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${version.mockito-core}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.passay</groupId>
        <artifactId>passay</artifactId>
        <version>${version.passay}</version>
      </dependency>
      <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>${version.postgresql}</version>
        <scope>runtime</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${version.slf4j}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${version.slf4j}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-validation</artifactId>
      </dependency>
      <dependency>
        <groupId>org.unbescape</groupId>
        <artifactId>unbescape</artifactId>
        <version>${version.unbescape}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>io.github.phillipuniverse</groupId>
        <artifactId>githook-maven-plugin</artifactId>
        <version>${version.githook-maven-plugin}</version>
        <executions>
          <execution>
            <goals>
              <goal>install</goal>
            </goals>
            <configuration>
              <hooks>
                <pre-commit>
                  if ! mvn com.coveo:fmt-maven-plugin:check ; then
                  mvn com.coveo:fmt-maven-plugin:format
                  echo -e "\e[31mCode has been reformatted to match code style\e[0m"
                  echo -e "\e[31mPlease use git add … to add modified files\e[0m"
                  echo "Your commit message was:"
                  cat .git/COMMIT_EDITMSG
                  exit 1
                  fi
                </pre-commit>
              </hooks>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.coveo</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <version>${version.maven-fmt-plugin}</version>
        <executions>
          <execution>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>${version.spotbugs-maven-plugin}</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>${version.spotbugs}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>${version.maven-failsafe-plugin}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <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>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${version.maven-surefire-plugin}</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${version.jacoco-maven-plugin}</version>
        <executions>
          <execution>
            <id>pre-unit-test</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <excludes>
            <exclude>**/*Advice.*</exclude>
            <exclude>**/Application.*</exclude>
            <exclude>**/*Exception.*</exclude>
            <exclude>**/*Filter.*</exclude>
            <exclude>**/*Interceptor.*</exclude>
            <exclude>**/*Properties.*</exclude>
            <exclude>**/SpringConfig*</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>${version.nexus-staging-maven-plugin}</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <repositories>
    <repository>
      <id>ossrh-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>false</enabled>
      </releases>
    </repository>
  </repositories>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${version.jacoco-maven-plugin}</version>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>deploy</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${version.maven-gpg-plugin}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
