<!--
  ~ SonarQube PMD Plugin
  ~ Copyright (C) 2012-2018 SonarSource SA
  ~ mailto:info AT sonarsource DOT com
  ~
  ~ This program is free software; you can redistribute it and/or
  ~ modify it under the terms of the GNU Lesser General Public
  ~ License as published by the Free Software Foundation; either
  ~ version 3 of the License, or (at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public License
  ~ along with this program; if not, write to the Free Software Foundation,
  ~ Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  -->

<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.parent</groupId>
    <artifactId>parent</artifactId>
    <version>52</version>
  </parent>

  <groupId>org.sonarsource.pmd</groupId>
  <artifactId>sonar-pmd</artifactId>
  <version>3.3.1</version>
  <name>SonarQube PMD Project</name>
  <packaging>pom</packaging>

  <scm>
    <connection>scm:git:git@github.com:jensgerdes/sonar-pmd.git</connection>
    <developerConnection>scm:git:git@github.com:jensgerdes/sonar-pmd.git</developerConnection>
    <url>https://github.com/jensgerdes/sonar-pmd</url>
    <tag>3.3.1</tag>
  </scm>
  <url>https://github.com/jensgerdes/sonar-pmd</url>
  <issueManagement>
    <system>Github</system>
    <url>https://github.com/jensgerdes/sonar-pmd/issues</url>
  </issueManagement>
  <ciManagement>
    <system>Travis</system>
    <url>https://travis-ci.org/jensgerdes/sonar-pmd</url>
  </ciManagement>

  <licenses>
    <license>
      <name>GNU LGPL 3</name>
      <url>http://www.gnu.org/licenses/lgpl.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Jens Gerdes</name>
      <email>jens@gerdes.digital</email>
      <timezone>+1</timezone>
    </developer>
  </developers>

  <properties>
    <pmd.version>6.30.0</pmd.version>
    <junit.jupiter.version>5.7.0</junit.jupiter.version>
    <mockito.version>3.7.7</mockito.version>
    <assertj.version>3.19.0</assertj.version>

    <!-- Sonar settings -->
    <version.sonar-packaging.plugin>1.20.0.405</version.sonar-packaging.plugin>

    <!-- Technical settings -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>

    <!-- Code Coverage -->
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <sonar.coverage.jacoco.xmlReportPaths>sonar-pmd-plugin/target/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- SonarQube API -->
      <dependency>
        <groupId>org.sonarsource.sonarqube</groupId>
        <artifactId>sonar-plugin-api</artifactId>
        <scope>provided</scope>
        <version>7.7</version>
        <exclusions>
          <exclusion>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.sonarsource.orchestrator</groupId>
        <artifactId>sonar-orchestrator</artifactId>
        <version>3.34.0.2692</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.codehaus.sonar</groupId>
        <artifactId>sonar-ws-client</artifactId>
        <version>5.1</version>
        <scope>test</scope>
      </dependency>

      <!-- PMD -->
      <dependency>
        <groupId>net.sourceforge.pmd</groupId>
        <artifactId>pmd-java</artifactId>
        <version>${pmd.version}</version>
        <exclusions>
          <exclusion>
            <groupId>com.beust</groupId>
            <artifactId>jcommander</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4-runtime</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <!-- Test dependencies -->
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${junit.jupiter.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
          <artifactId>sonar-packaging-maven-plugin</artifactId>
          <version>${version.sonar-packaging.plugin}</version>
          <configuration>
            <sonarQubeMinVersion>6.7</sonarQubeMinVersion>
            <requirePlugins>java:5.14.0.18788</requirePlugins>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <!-- Plugins for testing -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.2</version>
        <configuration>
          <runOrder>random</runOrder>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.22.2</version>
        <configuration>
          <argLine>-server</argLine>
        </configuration>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Release relevant plugins -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <tagNameFormat>@{project.version}</tagNameFormat>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <quiet>true</quiet>
          <source>8</source>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>


  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <modules>
    <module>sonar-pmd-plugin</module>
    <module>integration-test</module>
  </modules>
</project>
