<?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">
  <parent>
    <artifactId>ecocode-parent</artifactId>
    <groupId>io.ecocode</groupId>
    <version>0.0.2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>ecocode-python-plugin</artifactId>
  <packaging>sonar-plugin</packaging>
  <name>ecoCode - Python language</name>
  <description>Provides rules to reduce the environmental footprint of your Python programs</description>
  <url>https://github.com/green-code-initiative/ecoCode/tree/main/python-plugin</url>
  <build>
    <plugins>
      <plugin>
        <groupId>org.sonarsource.sonar-packaging-maven-plugin</groupId>
        <artifactId>sonar-packaging-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <pluginKey>ecocodepython</pluginKey>
          <pluginName>${project.name}</pluginName>
          <pluginClass>fr.greencodeinitiative.python.PythonPlugin</pluginClass>
          <sonarLintSupported>true</sonarLintSupported>
          <sonarQubeMinVersion>${sonarqube.version}</sonarQubeMinVersion>
          <jreMinVersion>${java.version}</jreMinVersion>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-bundle</id>
            <phase>package</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>${project.artifactId}</artifactId>
                  <version>${project.version}</version>
                  <type>jar</type>
                  <overWrite>true</overWrite>
                </artifactItem>
              </artifactItems>
              <outputDirectory>../lib</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>report</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <output>file</output>
          <append>false</append>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.sonarsource.python</groupId>
      <artifactId>sonar-python-plugin</artifactId>
      <version>4.3.0.11660</version>
      <type>sonar-plugin</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.sonarsource.sonarqube</groupId>
      <artifactId>sonar-plugin-api</artifactId>
      <version>9.4.0.54424</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.sonarsource.python</groupId>
      <artifactId>python-checks-testkit</artifactId>
      <version>4.3.0.11660</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>sonar-analyzer-test-commons</artifactId>
          <groupId>org.sonarsource.analyzer-commons</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit</artifactId>
          <groupId>junit</groupId>
        </exclusion>
        <exclusion>
          <artifactId>assertj-core</artifactId>
          <groupId>org.assertj</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <version>5.3.1</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>mockito-core</artifactId>
          <groupId>org.mockito</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-api</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>
