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

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.kie</groupId>
    <artifactId>kie-dmn</artifactId>
    <version>7.74.1.Final</version>
  </parent>

  <artifactId>kie-dmn-feel</artifactId>
  <packaging>bundle</packaging><!-- bundle = jar + OSGi metadata -->

  <name>KIE :: Decision Model Notation :: FEEL</name>

  <properties>
    <java.module.name>org.kie.dmn.feel</java.module.name>
    <surefire.forkCount>2</surefire.forkCount>
    <enforcer.skip>true</enforcer.skip>
  </properties>

  <dependencies>
    <!-- Internal dependencies -->
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-dmn-model</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie</groupId>
      <artifactId>kie-dmn-api</artifactId>
    </dependency>

    <!-- External dependencies -->
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr4-runtime</artifactId>
    </dependency>
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr4</artifactId>
      <version>${version.org.antlr4}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.glassfish</groupId>
          <artifactId>javax.json</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
        <groupId>org.drools</groupId>
        <artifactId>drools-compiler</artifactId>
    </dependency>

    <dependency>
      <groupId>com.github.javaparser</groupId>
      <artifactId>javaparser-core</artifactId>
    </dependency>

    <!-- BigMath dependency to obtain BigDecimal advanced math -->
    <dependency>
        <groupId>ch.obermuhlner</groupId>
        <artifactId>big-math</artifactId>
    </dependency>

    <!-- Logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency><!-- For unit test logging: configure in src/test/resources/logback-test.xml -->
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- Tests -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss</groupId>
      <artifactId>jandex</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse</groupId>
      <artifactId>yasson</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.asciidoctor</groupId>
      <artifactId>asciidoctorj</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <testResources>
      <testResource> <!-- as I will be including additional testResource directory, I need to re-explicit the default to Maven (standard Maven behaviour) -->
          <directory>${project.basedir}/src/test/resources</directory>
      </testResource>
      <testResource>
          <directory>${project.basedir}/../</directory>
          <includes>
              <include>ref-dmn-feel-builtin-functions.adoc</include>
          </includes>
          <filtering>false</filtering>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Import-Package>
              org.antlr.v4.runtime.*,
              *
            </Import-Package>
            <Export-Package>
              org.kie.dmn.feel.*
            </Export-Package>
            <_removeheaders>Private-Package</_removeheaders>
          </instructions>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.antlr</groupId>
        <artifactId>antlr4-maven-plugin</artifactId>
        <version>${version.org.antlr4}</version>
        <executions>
          <execution>
            <goals>
              <goal>antlr4</goal>
            </goals>
            <configuration>
              <visitor>true</visitor>
              <listener>false</listener>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

</project>
