<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.kie</groupId>
    <artifactId>kie-parent</artifactId>
    <version>7.48.0.Final</version> <!-- change with every build -->
  </parent>

  <groupId>org.kie</groupId>
  <artifactId>openshift-kie-parent</artifactId>
  <packaging>pom</packaging>

  <properties>
    <alphanetworkCompilerEnabled>false</alphanetworkCompilerEnabled>
    <dockerImageName>quickstarter/openshift-kie-springboot</dockerImageName>
    <failOnMissingWebXml>false</failOnMissingWebXml>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <version.annotations>2.0.1.Final</version.annotations>
    <version.fabric8.plugin>4.2.0</version.fabric8.plugin>
    <version.fabric8.docker-plugin>0.30.0</version.fabric8.docker-plugin>
    <surefire.forkCount>1</surefire.forkCount>
    <version.javax.el>3.0.1-b08</version.javax.el>
    <version.javax.ws.rs>2.0.0.Final</version.javax.ws.rs>
    <version.org.apache.kafka>2.2.1</version.org.apache.kafka>
    <version.k8s.client>4.6.0</version.k8s.client>
    <version.logback.kafka.appender>0.2.0-RC2</version.logback.kafka.appender>
    <version.servlet>2.0.0.Final</version.servlet>
    <version.slf4j>1.7.26</version.slf4j>
  </properties>

  <modules>
    <module>springboot</module>
    <module>jdkhttp</module>
    <module>sample-hacep-project</module>
    <module>distribution</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.drools</groupId>
        <artifactId>ha-core-infra</artifactId>
        <version>${version.org.kie}</version>
      </dependency>
      <dependency>
        <groupId>org.drools</groupId>
        <artifactId>ha-remote</artifactId>
        <version>${version.org.kie}</version>
      </dependency>
      <dependency>
        <groupId>org.drools</groupId>
        <artifactId>ha-core</artifactId>
        <version>${version.org.kie}</version>
      </dependency>
      <dependency>
        <groupId>org.kie</groupId>
        <artifactId>sample-hacep-project-kjar</artifactId>
        <version>${version.org.kie}</version>
      </dependency>
      <dependency>
        <groupId>org.kie</groupId>
        <artifactId>openshift-kie-springboot</artifactId>
        <version>${version.org.kie}</version>
      </dependency>

      <!-- drools -->
      <dependency>
        <groupId>org.kie</groupId>
        <artifactId>kie-maven-plugin</artifactId>
        <version>${version.org.kie}</version>
      </dependency>
      <dependency>
        <groupId>org.kie</groupId>
        <artifactId>kie-ci</artifactId>
        <version>${version.org.kie}</version>
        <exclusions>
          <exclusion>
            <groupId>aopalliance</groupId>
            <artifactId>aopalliance</artifactId>
          </exclusion>
          <exclusion>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.drools</groupId>
        <artifactId>drools-bom</artifactId>
        <version>${version.org.kie}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <!-- kafka -->
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-clients</artifactId>
        <version>${version.org.apache.kafka}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-clients</artifactId>
        <version>${version.org.apache.kafka}</version>
        <classifier>test</classifier>
      </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka_2.12</artifactId>
        <version>${version.org.apache.kafka}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka_2.12</artifactId>
        <version>${version.org.apache.kafka}</version>
        <classifier>test</classifier>
      </dependency>

      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${version.com.fasterxml.jackson.databind}</version>
        <scope>compile</scope>
      </dependency>

      <!-- fabric8 -->
      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>kubernetes-client</artifactId>
        <version>${version.k8s.client}</version>
      </dependency>

      <dependency>
        <!-- Spring Boot -->
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${version.org.springframework.boot}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
        <version>${version.org.springframework.boot}</version>
        <exclusions>
          <exclusion>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jcl</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-logging</artifactId>
        <version>${version.org.springframework.boot}</version>
      </dependency>

      <!-- Validation used by fabric8 client-->
      <dependency>
        <groupId>org.hibernate.validator</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>${version.org.hibernate.validator}</version>
      </dependency>
      <!-- -->
      <dependency>
        <groupId>org.jboss.spec.javax.servlet</groupId>
        <artifactId>jboss-servlet-api_4.0_spec</artifactId>
        <version>${version.servlet}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.jboss.spec.javax.annotation</groupId>
        <artifactId>jboss-annotations-api_1.3_spec</artifactId>
        <version>${version.annotations}</version>
        <scope>compile</scope>
      </dependency>

      <dependency>
        <groupId>org.jboss.spec.javax.ws.rs</groupId>
        <artifactId>javax.ws.rs-api</artifactId>
        <version>${version.javax.ws.rs}</version>
        <scope>compile</scope>
      </dependency>

      <dependency>
        <groupId>com.github.danielwegener</groupId>
        <artifactId>logback-kafka-appender</artifactId>
        <version>${version.logback.kafka.appender}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-module-junit4</artifactId>
        <version>${version.org.powermock}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-api-mockito</artifactId>
        <version>${version.org.powermock}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <finalName>${project.artifactId}</finalName>
  </build>

  <profiles>
    <profile>
      <id>run-code-coverage</id>
      <properties>
        <jacoco.excludes>*Lexer</jacoco.excludes>

        <!-- jacoco.exec.file is defined in kie-parent -->
        <!--suppress UnresolvedMavenProperty -->
        <jacoco.agent.line>-javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${version.jacoco.plugin}/org.jacoco.agent-${version.jacoco.plugin}-runtime.jar=destfile=${jacoco.exec.file},append=true,excludes=${jacoco.excludes}</jacoco.agent.line>
        <surefire.argLine>
          -Dfile.encoding=${project.build.sourceEncoding}
          ${jacoco.agent.line}
        </surefire.argLine>
      </properties>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-surefire-plugin</artifactId>
              <configuration>
                <argLine>${surefire.argLine}</argLine>
              </configuration>
              <dependencies>
                <dependency>
                  <groupId>org.jacoco</groupId>
                  <artifactId>org.jacoco.agent</artifactId>
                  <version>${version.jacoco.plugin}</version>
                  <classifier>runtime</classifier>
                </dependency>
              </dependencies>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
  </profiles>

  <repositories>
    <repository>
      <id>central</id>
      <name>Maven Central</name>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
    <repository>
      <id>jboss</id>
      <url>https://repository.jboss.org/nexus/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>central</id>
      <name>Maven Central</name>
      <url>https://repo.maven.apache.org/maven2</url>
    </pluginRepository>
  </pluginRepositories>

</project>
