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

    Copyright (C) 2018-2020 toop.eu

    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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.helger</groupId>
    <artifactId>parent-pom</artifactId>
    <version>1.11.1</version>
  </parent>

  <groupId>eu.toop</groupId>
  <artifactId>toop-simulator-ng</artifactId>
  <version>2.0.0-beta4</version>
  <packaging>jar</packaging>

  <name>toop-simulator-ng</name>
  <description>Base POM to build the TOOP Simulator NG</description>
  <url>http://github.com/toop4eu/toop-simulator-ng</url>

  <properties>
    <toop.version>2.0.0-beta4</toop.version>
    <ph-xsds.version>2.2.6</ph-xsds.version>
  </properties>

  <inceptionYear>2020</inceptionYear>

  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:toop4eu/toop-simulator-ng.git</connection>
    <developerConnection>scm:git:git@github.com:toop4eu/toop-simulator-ng.git</developerConnection>
    <url>http://github.com/toop4eu/toop-simulator-ng</url>
    <tag>toop-simulator-ng-2.0.0-beta4</tag>
  </scm>

  <organization>
    <name>toop.eu</name>
    <url>http://www.toop.eu</url>
  </organization>

  <developers>
    <developer>
      <id>yerlibilgin</id>
      <name>Muhammet Yildiz</name>
      <email>myildiz83(at)gmail.com</email>
    </developer>
  </developers>

  <dependencies>
    <dependency>
      <groupId>com.helger</groupId>
      <artifactId>ph-commons</artifactId>
      <version>9.4.4</version>
    </dependency>

    <dependency>
      <groupId>com.sun.activation</groupId>
      <artifactId>jakarta.activation</artifactId>
      <version>1.2.2</version>
    </dependency>

    <dependency>
      <groupId>eu.toop</groupId>
      <artifactId>toop-regrep</artifactId>
      <version>${toop.version}</version>
    </dependency>

    <dependency>
      <groupId>eu.toop</groupId>
      <artifactId>tc-web-api</artifactId>
      <version>${toop.version}</version>
    </dependency>

    <dependency>
      <groupId>eu.toop</groupId>
      <artifactId>toop-edm</artifactId>
      <version>${toop.version}</version>
    </dependency>

    <dependency>
      <groupId>eu.toop</groupId>
      <artifactId>toop-commons</artifactId>
      <version>${toop.version}</version>
    </dependency>

    <dependency>
      <groupId>eu.toop</groupId>
      <artifactId>dsd-api</artifactId>
      <version>${toop.version}</version>
    </dependency>

    <dependency>
      <groupId>eu.toop</groupId>
      <artifactId>tc-api</artifactId>
      <version>${toop.version}</version>
    </dependency>

    <!-- Logging -->
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>2.13.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
      <version>2.13.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-web</artifactId>
      <version>2.13.3</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jul-to-slf4j</artifactId>
      <version>1.7.30</version>
    </dependency>
    <dependency>
      <groupId>com.typesafe</groupId>
      <artifactId>config</artifactId>
      <version>1.4.0</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
    </dependency>

    <dependency>
      <groupId>com.ftpix</groupId>
      <artifactId>sherdog-parser</artifactId>
      <version>2.12</version>
    </dependency>

    <dependency>
      <groupId>eu.toop</groupId>
      <artifactId>toop-demoui-dplib</artifactId>
      <version>${toop.version}</version>
    </dependency>

    <dependency>
      <groupId>com.helger</groupId>
      <artifactId>ph-oton-api</artifactId>
      <version>8.2.4</version>
    </dependency>
    <dependency>
      <groupId>com.helger</groupId>
      <artifactId>ph-oton-jetty</artifactId>
      <version>8.2.4</version>
    </dependency>

    <!-- exlude slf4j-simple -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- JUnit 4 for testing -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>${basedir}/src/main/webapp</directory>
        <targetPath>${project.build.directory}/webapp-classes</targetPath>
        <includes>
          <include>WEB-INF/**/*</include>
        </includes>
      </resource>
      <resource>
        <directory>${basedir}/src/test/resources</directory>
        <targetPath>${project.build.directory}/test-classes</targetPath>
      </resource>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <targetPath>${project.build.directory}/classes</targetPath>
      </resource>
      <resource>
        <directory>${basedir}/src/main/webapp</directory>
        <targetPath>${project.build.directory}/webapp-classes</targetPath>
      </resource>
      <resource>
        <directory>${basedir}/src/test/resources</directory>
        <targetPath>${project.build.directory}/test-classes</targetPath>
      </resource>
      <resource>
        <directory>${basedir}/src/main/webapp</directory>
        <includes>
          <include>WEB-INF/**/*</include>
        </includes>
      </resource>
      <resource>
        <directory>${basedir}/src/main/</directory>
        <includes>
          <include>datasets/**/*</include>
        </includes>
      </resource>
    </resources>

    <defaultGoal>package</defaultGoal>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.1</version><!--$NO-MVN-MAN-VER$-->
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>

            <configuration>
              <createDependencyReducedPom>false</createDependencyReducedPom>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <shadedClassifierName>bundle</shadedClassifierName>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                  <resource>.RSA</resource>
                  <resource>.SF</resource>
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                  <mainClass>eu.toop.simulator.ToopSimulatorMain</mainClass>
                </transformer>
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.6.0</version>
        <executions>
          <execution>

            <goals>
              <goal>java</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <mainClass>eu.toop.simulator.ToopSimulatorMain</mainClass>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
