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

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

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

  <name>KIE :: Decision Model Notation :: Model</name>
  
  <properties>
    <java.module.name>org.kie.dmn.model</java.module.name>
  </properties>

  <dependencies>
    <dependency>
      <groupId>jakarta.xml.bind</groupId>
      <artifactId>jakarta.xml.bind-api</artifactId>
      <scope>provided</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.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>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <scope>test</scope>
    </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>
    <dependency>
      <groupId>org.jboss</groupId>
      <artifactId>jandex</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse</groupId>
      <artifactId>yasson</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Export-Package>
              org.kie.dmn.model.*
            </Export-Package>
            <Import-Package>
              javax.xml,
              javax.xml.stream,
              javax.xml.namespace,
              com.thoughtworks.xstream.mapper;resolution:=optional,
              com.thoughtworks.xstream.converters;resolution:=optional,
              com.thoughtworks.xstream.converters.basic;resolution:=optional,
              com.thoughtworks.xstream.converters.collections;resolution:=optional,
              com.thoughtworks.xstream.converters.extended;resolution:=optional,
              com.thoughtworks.xstream.converters.enums;resolution:=optional,
              com.thoughtworks.xstream.converters.javabean;resolution:=optional,
              com.thoughtworks.xstream.converters.reflection;resolution:=optional,
              com.thoughtworks.xstream.converters.time;resolution:=optional
            </Import-Package>
            <!-- <Bundle-Activator> Activator if needed </Bundle-Activator> -->
            <_removeheaders>Private-Package</_removeheaders>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>sonarcloud-analysis</id>
      <properties>
        <!-- Excluding the XML DTOs from duplicate statistics. These naturally presents duplication due to the representation of the several versions of the DMN standard. -->
        <sonar.cpd.exclusions>**/kie/dmn/model/v1_*/**</sonar.cpd.exclusions>
      </properties>
    </profile>
  </profiles>
</project>