<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.n52.sensorweb-server.helgoland-adapters</groupId>
        <artifactId>helgoland-adapters-parent</artifactId>
        <version>3.0.0</version>
    </parent>
    <artifactId>helgoland-adapters-webapp</artifactId>
    <packaging>war</packaging>
    <name>Sensor Web Server Helgoland Adapters - Webapp</name>

    <properties>
        <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
        <config.logger.fileappender.filepath>${catalina.base:-.}/logs/${project.build.finalName}</config.logger.fileappender.filepath>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.n52.arctic-sea</groupId>
            <artifactId>iceland</artifactId>
        </dependency>
          <dependency>
            <groupId>org.n52.arctic-sea</groupId>
            <artifactId>faroe-annotations</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.n52.arctic-sea</groupId>
            <artifactId>janmayen</artifactId>
        </dependency>
        <dependency>
            <groupId>org.n52.arctic-sea</groupId>
            <artifactId>bjornoya</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.n52.arctic-sea</groupId>
            <artifactId>svalbard-xmlbeans</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.n52.arctic-sea</groupId>
            <artifactId>svalbard-odata</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.n52.sensorweb-server.helgoland</groupId>
            <artifactId>helgoland-rest</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.n52.sensorweb-server.helgoland</groupId>
            <artifactId>helgoland-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.n52.sensorweb-server.helgoland</groupId>
            <artifactId>helgoland-io</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.n52.arctic-sea</groupId>
                    <artifactId>faroe-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.n52.sensorweb-server.dao-impl</groupId>
            <artifactId>dao-impl-dao</artifactId>
        </dependency>
        <dependency>
            <groupId>org.n52.sensorweb-server.dao-impl</groupId>
            <artifactId>dao-impl-repo</artifactId>
            <scope>runtime</scope>
			<exclusions>
				 <exclusion>
                    <groupId>org.hibernate</groupId>
                    <artifactId>hibernate-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpcore</artifactId>
                </exclusion>
				<exclusion>
					<groupId>org.osgi</groupId>
					<artifactId>org.osgi.core</artifactId>
				</exclusion>
                <exclusion>
                    <groupId>org.hibernate.orm</groupId>
                    <artifactId>hibernate-*</artifactId>
                </exclusion>
			</exclusions>
        </dependency>
        <dependency>
            <groupId>org.n52.sensorweb-server.dao-impl</groupId>
            <artifactId>dao-impl-repos</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.n52.sensorweb-server.db-model</groupId>
            <artifactId>db-model-entities</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.n52.sensorweb-server.db-model</groupId>
            <artifactId>db-model-mappings</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.n52.sensorweb-server.db-model</groupId>
            <artifactId>db-model-types</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>helgoland-adapters-harvest</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>helgoland-adapters-connector</artifactId>
            <scope>runtime</scope>
        </dependency>
         <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>helgoland-adapters-common</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>helgoland-adapters-config</artifactId>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>helgoland-adapters-http</artifactId>
          <scope>runtime</scope>
        </dependency>
         <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>helgoland-adapters-sos</artifactId>
            <scope>runtime</scope>
        </dependency>
      <!--
         <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>helgoland-adapters-sensorthings</artifactId>
            <scope>runtime</scope>
        </dependency>
        -->
        <!-- Spring -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-oxm</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- Spring Boot -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <scope>runtime</scope>
            <exclusions>
              <exclusion>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-to-slf4j</artifactId>
              </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- Spring Data -->
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-jpa</artifactId>
        </dependency>
        <dependency>
			<groupId>com.cosium.spring.data</groupId>
			<artifactId>spring-data-jpa-entity-graph</artifactId>
		</dependency>
		 <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <!-- drop-in replacement for JCL -->
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <!-- drop-in replacement for log4j -->
            <groupId>org.slf4j</groupId>
            <artifactId>log4j-over-slf4j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>runtime</scope>
        </dependency>
        <!-- Jackson -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        
        <dependency>
            <groupId>jakarta.persistence</groupId>
            <artifactId>jakarta.persistence-api</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.platform</groupId>
            <artifactId>jakarta.jakartaee-api</artifactId>
            <scope>provided</scope>
            <version>9.1.0</version>
        </dependency>
        <dependency>
            <groupId>jakarta.persistence</groupId>
            <artifactId>jakarta.persistence-api</artifactId>
            <scope>provided</scope>
        </dependency>
        
		<dependency>
            <groupId>org.codehaus.janino</groupId>
            <artifactId>janino</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjtools</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents.client5</groupId>
            <artifactId>httpclient5</artifactId>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>net.postgis</groupId>
            <artifactId>postgis-jdbc</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>postgresql</groupId>
                    <artifactId>postgresql</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>ch.qos.logback</groupId>
                    <artifactId>logback</artifactId>
                </exclusion>
            </exclusions>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.thetransactioncompany</groupId>
            <artifactId>cors-filter</artifactId>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.artifactId}</finalName>
        <outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <configuration>
                        <artifactItems>
                            <artifactItem>
                                <groupId>org.n52.sensorweb-server.helgoland</groupId>
                                <artifactId>helgoland-rest</artifactId>
                                <includes>api-doc/**</includes>
                                <outputDirectory>${webappDirectory}</outputDirectory>
                                <overWrite>false</overWrite>
                            </artifactItem>
                        </artifactItems>
                        <overWriteReleases>false</overWriteReleases>
                        <usedDependencies>
                            <dependency>com.fasterxml.jackson.core:jackson-core</dependency>
                        </usedDependencies>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>3.5.1</version>
                    <configuration>
                        <filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
                        <failOnMissingWebXml>false</failOnMissingWebXml>
                        <webResources>
                            <resource>
                                <directory>src/main/resources</directory>
                                <filtering>true</filtering>
                                <targetPath>WEB-INF/classes</targetPath>
                            </resource>
                        </webResources>
                    </configuration>
                </plugin>
                <!-- 
                <plugin>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-maven-plugin</artifactId>
                    <version>9.4.28.v20200408</version>
                    <configuration>
                        <stopKey>C</stopKey>
                        <stopPort>34343</stopPort>
                        <scanIntervalSeconds>0</scanIntervalSeconds>
                        <reload>manual</reload>
                        <webAppConfig>
                            <contextPath>/</contextPath>
                            <allowDuplicateFragmentNames>true</allowDuplicateFragmentNames>
                            <extraClasspath>/target/classes/;${project.build.outputDirectory};../sos-proxy/target/classes;../series-dao/target/classes;../../io/target/classes;../../rest/target/classes;</extraClasspath>
                        </webAppConfig>
                        <scanTargets>
                            <scanTarget>/target/classes/</scanTarget>
                            <scanTarget>../series-dao/target/classes</scanTarget>
                            <scanTarget>../sos-proxy/target/classes</scanTarget>
                            <scanTarget>../../../io/target/classes</scanTarget>
                            <scanTarget>../../../rest/target/classes</scanTarget>
                        </scanTargets>
                        <systemProperties>
                            <systemProperty>
                                <name>catalina.base</name>
                                <value>${project.build.directory}</value>
                            </systemProperty>
                        </systemProperties>
                    </configuration>
                </plugin>
                 -->
            </plugins>
        </pluginManagement>
    </build>

</project>
