<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>
  <name>Zeebe Broker Core</name>
  <artifactId>zeebe-broker-core</artifactId>
  <packaging>jar</packaging>

  <parent>
    <groupId>io.zeebe</groupId>
    <artifactId>zeebe-core-parent</artifactId>
    <version>0.1.1</version>
    <relativePath>../parent</relativePath>
  </parent>

  <properties>
    <license.header>COPYING-HEADER.txt</license.header>
  </properties>

  <dependencies>

    <dependency>
      <groupId>io.zeebe</groupId>
      <artifactId>zb-logstreams</artifactId>
    </dependency>

    <dependency>
      <groupId>io.zeebe</groupId>
      <artifactId>zb-protocol</artifactId>
    </dependency>

    <dependency>
      <groupId>io.zeebe</groupId>
      <artifactId>zb-util</artifactId>
    </dependency>

    <dependency>
      <groupId>io.zeebe</groupId>
      <artifactId>zb-transport</artifactId>
    </dependency>

    <dependency>
      <groupId>io.zeebe</groupId>
      <artifactId>zb-map</artifactId>
    </dependency>

    <dependency>
      <groupId>io.zeebe</groupId>
      <artifactId>zb-service-container</artifactId>
    </dependency>

    <dependency>
      <groupId>io.zeebe</groupId>
      <artifactId>zb-raft</artifactId>
    </dependency>

    <dependency>
      <groupId>com.moandjiezana.toml</groupId>
      <artifactId>toml4j</artifactId>
    </dependency>

    <dependency>
      <groupId>uk.co.real-logic</groupId>
      <artifactId>sbe-tool</artifactId>
    </dependency>

    <dependency>
      <groupId>org.agrona</groupId>
      <artifactId>agrona</artifactId>
    </dependency>

    <dependency>
      <groupId>io.zeebe</groupId>
      <artifactId>zeebe-protocol-test-util</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.zeebe</groupId>
      <artifactId>zb-test-util</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-library</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.zeebe</groupId>
      <artifactId>zb-msgpack-json-path</artifactId>
    </dependency>

    <dependency>
      <groupId>io.zeebe</groupId>
      <artifactId>zb-msgpack-value</artifactId>
    </dependency>

    <dependency>
      <groupId>org.msgpack</groupId>
      <artifactId>msgpack-core</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.camunda.bpm.model</groupId>
      <artifactId>camunda-bpmn-model</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
    </dependency>

  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources combine.children="append"><!-- merging with parent config for benchmarks -->
                <source>${project.build.directory}/generated-sources/sbe</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>java</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <executableDependency>
            <groupId>uk.co.real-logic</groupId>
            <artifactId>sbe</artifactId>
          </executableDependency>
          <mainClass>uk.co.real_logic.sbe.SbeTool</mainClass>
          <arguments>
            <argument>${project.build.resources[0].directory}/gossip-schema.xml</argument>
            <argument>${project.build.resources[0].directory}/raft-schema.xml</argument>
            <argument>${project.build.resources[0].directory}/management-schema.xml</argument>
          </arguments>
          <workingDirectory>${project.build.directory}/generated-sources</workingDirectory>
          <!-- system properties defined in zeebe-core-parent -->
        </configuration>
        <dependencies>
          <dependency>
            <groupId>uk.co.real-logic</groupId>
            <artifactId>sbe-all</artifactId>
            <version>${version.sbe}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>

</project>

