<!--
  ~ Copyright (c) 2010 - 2015 Norwegian Agency for Pupblic Government and eGovernment (Difi)
  ~
  ~ This file is part of Oxalis.
  ~
  ~ Licensed under the EUPL, Version 1.1 or – as soon they will be approved by the European Commission
  ~ - subsequent versions of the EUPL (the "Licence"); You may not use this work except in compliance with the Licence.
  ~
  ~ You may obtain a copy of the Licence at:
  ~
  ~ https://joinup.ec.europa.eu/software/page/eupl5
  ~
  ~  Unless required by applicable law or agreed to in writing, software distributed under the Licence
  ~  is distributed on an "AS IS" basis,
  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licence for the specific language governing permissions and limitations under the Licence.
  ~
  -->

<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>no.difi.oxalis</groupId>
        <artifactId>oxalis</artifactId>
        <version>4.0.0-BETA1</version>
    </parent>

    <artifactId>oxalis-commons</artifactId>

    <name>Oxalis commons</name>
    <description>
        Holds the stuff which is common for both inbound and outbound messages and should be shared between them.
    </description>

    <dependencies>

        <!-- Oxalis -->
        <dependency>
            <groupId>no.difi.oxalis</groupId>
            <artifactId>oxalis-api</artifactId>
            <version>${project.version}</version>
        </dependency>


        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Google Guice -->
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
        </dependency>

        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
        </dependency>

        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>

        <!-- Apache commons -->
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>

        <!-- Only used for testing / validating the SimpleMessageRepository JSON output -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.2</version>
            <scope>test</scope>
        </dependency>

        <!-- Only used for testing -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>${mysql.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4</version>
        </dependency>

        <!-- Difi commons -->
        <dependency>
            <groupId>no.difi.commons</groupId>
            <artifactId>commons-sbdh</artifactId>
            <version>0.9.1</version>
        </dependency>

        <!-- Only used for testing -->
        <dependency>
            <groupId>no.difi.oxalis</groupId>
            <artifactId>oxalis-test-impl</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>


        <!-- PEPPOL transport receipts based upon REM evidence -->
        <dependency>
            <groupId>no.difi.vefa</groupId>
            <artifactId>peppol-evidence</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
        </dependency>


    </dependencies>

    <build>
        <resources>
            <!-- The two resource blocks are required due to the fact that we have
            binary stuff, which should not be filtered, together with stuff, which
            should be filtered -->
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <excludes>
                    <exclude>**/*.jks</exclude>
                    <exclude>**/*.key</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*.jks</include>
                    <include>**/*.key</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <version>0.8.0</version>
                <executions>
                    <!-- Builds the JAXB stuff for looking up data in the SMP -->
                    <execution>
                        <id>smp</id>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <schemaDirectory>src/main/resources/smp</schemaDirectory>
                            <generatePackage>org.busdox.smp</generatePackage>
                            <generateDirectory>${project.build.directory}/generated-sources/xjc-smp</generateDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
