<?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.stamdata4</groupId>
    <artifactId>sdm-parent</artifactId>
    <version>4.25-SNAPSHOT</version>
    <packaging>pom</packaging>

    <scm>
        <url>scm:svn:https://svn.nspop.dk/svn/libraries/parent/trunk</url>
        <connection>scm:svn:https://svn.nspop.dk/svn/libraries/parent/trunk</connection>
        <developerConnection>scm:svn:https://svn.nspop.dk/svn/libraries/parent/trunk</developerConnection>
    </scm>
    <issueManagement>
        <system>JIRA</system>
        <url>https://jira.nspop.dk</url>
    </issueManagement>
    <ciManagement>
        <system>Jenkins</system>
        <url>https://jenkins.nspop.dk</url>
    </ciManagement>

    <prerequisites>
        <maven>3.0.0</maven>
    </prerequisites>

    <distributionManagement>
      <repository>
        <id>nspop</id>
        <name>NSPOP Nexus</name>
        <url>https://nexus.nspop.dk/nexus/content/groups/public/</url>
      </repository>
    </distributionManagement>

    <repositories>
      <repository>
        <id>nspop</id>
        <name>NSPOP Nexus</name>
        <url>https://nexus.nspop.dk/nexus/content/groups/public/</url>
      </repository>
    </repositories>

    <pluginRepositories>
      <pluginRepository>
        <id>nspop</id>
        <name>NSPOP Nexus</name>
        <url>https://nexus.nspop.dk/nexus/content/groups/public/</url>
      </pluginRepository>
    </pluginRepositories>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <spring.version>3.2.18.RELEASE</spring.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-jdbc</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-webmvc</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
            </dependency>
            <dependency>
                <groupId>dk.sdsd.nsp</groupId>
                <artifactId>nsp-util</artifactId>
                <version>1.0.11</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-all</artifactId>
                <version>1.3</version>
            </dependency>
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>5.1.21</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.12</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
    		    <groupId>org.jacoco</groupId>
      			<artifactId>jacoco-maven-plugin</artifactId>
      			<version>0.8.0</version>
      			<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>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <instrumentation>
                        <excludes>
                            <exclude>dk/oio/**/*</exclude>
                            <exclude>oasis/**/*</exclude>
                            <exclude>org/**/*</exclude>
                            <exclude>dk/nsi/integrationstest/**/*</exclude>
                            <exclude>dk/nsi/**/*Test.class</exclude>
                            <exclude>dk/nsi/jmeter/**/*</exclude>
                            <exclude>dk/nsi/performance/**/*</exclude>
                        </excludes>
                    </instrumentation>
                    <formats>
                        <format>xml</format>
                        <format>html</format>
                    </formats>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>check-license</id>
            <activation>
                <file>
                    <!-- activate profile only in modules which seems to be actually contain source files -->
                    <exists>${basedir}/src/main/java</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.mycila.maven-license-plugin</groupId>
                        <artifactId>maven-license-plugin</artifactId>
                        <version>1.9.0</version>
                        <configuration>
                            <strictCheck>true</strictCheck>
                            <header>${basedir}/standardheader.txt</header>
                            <failIfMissing>true</failIfMissing>
                            <aggregate>true</aggregate>
                            <includes>
                                <include>**/src/**/*.java</include>
                            </includes>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
