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

    Logspace
    Copyright (c) 2015 Indoqa Software Design und Beratung GmbH. All rights reserved.
    This program and the accompanying materials are made available under the terms of
    the Eclipse Public License Version 1.0, which accompanies this distribution and
    is available at http://www.eclipse.org/legal/epl-v10.html.

-->
<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>
  <packaging>jar</packaging>

  <parent>
    <groupId>io.logspace</groupId>
    <artifactId>logspace</artifactId>
    <version>0.3.0</version>
  </parent>

  <artifactId>logspace-hq-webapp</artifactId>

  <name>Logspace HQ Webapp</name>

  <dependencies>
    <!-- Indoqa Boot -->
    <dependency>
      <groupId>com.indoqa</groupId>
      <artifactId>indoqa-boot</artifactId>
    </dependency>

    <!-- Commons dependencies -->
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>

    <!-- Logging: slf4j -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <!-- Logging: log4j2 -->
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <scope>runtime</scope>      
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <scope>runtime</scope>      
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-web</artifactId>
      <scope>runtime</scope>      
    </dependency>

    <!-- Logging: Bind log4j to slf4j -->
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
      <scope>runtime</scope>      
    </dependency>

    <!-- Logging: Commons Logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <scope>runtime</scope>      
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Internal -->
    <dependency>
      <groupId>io.logspace</groupId>
      <artifactId>logspace-hq-rest</artifactId>
    </dependency>
    
    <!-- Jar-in-Jar -->
    <dependency>
      <groupId>com.indoqa</groupId>
      <artifactId>jar-in-jar</artifactId>
      <scope>runtime</scope>
    </dependency>    

    <!-- Test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>src/main/assembly/runnable-jar.xml</descriptor>
          </descriptors>
          <archive>
            <manifest>
              <mainClass>com.indoqa.jarinjar.Main</mainClass>
            </manifest>
            <manifestEntries>
              <Implementation-Build>${project.version}</Implementation-Build>
              <delegatedMainClass>io.logspace.hq.webapp.LogspaceHq</delegatedMainClass>
            </manifestEntries>
          </archive>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <configuration>
          <mainClass>io.logspace.hq.webapp.config.LogspaceHq</mainClass>
        </configuration>
      </plugin>    
    </plugins>
  </build>
</project>
