<?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>
    <groupId>dk.sds.nsp.maternity</groupId>
    <artifactId>facade</artifactId>
    <version> 1.0.8-SNAPSHOT</version>

    <properties>
        <log4j.version>1.2.17</log4j.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <resteasy.version>3.13.2.Final</resteasy.version>
        <jackson.version>2.10.5</jackson.version>
        <apachecxf.version>3.3.7</apachecxf.version>
        <flatten-maven-plugin.version>1.2.5</flatten-maven-plugin.version>
        <junit.version>5.7.0</junit.version>
        <mockito.version>3.5.13</mockito.version>
        <version.dk.s4.hl7>2.1.0</version.dk.s4.hl7>
        <version.dk.nsi.hsuid>1.1.12</version.dk.nsi.hsuid>
        <version.seal>2.5.7</version.seal>
        <oiosaml2.version>2.2.1</oiosaml2.version>
        <hapifhir.version>5.1.0</hapifhir.version>
        <cdaparser.version>1.0.9-SNAPSHOT</cdaparser.version>
        <test.exclude>**/Integrationstest</test.exclude>
    </properties>

    <packaging>pom</packaging>

    <repositories>
        <repository>
            <id>nsp-nexus-public</id>
            <name>NSP public</name>
            <url>https://nexus.nspop.dk/nexus/content/groups/public/</url>
        </repository>
        <repository>
            <id>nsp-nexus-releases</id>
            <name>NSP releases</name>
            <url>https://nexus.nspop.dk/nexus/content/repositories/releases/</url>
        </repository>
    </repositories>

    <scm>
        <connection>scm:svn:https://svn.nspop.dk/svn/libraries/gm/api/trunk</connection>
    </scm>

    <modules>
        <module>apis</module>
        <module>cfg</module>
        <module>integrationstest</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxrs</artifactId>
            <version>${resteasy.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- NSP SLA log-->
        <dependency>
            <groupId>dk.sdsd.nsp</groupId>
            <artifactId>nsp-util</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
            <version>1.0.11</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>flatten-maven-plugin</artifactId>
            <version>${flatten-maven-plugin.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.10</version>
                <configuration>
                    <projectNameTemplate>gm_api-[artifactId]</projectNameTemplate>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M5</version>
                <configuration>
                    <argLine>-Dfile.encoding=UTF-8</argLine>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <checkModificationExcludes>
                        <checkModificationExclude>*.project</checkModificationExclude>
                        <checkModificationExclude>*.classpath</checkModificationExclude>
                        <checkModificationExclude>**/*.iml</checkModificationExclude>
                        <checkModificationExclude>*.idea</checkModificationExclude>
                        <checkModificationExclude>**/*.log</checkModificationExclude>
                    </checkModificationExcludes>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagBase>https://svn.nspop.dk/svn/libraries/gm/api/tags</tagBase>
                    <tagNameFormat>gm-api-@{project.version}</tagNameFormat>
                    <releaseProfiles>production</releaseProfiles>
                    <goals>package</goals>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <inherited>false</inherited>
                <configuration>
                    <strictCheck>true</strictCheck>
                    <header>${project.basedir}/LICENSE</header>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>true</aggregate>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                    <includes>
                        <include>**/src/**/*.java</include>
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>
</project>
