<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2018 - 2019 - Frank Hossfeld
  ~
  ~  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:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>com.github.nalukit</groupId>
    <artifactId>nalu-parent</artifactId>
    <version>2.0.0-rc-2</version>
  </parent>

  <artifactId>nalu</artifactId>
  <packaging>jar</packaging>
  <description>Model View Presenter with Event Bus For GWT 2 + 3 based on APT</description>

  <inceptionYear>2018 - 2019</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>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Frank Hossfeld</name>
      <id>frankhossfeld</id>
      <email>hossfeld@hossfeld-solutions.de</email>
      <organization>Hossfeld Solutions GmbH</organization>
      <roles>
        <role>Java Developer</role>
      </roles>
    </developer>
  </developers>

  <scm>
    <connection>scm:git@github.com:nalukit/nalu.git</connection>
    <developerConnection>scm:git:git@github.com:nalukit/nalu.git</developerConnection>
    <url>scm:git:https://github.com/nalukit/nalu</url>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/nalukit/nalu/issues</url>
  </issueManagement>

  <properties>
    <!-- gwt-events: once it is on maven central, use it!
    <gwt-events.version>HEAD-SNAPSHOT</gwt-events.version>
    -->
  </properties>

  <dependencies>
    <!-- gwt-events: once it is on maven central, use it!
    <dependency>
      <groupId>org.gwtproject.event</groupId>
      <artifactId>gwt-event</artifactId>
      <version>${gwt-events.version}</version>
    </dependency>
    -->

    <!-- only for testing -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${junit-jupiter.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit-jupiter.version}</version>
      <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.junit.platform/junit-platform-runner -->
    <dependency>
      <groupId>org.junit.platform</groupId>
      <artifactId>junit-platform-runner</artifactId>
      <version>${junit-jupiter-platform.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>


  <build>
    <resources>
      <resource>
        <directory>src/main/java</directory>
        <includes>
          <include>**/nalu/**</include>
          <!-- gwt-events: once it is on maven central, remove the next statement -->
          <include>**/event/**</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/nalu/**</include>
          <include>**/*.gwt.xml</include>
          <include>**/*.html</include>
          <include>**/public/**</include>
        </includes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.6.1</version>
        <configuration>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
          <showWarnings>true</showWarnings>
          <showDeprecation>true</showDeprecation>
          <meminitial>128m</meminitial>
          <maxmem>1024m</maxmem>
          <encoding>${project.build.sourceEncoding}</encoding>
          <compilerArgs>
            <compilerArgument>-Xlint:all</compilerArgument>
          </compilerArgs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${plugin.version.surfire}</version>
        <executions>
          <execution>
            <id>unit-tests</id>
            <goals>
              <goal>test</goal>
            </goals>
            <phase>test</phase>
          </execution>
        </executions>
        <configuration>
          <includes>
            <include>**/Test*.java</include>
            <include>**/*Test.java</include>
            <include>**/*Tests.java</include>
            <include>**/*TestCase.java</include>
          </includes>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
