<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <parent>
    <groupId>org.kie.kogito</groupId>
    <artifactId>jbpm</artifactId>
    <version>1.36.1.Final</version>
  </parent>


  <modelVersion>4.0.0</modelVersion>

  <artifactId>process-serialization-protobuf</artifactId>
  <name>Kogito :: Process :: Protobuf Serialization</name>
  <description>Kogito Process Protobuf Serialization</description>
  <properties>
    <sonar.exclusions>**/org/kie/kogito/serialization/process/protobuf/*</sonar.exclusions>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.kie.kogito</groupId>
        <artifactId>kogito-kie-bom</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>jbpm-flow</artifactId>
    </dependency>

    <dependency>
        <groupId>org.kie.kogito</groupId>
        <artifactId>kogito-jackson-utils</artifactId>
    </dependency>

    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java-util</artifactId>
    </dependency>
    <dependency>
      <groupId>org.infinispan.protostream</groupId>
      <artifactId>protostream</artifactId>
    </dependency>

    <dependency>
      <groupId>org.drools</groupId>
      <artifactId>drools-wiring-dynamic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>${jandex-maven-plugin.group-id}</groupId>
        <artifactId>jandex-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>make-index</id>
            <goals>
              <goal>jandex</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>net.revelc.code.formatter</groupId>
        <artifactId>formatter-maven-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/org/kie/kogito/serialization/process/protobuf/*</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <!-- 
    to invoke protobuff files again just use this command:
        mvn generate-sources  -Pproto
   -->
  <profiles>
    <profile>
      <id>proto</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.xolstice.maven.plugins</groupId>
            <artifactId>protobuf-maven-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <configuration>
              <failOnViolation>false</failOnViolation>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
