<?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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <artifactId>jboss-parent</artifactId>
    <groupId>org.jboss</groupId>
    <version>21</version>
    <relativePath />
  </parent>

  <groupId>org.jboss.jbossset</groupId>
  <artifactId>bugclerk</artifactId>
  <version>1.0.3.Final</version>
  <packaging>pom</packaging>
  <name>Bug Clerk</name>
  <description>A inspection tool for bug/task entry, to check the quality of it and ensures it complies to defines rules and processes</description>

    <modules>
      <module>dist</module>
      <module>core</module>
    </modules>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>

    <mockito.version>1.9.5</mockito.version>
    <org.wildfly.checkstyle-config.version>1.0.4.Final</org.wildfly.checkstyle-config.version>

    <version.drools>7.4.1.Final</version.drools>
    <version.org.drools>${version.drools}</version.org.drools>
    <version.org.jboss.set.aphrodite>0.7.4.Final</version.org.jboss.set.aphrodite>
    <version.org.kie>${version.drools}</version.org.kie>
    <version.enforcer.plugin>3.0.0-M1</version.enforcer.plugin>
  </properties>

  <scm>
    <connection>scm:git:github.com/jboss-set/bug-clerk</connection>
    <developerConnection>scm:git:git@github.com:jboss-set/bug-clerk</developerConnection>
    <url>https://github.com/jboss-set/bug-clerk</url>
    <tag>bugclerk-1.0.3.Final</tag>
  </scm>

  <dependencies>
    <!-- Tests dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.7.10</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
          <groupId>com.atlassian.util.concurrent</groupId>
           <artifactId>atlassian-util-concurrent</artifactId>
          <version>2.4.2</version>
      </dependency>
      <dependency>
          <groupId>com.google.guava</groupId>
          <artifactId>guava</artifactId>
          <version>11.0.2</version>
      </dependency>
      <dependency>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
          <version>1.1.3</version>
      </dependency>
      <dependency>
          <groupId>commons-codec</groupId>
          <artifactId>commons-codec</artifactId>
          <version>1.7</version>
      </dependency>
      <dependency>
          <groupId>commons-lang</groupId>
          <artifactId>commons-lang</artifactId>
          <version>2.4</version>
      </dependency>
      <dependency>
          <groupId>org.jboss.set</groupId>
          <artifactId>jboss-aphrodite-bugzilla</artifactId>
          <version>${version.org.jboss.set.aphrodite}</version>
          <exclusions>
              <exclusion>
                  <groupId>junit</groupId>
                  <artifactId>junit</artifactId>
              </exclusion>
          </exclusions>
      </dependency>
      <dependency>
          <groupId>org.jboss.set</groupId>
          <artifactId>jboss-aphrodite-jira</artifactId>
          <version>${version.org.jboss.set.aphrodite}</version>
          <exclusions>
              <exclusion>
                  <groupId>org.apache.httpcomponents</groupId>
                  <artifactId>httpmime</artifactId>
              </exclusion>
              <exclusion>
                  <groupId>org.slf4j</groupId>
                  <artifactId>slf4j-api</artifactId>
              </exclusion>
          </exclusions>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-enforcer-plugin</artifactId>
         <version>${version.enforcer.plugin}</version>
         <executions>
           <execution>
               <id>ban-bad-dependencies</id>
               <goals>
                   <goal>enforce</goal>
               </goals>
               <configuration>
                   <rules>
                       <dependencyConvergence />
                       <requireMavenVersion>
                           <version>3.3.9</version>
                       </requireMavenVersion>
                       <requireJavaVersion>
                           <version>1.8</version>
                       </requireJavaVersion>
                       <requireOS>
                           <family>unix</family>
                       </requireOS>
                   </rules>
               </configuration>
           </execution>
         </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
		  <groupId>org.apache.maven.plugins</groupId>
		  <artifactId>maven-failsafe-plugin</artifactId>
		  <version>2.14</version>
		  <configuration>
		    <argLine>${failsafe.argLine}</argLine>
		  </configuration>
		  <executions>
		    <execution>
		    <id>integration-test</id>
		    <goals>
		      <goal>integration-test</goal>
		    </goals>
		    </execution>
		    <execution>
		      <id>verify</id>
		      <goals>
		        <goal>verify</goal>
          </goals>
             </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.3</version>
          <executions>
            <execution>
              <id>javadoc</id>
              <phase>compile</phase>
              <goals>
                <goal>javadoc</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
      <pluginManagement>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <configuration>
              <configLocation>wildfly-checkstyle/checkstyle.xml</configLocation>
              <consoleOutput>true</consoleOutput>
              <failsOnError>true</failsOnError>
              <useFile />
              <linkXRef>false</linkXRef>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>org.wildfly.checkstyle</groupId>
                <artifactId>wildfly-checkstyle-config</artifactId>
                <version>${org.wildfly.checkstyle-config.version}</version>
              </dependency>
              <dependency>
                <groupId>com.puppycrawl.tools</groupId>
                <artifactId>checkstyle</artifactId>
                <version>${version.checkstyle}</version>
                <exclusions>
                  <exclusion>
                    <groupId>com.sun</groupId>
                    <artifactId>tools</artifactId>
                  </exclusion>
                </exclusions>
              </dependency>
            </dependencies>
            <executions>
              <execution>
                <id>check-style</id>
                <phase>compile</phase>
                <goals>
                  <goal>checkstyle</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
            <version>3.5</version>
            <executions>
              <execution>
                <id>pmd-cpd</id>
                <phase>compile</phase>
                <goals>
                  <goal>pmd</goal>
                  <goal>cpd</goal>
                </goals>
                <configuration>
                  <linkXref>true</linkXref>²
                  <sourceEncoding>utf-8</sourceEncoding>
                  <rulesets>
                    <ruleset>https://raw.githubusercontent.com/jboss-set/bug-clerk/master/pmd.xml</ruleset>
                  </rulesets>
                </configuration>
              </execution>
            </executions>
         </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <linkJavadoc>true</linkJavadoc>
          <javadocDir>${project.build.directory}/site/apidocs</javadocDir>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>3.5</version>
      </plugin>
    </plugins>
  </reporting>

  <repositories>
    <repository>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Maven Repository Group</name>
      <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
      <layout>default</layout>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </snapshots>
    </repository>
  </repositories>

</project>
