<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2016-2019 52°North Initiative for Geospatial Open Source
    Software GmbH

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

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

    <parent>
        <groupId>org.n52</groupId>
        <artifactId>parent</artifactId>
        <version>14</version>
    </parent>

    <groupId>org.n52.wps</groupId>
    <artifactId>javaPS</artifactId>
    <version>1.3.1</version>
    <packaging>pom</packaging>

    <name>52°North javaPS</name>
    <description>Iceland-based WPS implementations</description>
    <url>https://github.com/52North/javaPS</url>

    <modules>
        <module>service</module>
        <module>kvp</module>
        <module>xml</module>
        <module>webapp</module>
        <module>iceland-stream</module>
        <module>engine</module>
    </modules>

    <inceptionYear>2016</inceptionYear>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>autermann</id>
            <name>Christian Autermann</name>
            <email>c.autermann@52north.org</email>
            <organization>${project.organization.name}</organization>
            <organizationUrl>${project.organization.url}</organizationUrl>
            <timezone>GMT+1</timezone>
        </developer>
        <developer>
            <id>bpross-52n</id>
            <name>Benjamin Pross</name>
            <email>b.pross@52north.org</email>
            <organization>${project.organization.name}</organization>
            <organizationUrl>${project.organization.url}</organizationUrl>
            <timezone>GMT+1</timezone>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/52North/javaPS</url>
        <connection>scm:git:git://github.com/52North/javaPS.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/52North/javaPS.git</developerConnection>
      <tag>v1.3.1</tag>
    </scm>

    <issueManagement>
        <system>GitHub issues</system>
        <url>https://github.com/52North/javaPS/issues?state=open</url>
    </issueManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <timestamp>${maven.build.timestamp}</timestamp>
        <maven.build.timestamp.format>yyyyMMdd-HHmm</maven.build.timestamp.format>
        <version.spring>5.1.3.RELEASE</version.spring>
        <version.slf4j>1.7.26</version.slf4j>
        <version.log4j>2.3</version.log4j>
        <version.arctic.sea>6.0.0</version.arctic.sea>
        <version.xmlbeans>3.1.0</version.xmlbeans>
        <version.test.processes>1.3.0</version.test.processes>
        <version.iohandler>1.3.0</version.iohandler>
        <version.common.xml>2.6.1</version.common.xml>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.n52.arctic-sea</groupId>
                <artifactId>shetland</artifactId>
                <version>${version.arctic.sea}</version>
                <exclusions>
                    <exclusion>
                        <artifactId>joda-time</artifactId>
                        <groupId>joda-time</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.n52.arctic-sea</groupId>
                <artifactId>janmayen</artifactId>
                <version>${version.arctic.sea}</version>
                <exclusions>
                    <exclusion>
                        <artifactId>joda-time</artifactId>
                        <groupId>joda-time</groupId>
                    </exclusion>
				    <exclusion>
				    	<groupId>com.fasterxml.jackson.core</groupId>
				    	<artifactId>jackson-core</artifactId>
				    </exclusion>
				    <exclusion>
				    	<groupId>com.fasterxml.jackson.core</groupId>
				    	<artifactId>jackson-databind</artifactId>
				    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.n52.arctic-sea</groupId>
                <artifactId>svalbard</artifactId>
                <version>${version.arctic.sea}</version>
            </dependency>
            <dependency>
                <groupId>org.n52.arctic-sea</groupId>
                <artifactId>iceland</artifactId>
                <version>${version.arctic.sea}</version>
                <exclusions>
                    <exclusion>
                        <artifactId>jackson-core</artifactId>
                        <groupId>com.fasterxml.jackson.core</groupId>
                    </exclusion>
				    <exclusion>
				    	<groupId>com.fasterxml.jackson.core</groupId>
				    	<artifactId>jackson-databind</artifactId>
				    </exclusion>
                    <exclusion>
                        <artifactId>joda-time</artifactId>
                        <groupId>joda-time</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.n52.arctic-sea</groupId>
                <artifactId>faroe-annotations</artifactId>
                <version>${version.arctic.sea}</version>
            </dependency>
            <dependency>
                <groupId>org.n52.arctic-sea</groupId>
                <artifactId>faroe-utils</artifactId>
                <version>${version.arctic.sea}</version>
            </dependency>
            <dependency>
                <groupId>org.n52.arctic-sea</groupId>
                <artifactId>faroe-json</artifactId>
                <version>${version.arctic.sea}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>service</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>engine</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>kvp</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>xml</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>iceland-wps</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>iceland-stream</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>net.sourceforge.pjl-comp-filter</groupId>
                <artifactId>pjl-comp-filter</artifactId>
                <version>1.7</version>
                <type>jar</type>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>com.thetransactioncompany</groupId>
                <artifactId>cors-filter</artifactId>
                <version>2.4</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>se.jiderhamn</groupId>
                <artifactId>classloader-leak-prevention</artifactId>
                <version>1.15.2</version>
                <scope>runtime</scope>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-all</artifactId>
                <version>1.3</version>
            </dependency>

            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-webmvc</artifactId>
                <version>${version.spring}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
                <version>${version.spring}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-beans</artifactId>
                <version>${version.spring}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${version.spring}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${version.spring}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${version.slf4j}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${version.slf4j}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>${version.slf4j}</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${version.log4j}</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${version.log4j}</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-web</artifactId>
                <version>${version.log4j}</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-slf4j-impl</artifactId>
                <version>${version.log4j}</version>
                <scope>runtime</scope>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.9.9</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>27.0-jre</version>
                <exclusions>
                   <exclusion>
                       <groupId>com.google.code.findbugs</groupId>
                       <artifactId>jsr305</artifactId>
                   </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>fluent-hc</artifactId>
                <version>4.5.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.5.6</version>
                <exclusions>
                    <exclusion>
                        <groupId>commons-codec</groupId>
                        <artifactId>commons-codec</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpcore</artifactId>
                <version>4.4.10</version>
                <scope>test</scope>
            </dependency>
            <dependency>
        	    <groupId>org.mockito</groupId>
        	    <artifactId>mockito-core</artifactId>
        	    <version>2.27.0</version>
        	    <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.n52.wps</groupId>
                <artifactId>52n-xml-wps-v20</artifactId>
                <version>${version.common.xml}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.n52.sensorweb</groupId>
                <artifactId>52n-xml-ows-v20</artifactId>
                <version>${version.common.xml}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.xmlbeans</groupId>
                <artifactId>xmlbeans</artifactId>
                <version>${version.xmlbeans}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>net.sf.saxon</groupId>
                <artifactId>Saxon-HE</artifactId>
                <version>9.6.0-7</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.xmlmatchers</groupId>
                <artifactId>xml-matchers</artifactId>
                <version>1.0-RC1</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>2.2.12</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.1.0</version>
            </dependency>
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>1</version>
            </dependency>

            <dependency>
                <groupId>stax</groupId>
                <artifactId>stax-api</artifactId>
                <version>1.0.1</version>
            </dependency>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>1.11</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.6</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-configuration2</artifactId>
                <version>2.3</version>
            </dependency>

            <dependency>
            	<groupId>xml-apis</groupId>
            	<artifactId>xml-apis</artifactId>
            	<version>1.4.01</version>
            	<scope>runtime</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </testResource>
        </testResources>
        <plugins>
            
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>groovy-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <source>project.properties['currentYearDynamic'] = java.time.Year.now().toString()</source>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <inherited>false</inherited>
                <configuration>
                    <aggregate>true</aggregate>
                    <header>etc/license-header.txt</header>
                    <includes>
                        <include>**/*.java</include>
                        <include>**/*.xml</include>
                    </includes>
                    <strictCheck>true</strictCheck>
                    <properties>
                        <year>${project.inceptionYear}-${currentYearDynamic}</year>
                    </properties>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                </configuration>
                <executions>
                    <execution>
                        <id>format-license-headers</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    
   <profiles>
        <profile>
            <id>jdk8</id>
            <activation>
                <jdk>1.8</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jasig.maven</groupId>
                        <artifactId>maven-notice-plugin</artifactId>
                        <configuration>
                            <licenseMapping>
                                <param>http://52north.github.io/cdn/licenses/license-mappings.xml</param>
                            </licenseMapping>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>since-jdk9</id>
            <activation>
                <jdk>[9,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jasig.maven</groupId>
                        <artifactId>maven-notice-plugin</artifactId>
                        <configuration>
                            <licenseMapping>
                                <param>http://52north.github.io/cdn/licenses/license-mappings-jdk9.xml</param>
                            </licenseMapping>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>create-license-list</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <version>1.5</version>
                        <configuration>
                            <useMissingFile>true</useMissingFile>
                            <fileTemplate>etc/license-as-csv.ftl</fileTemplate>
                        </configuration>
                        <executions>
                            <execution>
                                <id>first</id>
                                <goals>
                                    <goal>aggregate-add-third-party</goal>
                                </goals>
                                <phase>generate-resources</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
