<?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>

  <groupId>eu.rssw.sonar.openedge</groupId>
  <artifactId>sonar-openedge-plugin</artifactId>
  <version>2.15.0</version>
  <packaging>sonar-plugin</packaging>

  <name>OpenEdge plugin for SonarQube</name>
  <description>Enables analysis of OpenEdge projects</description>
  <url>https://github.com/Riverside-Software/sonar-openedge/</url>
  <inceptionYear>2013</inceptionYear>
  <organization>
    <name>Riverside Software</name>
    <url>http://riverside-software.fr</url>
  </organization>
  <licenses>
    <license>
      <name>LGPL 3.0</name>
      <url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
    </license>
  </licenses>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/Riverside-Software/sonar-openedge/issues</url>
  </issueManagement>
  <ciManagement>
    <system>Jenkins</system>
    <url>https://ci.rssw.eu/job/sonar-openedge/</url>
  </ciManagement>
  <scm>
    <url>https://github.com/Riverside-Software/sonar-openedge</url>
  </scm>

  <developers>
    <developer>
      <id>gquerret</id>
      <name>Gilles QUERRET</name>
    </developer>
  </developers>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <sonar.pluginKey>openedge</sonar.pluginKey>
    <sonar.pluginName>OpenEdge</sonar.pluginName>
    <sonar.pluginClass>org.sonar.plugins.openedge.OpenEdgePlugin</sonar.pluginClass>
    <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../coverage-report/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.sonarsource.sonarqube</groupId>
      <artifactId>sonar-plugin-api</artifactId>
      <version>7.9.6</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>eu.rssw.openedge.checks</groupId>
      <artifactId>openedge-checks</artifactId>
      <version>2.15.0</version>
    </dependency>
    <dependency>
      <groupId>eu.rssw.openedge.parsers</groupId>
      <artifactId>listing-parser</artifactId>
      <version>2.15.0</version>
    </dependency>
    <dependency>
      <groupId>eu.rssw.openedge.parsers</groupId>
      <artifactId>profiler-parser</artifactId>
      <version>2.15.0</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.11.0</version>
    </dependency>
    <dependency>
      <groupId>org.sonarsource.sonarqube</groupId>
      <artifactId>sonar-ws</artifactId>
      <version>7.9.6</version>
    </dependency>
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
      <version>20210307</version>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>7.4.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.7.32</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>sonar-openedge.txt</include>
        </includes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>sonar-openedge.txt</exclude>
        </excludes>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.7</version>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>verify</phase>
            <goals>
              <goal>report-aggregate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
        <artifactId>sonar-packaging-maven-plugin</artifactId>
        <version>1.20.0.405</version>
        <extensions>true</extensions>
        <configuration>
          <pluginKey>${sonar.pluginKey}</pluginKey>
          <pluginName>${sonar.pluginName}</pluginName>
          <pluginClass>${sonar.pluginClass}</pluginClass>
          <sonarQubeMinVersion>7.6</sonarQubeMinVersion>
          <sonarLintSupported>true</sonarLintSupported>
          <archive>
            <manifestEntries>
              <Implementation-Build>${git.commit}</Implementation-Build>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.1.0</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.sonarsource.scanner.maven</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>3.9.0.2155</version>
        </plugin>

        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>
                      com.mycila.maven-license-plugin
                    </groupId>
                    <artifactId>
                      maven-license-plugin
                    </artifactId>
                    <versionRange>
                      [1.9.0,)
                    </versionRange>
                    <goals>
                      <goal>check</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.sonar</groupId>
                    <artifactId>sonar-packaging-maven-plugin</artifactId>
                    <versionRange>[1.5,)</versionRange>
                    <goals>
                      <goal>check-dependencies</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <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>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <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>
                <configuration>
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
