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

  <parent>
    <groupId>org.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>36</version>
    <relativePath/>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <groupId>org.kie.kogito</groupId>
  <artifactId>kogito-runtimes</artifactId>
  <version>0.14.0</version>
  <packaging>pom</packaging>

  <name>Kogito Runtimes</name>
  <description>Kogito Runtimes</description>

  <url>http://kogito.kie.org</url>
  <inceptionYear>2019</inceptionYear>
  <organization>
    <name>JBoss by Red Hat</name>
    <url>http://www.jboss.org/</url>
  </organization>

  <licenses>
    <license>
      <name>Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:https://github.com/kiegroup/kogito-runtimes.git</connection>
    <developerConnection>scm:git:git@github.com:kiegroup/kogito-runtimes.git</developerConnection>
    <url>https://github.com/kiegroup/kogito-runtimes</url>
  </scm>

  <developers>
    <developer>
      <name>All developers are listed in the KIE GitHub organization</name>
      <url>https://github.com/orgs/kiegroup/people</url>
    </developer>
  </developers>

  <properties>
    <version.jdk>11</version.jdk>
    <maven.compiler.release>8</maven.compiler.release>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <checkstyle.header.template>.*</checkstyle.header.template>
    <checkstyle.header.extensions>java</checkstyle.header.extensions>

    <jacoco.agent.argLine/>
    <!--
      JaCoCo coverage data file location. Using a single file for appending in the project's root directory makes it
      possible to measure cross-module test coverage -->
    <jacoco.exec.file>${project.root.dir}/target/jacoco.exec</jacoco.exec.file>
    <!--suppress UnresolvedMavenProperty -->
    <project.root.dir>${maven.multiModuleProjectDirectory}</project.root.dir>
    <tests.surefire.include>**/*Test.java</tests.surefire.include>
    <tests.failsafe.include>**/*IT.java</tests.failsafe.include>
  </properties>

  <!-- distributionManagement section -->
  <distributionManagement>
    <repository>
      <id>jboss-releases-repository</id>
      <name>JBoss Releases Repository</name>
      <url>https://origin-repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>jboss-snapshots-repository</id>
      <name>JBoss Snapshot Repository</name>
      <url>https://origin-repository.jboss.org/nexus/content/repositories/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>

  <repositories>
    <!-- Bootstrap repository to locate the parent pom when the parent pom
      has not been build locally. -->
    <repository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>https://repository.jboss.org/nexus/content/groups/public/</url>
      <layout>default</layout>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
      </snapshots>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <!-- Duplicating the Maven Central repository here (as it is already coming from Super POM) makes the build much faster,
           as the Maven Central is now treated as the first (default) repository (because it is before the JBoss.org one).
           Artifacts with release (fixed) versions are being downloaded primarily from there. Without the central being the
           first repository the JBoss.org Nexus would be contacted first and since it is quite slow it slows down the build.
           We use JBoss.org repo only to download our SNAPSHOTs. -->
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
      <layout>default</layout>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
    <pluginRepository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Repository Group</name>
      <url>https://repository.jboss.org/nexus/content/groups/public/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>


  <modules>
    <module>kogito-build-parent</module>
    <module>kogito-bom</module>
    <module>kogito-test-utils</module>
    <module>api</module>
    <module>drools</module>
    <module>jbpm</module>
    <module>kogito-cloud-services</module>
    <module>kogito-codegen</module>
    <module>kogito-springboot</module>
    <module>addons</module>
    <module>kogito-maven-plugin</module>
    <module>kogito-quarkus-extension</module>
    <module>archetypes</module>
    <module>grafana-api</module>
    <module>integration-tests</module>
    <module>jenkins-tests</module>
  </modules>

  <profiles>
    <profile>
      <activation>
        <property>
          <name>env.ghprbPullId</name>
        </property>
      </activation>
      <id>sonarcloud-analysis-pull-request</id>
      <properties>
        <sonar.pullrequest.provider>GitHub</sonar.pullrequest.provider>
        <!--suppress UnresolvedMavenProperty -->
        <sonar.pullrequest.branch>${env.ghprbSourceBranch}</sonar.pullrequest.branch>
        <!--suppress UnresolvedMavenProperty -->
        <sonar.pullrequest.key>${env.ghprbPullId}</sonar.pullrequest.key>
        <!--suppress UnresolvedMavenProperty -->
        <sonar.pullrequest.base>${env.ghprbTargetBranch}</sonar.pullrequest.base>
        <!--suppress UnresolvedMavenProperty -->
        <sonar.pullrequest.github.repository>${env.ghprbPullLink}</sonar.pullrequest.github.repository>
      </properties>
    </profile>
  </profiles>
</project>
