<?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</groupId>
    <artifactId>cprsubscriber</artifactId>
    <version>1.13</version>
    <packaging>jar</packaging>

    <name>CPR Subscriber</name>
    <description>Utility for subscribing to CPR changes</description>

    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <mysql.version>5.1.44</mysql.version>
        <log4j.version>1.2.17</log4j.version>
        <commons-logging.version>1.2</commons-logging.version>
        <slf4j.version>1.7.32</slf4j.version>
        <!-- 5.2.18.RELEASE is the latest version supported by Wildfly 8.2 -->
        <springframework.version>5.2.18.RELEASE</springframework.version>
    </properties>

    <scm>
        <connection>scm:svn:https://svn.nspop.dk/svn/libraries/cpr-subscriber/tags/cprsubscriber-1.13</connection>
    </scm>

    <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>

    <dependencies>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${springframework.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-jcl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${springframework.version}</version>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.29</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.flywaydb</groupId>
            <artifactId>flyway-core</artifactId>
            <version>8.0.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.200</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${springframework.version}</version>
            <scope>test</scope>
        </dependency>


    </dependencies>

  <build>
       <plugins>
           <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/cpr-subscriber/tags</tagBase>
                   <tagNameFormat>cprsubscriber-@{project.version}</tagNameFormat>
                   <releaseProfiles>production</releaseProfiles>
                   <goals>package</goals>
               </configuration>
           </plugin>
            <plugin>
               <inherited>false</inherited>
               <groupId>com.mycila</groupId>
               <artifactId>license-maven-plugin</artifactId>
               <version>3.0</version>
               <configuration>
                   <strictCheck>true</strictCheck>
                   <header>${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>verify</phase>
                       <goals>
                           <goal>format</goal>
                       </goals>
                   </execution>
               </executions>
            </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-jar-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
       </plugins>
  </build>
</project>
