<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2018-2020 toop.eu

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>eu.toop</groupId>
    <artifactId>toop-connector-parent-pom</artifactId>
    <version>0.10.8</version>
  </parent>
  <artifactId>toop-connector</artifactId>
  <packaging>bundle</packaging>
  <name>toop-connector</name>
  <description>Contains the TOOP Connector business logic</description>
  <url>https://github.com/toop4eu/toop-connector/toop-connector</url>
  <inceptionYear>2018</inceptionYear>
  
  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  
  <organization>
    <name>toop.eu</name>
    <url>http://www.toop.eu</url>
  </organization>
  
  <developers>
    <developer>
      <id>philip</id>
      <name>Philip Helger</name>
      <email>ph(at)helger.com</email>
    </developer>
  </developers>
  
  <dependencies>
    <dependency>
      <groupId>com.helger</groupId>
      <artifactId>ph-servlet</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger</groupId>
      <artifactId>ph-web</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger</groupId>
      <artifactId>ph-xservlet</artifactId>
    </dependency>
    <dependency>
      <groupId>eu.toop</groupId>
      <artifactId>toop-commons</artifactId>
    </dependency>
    <dependency>
      <groupId>eu.toop</groupId>
      <artifactId>toop-schematron</artifactId>
    </dependency>
    <dependency>
      <groupId>eu.toop</groupId>
      <artifactId>toop-kafka-client</artifactId>
    </dependency>
    <dependency>
      <groupId>eu.toop</groupId>
      <artifactId>toop-connector-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger</groupId>
      <artifactId>peppol-smp-client</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Test only -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
  <build>
    <resources>
      <!-- Don't specify the targetPath because this leads to a broken JAR file 
        in combination with the bundle plugin (absolute file paths in ZIP file) -->
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>**/*.properties</include>
        </includes>
      </resource>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>**/*.properties</exclude>
        </excludes>
      </resource>
    </resources>
    
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Automatic-Module-Name>eu.toop.connector.app</Automatic-Module-Name>
            <Export-Package>eu.toop.connector.app.*</Export-Package>
            <Import-Package>!javax.annotation.*,*</Import-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/LICENSE</exclude>
            <exclude>**/NOTICE</exclude>
            <exclude>src/test/resources/existing-smm-mappings.xml</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
