<?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>edu.hm.hafner</groupId>
    <artifactId>codingstyle-pom</artifactId>
    <version>1.4.0</version>
    <relativePath />
  </parent>

  <artifactId>karatest</artifactId>
  <version>2.0.0</version>

  <packaging>jar</packaging>

  <name>Java project that tests GreenfootKara programs</name>
  <description>Provides a framework to compile and test GreenfootKara programs.
    It also integrates Maven and several static analysis tools.
  </description>

  <scm>
    <connection>scm:git:git://github.com/uhafner/${project.artifactId}.git</connection>
    <developerConnection>scm:git:git@github.com:uhafner/${project.artifactId}.git</developerConnection>
    <url>https://github.com/uhafner/${project.artifactId}</url>
    <tag>v2.0.0</tag>
  </scm>

  <licenses>
    <license>
      <name>MIT license</name>
      <comments>All source code is copyrighted by Ullrich Hafner and licensed under the MIT license.</comments>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Ullrich Hafner</name>
      <id>uhafner</id>
      <email>ullrich.hafner@hm.edu</email>
      <organization>Munich University of Applied Sciences</organization>
      <organizationUrl>https://www.hm.edu/en/index.en.html</organizationUrl>
    </developer>
  </developers>

  <url>http://www.cs.hm.edu/die_fakultaet/ansprechpartner/professoren/hafner/index.de.html</url>

  <properties>
    <!-- Project Dependencies Configuration -->
    <findbugs.annotations>3.0.0</findbugs.annotations>
    <commons.lang.version>3.11</commons.lang.version>
    <junit4.version>4.13</junit4.version>

    <!-- Maven Plug-ins Configuration -->
    <site.maven.plugin>3.4</site.maven.plugin>
    <compiler.maven.plugin>3.2</compiler.maven.plugin>
    <resources.maven.plugin>2.7</resources.maven.plugin>
    <buildhelper.maven.plugin>1.9.1</buildhelper.maven.plugin>
    <surefire.maven.plugin>2.18.1</surefire.maven.plugin>
    <pmd.maven.plugin>3.5</pmd.maven.plugin>
    <checkstyle.maven.plugin>2.16</checkstyle.maven.plugin>
    <findbugs.maven.plugin>3.0.0</findbugs.maven.plugin>
    <cobertura.maven.plugin>2.7</cobertura.maven.plugin>
    <projectinfo.maven.plugin>2.8</projectinfo.maven.plugin>
    <jxr.maven.plugin>2.5</jxr.maven.plugin>
    <taglist.maven.plugin>2.4</taglist.maven.plugin>
  </properties>

  <dependencies>
    <dependency>
      <groupId>edu.hm.hafner</groupId>
      <artifactId>codingstyle</artifactId>
      <version>1.4.0</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>annotations</artifactId>
      <version>${findbugs.annotations}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>${commons.lang.version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit4.version}</version>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>etc</directory>
        <filtering>true</filtering>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>${resources.maven.plugin}</version>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/copied-assignments</outputDirectory>
              <resources>
                <resource>
                  <directory>scenarios</directory>
                  <includes>
                    <include>**/Assignment*.java</include>
                  </includes>
                  <filtering>false</filtering>
                </resource>
              </resources>
              <overwrite>true</overwrite>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>${buildhelper.maven.plugin}</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/copied-assignments</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${compiler.maven.plugin}</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <testSource>${java.version}</testSource>
          <testTarget>${java.version}</testTarget>
        </configuration>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${site.maven.plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${surefire.maven.plugin}</version>
          <configuration>
            <excludes>
              <exclude>JunitKaraRunnerTest.java</exclude>
            </excludes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${resources.maven.plugin}</version>
          <configuration>
            <encoding>${source.encoding}</encoding>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

</project>
