<?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>
    <groupId>org.sonarsource.pmd</groupId>
    <artifactId>sonar-pmd</artifactId>
    <version>3.1.3</version>
  </parent>

  <artifactId>sonar-pmd-plugin</artifactId>
  <packaging>sonar-plugin</packaging>

  <name>SonarQube PMD Plugin</name>
  <description>Sonar-PMD is a plugin that provides coding rules from PMD.</description>
  <inceptionYear>2012</inceptionYear>
  <url>https://github.com/jensgerdes/sonar-pmd</url>

  <properties>
    <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
  </properties>

  <developers>
    <developer>
      <name>Jens Gerdes</name>
      <email>jens@gerdes.digital</email>
      <timezone>+1</timezone>
    </developer>
    <developer>
      <name>Tim Webster</name>
      <email>tim.webster@gmail.com</email>
    </developer>
    <developer>
      <id>godin</id>
      <name>Evgeny Mandrikov</name>
      <organization>SonarSource</organization>
    </developer>
  </developers>

  <dependencies>
    <dependency>
      <groupId>org.sonarsource.sonarqube</groupId>
      <artifactId>sonar-plugin-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.codehaus.staxmate</groupId>
      <artifactId>staxmate</artifactId>
      <version>2.0.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.sonarsource.java</groupId>
      <artifactId>java-frontend</artifactId>
      <version>5.5.0.14655</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>com.google.code.gson</groupId>
          <artifactId>gson</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.sonarsource.sslr-squid-bridge</groupId>
      <artifactId>sslr-squid-bridge</artifactId>
      <version>2.7.0.377</version>
      <exclusions>
        <exclusion>
          <groupId>org.picocontainer</groupId>
          <artifactId>picocontainer</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-lang</groupId>
          <artifactId>commons-lang</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.google.code.findbugs</groupId>
          <artifactId>jsr305</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>net.sourceforge.pmd</groupId>
      <artifactId>pmd-java</artifactId>
    </dependency>
    <dependency>
      <groupId>jdom</groupId>
      <artifactId>jdom</artifactId>
      <version>1.0</version>
    </dependency>


  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
        <artifactId>sonar-packaging-maven-plugin</artifactId>
        <configuration>
          <pluginKey>pmd</pluginKey>
          <pluginName>PMD</pluginName>
          <pluginClass>org.sonar.plugins.pmd.PmdPlugin</pluginClass>
          <pluginDescription>Analyze Java code with PMD.</pluginDescription>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-plugin-size</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>verify</phase>
            <configuration>
              <rules>
                <requireFilesSize>
                  <maxsize>7000000</maxsize>
                  <minsize>4200000</minsize>
                  <files>
                    <file>${project.build.directory}/${project.build.finalName}.jar</file>
                  </files>
                </requireFilesSize>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>de.jutzig</groupId>
        <artifactId>github-release-plugin</artifactId>
        <version>1.3.0</version>
        <configuration>
          <description>Sonar PMD Plugin v${project.version}</description>
          <releaseName>${project.version}</releaseName>
          <tag>${project.version}</tag>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
