<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>org.openhab.tools.sat</groupId>
  <artifactId>pom</artifactId>
  <version>0.5.0</version>
  <packaging>pom</packaging>

  <name>Static Code Analysis Tool Parent Pom</name>
  <description>Tool that aggregates reports of PMD, Checkstyle and FindBugs</description>
  <url>https://github.com/openhab/static-code-analysis</url>

  <licenses>
    <license>
      <name>EPL 1.0</name>
      <url>http://opensource.org/licenses/EPL-1.0</url>
    </license>
  </licenses>

  <organization>
    <name>openhab.org</name>
    <url>http://www.openhab.org</url>
  </organization>

  <developers>
    <developer>
      <name>Svilen Valkanov</name>
      <email>svilen.valkanov@musala.com</email>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git@github.com:openhab/static-code-analysis.git</connection>
    <developerConnection>scm:git:git@github.com:openhab/static-code-analysis.git</developerConnection>
    <url>git@github.com:openhab/static-code-analysis.git</url>
  </scm>
  <issueManagement>
    <system>github</system>
    <url>https://github.com/openhab/static-code-analysis/issues</url>
  </issueManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.eclipse.version>2.10</maven.eclipse.version>
    <junit.version>4.11</junit.version>
    <commons.io.version>2.4</commons.io.version>
    <commons.lang.version>2.6</commons.lang.version>
    <mockito.version>2.8.47</mockito.version>
    <maven.resources.version>2.4</maven.resources.version>
    <pmd.version>5.8.1</pmd.version>
    <checkstyle.version>8.1</checkstyle.version>
    <spotbugs.version>3.1.2</spotbugs.version>
    <maven.plugin.api.version>3.1.1</maven.plugin.api.version>
    <maven.plugin.annotations.version>3.5</maven.plugin.annotations.version>
    <maven.plugin.plugin.version>3.5</maven.plugin.plugin.version>
    <maven.plugin.compiler.version>3.6.1</maven.plugin.compiler.version>
    <mojo.executor.version>2.2.0</mojo.executor.version>
    <org.apache.ivy.version>2.4.0</org.apache.ivy.version>
    <org.jsoup.version>1.7.1</org.jsoup.version>
    <pde.core.version>3.11.1</pde.core.version>
    <sat.version>0.4.1</sat.version>
    <flexmark.version>0.28.6</flexmark.version>
    <maven.surefire.plugin.version>2.12.4</maven.surefire.plugin.version>
    <jetty.server.version>9.3.14.v20161028</jetty.server.version>
    <saxon.version>9.1.0.8</saxon.version>
  </properties>

  <distributionManagement>
      <repository>
          <id>bintray</id>
          <url>https://api.bintray.com/maven/openhab/mvn/openhab-tools/;publish=1</url>
          <uniqueVersion>false</uniqueVersion>
      </repository>
  </distributionManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven.surefire.plugin.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>${maven.eclipse.version}</version>
        <configuration>
          <downloadSources>true</downloadSources>
          <downloadJavadocs>true</downloadJavadocs>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven.plugin.compiler.version}</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-eclipse-compiler</artifactId>
            <version>2.9.2-01</version>
          </dependency>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-eclipse-batch</artifactId>
            <version>2.4.3-01</version>
          </dependency>
        </dependencies>
      </plugin>         
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <attach>true</attach>
        </configuration>
      </plugin>
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.3</version>
          <configuration>
              <outputDirectory>${project.build.directory}/javadoc</outputDirectory>
              <failOnError>true</failOnError>
          </configuration>
          <executions>
              <execution>
                  <id>attach-javadocs</id>
                  <goals>
                      <goal>jar</goal>
                  </goals>
                  <configuration>
                      <additionalparam>${javadoc.opts}</additionalparam>
                  </configuration>
              </execution>
          </executions>
      </plugin>
      <plugin>
        <groupId>org.openhab.tools.sat</groupId>
        <artifactId>sat-plugin</artifactId>
        <version>${sat.version}</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>checkstyle</goal>
              <goal>pmd</goal>
              <goal>findbugs</goal>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <checkstyleFilter>tools/suppressions.xml</checkstyleFilter>
          <checkstyleProperties>tools/checkstyle.properties</checkstyleProperties>
        </configuration>
      </plugin>
    </plugins>
  </build>
  
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
  <modules>
    <module>custom-checks</module>
    <module>sat-plugin</module>
  </modules>
  
</project>
