<?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>dev.mdz</groupId>
  <artifactId>flusswerk-parent</artifactId>
  <version>9.0.0</version>
  <packaging>pom</packaging>

  <name>Flusswerk (Parent)</name>

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

  <description>
    Tooling for AMQP/RabbitMQ based workflow management.
  </description>
  <url>https://github.com/dbmdz/flusswerk</url>
  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://github.com/dbmdz/flusswerk/blob/master/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Marcus Bitzl</name>
      <email>marcus.bitzl@bsb-muenchen.de</email>
      <id>bitzl</id>
    </developer>
    <developer>
      <name>Christoph Lorenz</name>
      <email>christoph.lorenz@bsb-muenchen.de</email>
      <id>clorenz</id>
    </developer>
    <developer>
      <name>Ralf Eichinger</name>
      <email>ralf.eichinger@bsb-muenchen.de</email>
      <id>datazuul</id>
    </developer>
  </developers>
  <ciManagement>
    <url>https://travis-ci.org/dbmdz/flusswerk</url>
    <system>Travis CI</system>
  </ciManagement>
  <issueManagement>
    <url>https://github.com/dbmdz/flusswerk/issues</url>
    <system>GitHub Issues</system>
  </issueManagement>
  <scm>
    <connection>https://github.com/dbmdz/flusswerk.git</connection>
    <developerConnection>git@github.com:dbmdz/flusswerk.git</developerConnection>
    <url>https://github.com/dbmdz/flusswerk</url>
  </scm>

  <modules>
    <module>framework</module>
    <module>integration-tests</module>
  </modules>

  <properties>
    <java.version>17</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>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.rabbitmq</groupId>
        <artifactId>amqp-client</artifactId>
        <version>5.27.1</version>
      </dependency>
      <dependency>
        <groupId>net.logstash.logback</groupId>
        <artifactId>logstash-logback-encoder</artifactId>
        <version>9.0</version>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>5.20.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter</artifactId>
        <version>6.0.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>de.huxhorn.sulky</groupId>
        <artifactId>de.huxhorn.sulky.ulid</artifactId>
        <version>8.3.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>com.spotify.fmt</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <version>2.29</version>
        <executions>
          <execution>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>io.github.phillipuniverse</groupId>
        <artifactId>githook-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>install</goal>
            </goals>
            <configuration>
              <hooks>
                <pre-commit>
                  if ! mvn com.spotify.fmt:fmt-maven-plugin:check ; then
                      mvn com.spotify.fmt: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>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.12.0</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>io.github.phillipuniverse</groupId>
          <artifactId>githook-maven-plugin</artifactId>
          <version>1.0.5</version>
        </plugin>
        <plugin>
          <groupId>com.spotify.fmt</groupId>
          <artifactId>fmt-maven-plugin</artifactId>
          <version>2.29</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>wagon-maven-plugin</artifactId>
          <version>2.0.2</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.14</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <configuration>
            <formats>
              <format>html</format>
              <format>xml</format>
            </formats>
            <check/>
          </configuration>
        </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-javadoc-plugin</artifactId>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

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

  <profiles>
    <profile>
      <id>maven-central</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.9.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>
              <autoPublish>true</autoPublish>
              <deploymentName>flusswerk:${project.version}</deploymentName>
              <excludeArtifacts>
                <artifact>integration-tests</artifact>
              </excludeArtifacts>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sign</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>3.2.8</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
