<?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.nsi.minlog2</groupId>
    <artifactId>minlog-producer</artifactId>
    <version>1.0.2.RC</version>
    <packaging>pom</packaging>

    <name>MinLog Producer</name>
    <description>Klient til registrering af minlog entries via NSP's Kafka kø</description>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
    </properties>

    <repositories>
        <repository>
            <id>nsp-nexus</id>
            <name>NSP repository</name>
            <url>https://nexus.nspop.dk/nexus/content/groups/public/</url>
        </repository>
    </repositories>

    <scm>
        <connection>scm:svn:https://svn.nspop.dk/svn/libraries/minlog-producer/tags/release-1.0.2.RC</connection>
    </scm>

    <modules>
        <module>minlog-producer-api</module>
        <module>minlog-producer-registration</module>
		<module>integrationtest</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-junit-jupiter</artifactId>
                <version>3.3.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-clients</artifactId>
                <version>1.1.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>dk.sds.nsp.kafka</groupId>
                <artifactId>kafka-clients</artifactId>
                <version>1.1.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-mapper-asl</artifactId>
                <version>1.9.13</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </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/minlog-producer/tags</tagBase>
                    <tagNameFormat>release-@{project.version}</tagNameFormat>
                    <releaseProfiles>production</releaseProfiles>
                    <goals>package</goals>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.5</version>
                <!-- configuration>
                    <excludes>
                        <exclude>org/**/*</exclude>
                    </excludes>
                </configuration -->
                <executions>
                    <execution>
                        <id>pre-unit-test</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>post-unit-test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </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>
