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

    <groupId>org.green-code-initiative</groupId>
    <artifactId>creedengo-integration-test</artifactId>
    <version>0.2.2</version>

    <name>creedengo integration testing repository</name>
    <description>Repository that contains integration testing framework for creedengo plugins.</description>
    <url>https://github.com/green-code-initiative/creedengo-integration-test</url>

    <inceptionYear>2025</inceptionYear>
    <organization>
        <name>green-code-initiative</name>
        <url>https://github.com/green-code-initiative</url>
    </organization>

    <licenses>
        <license>
            <name>GPL v3</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Maxime MALGORN</name>
            <email>utarwyn@users.noreply.github.com</email>
            <organization>green-code-initiative</organization>
            <organizationUrl>https://github.com/green-code-initiative</organizationUrl>
        </developer>
        <developer>
            <name>Geoffrey LALLOUÉ</name>
            <email>glalloue@users.noreply.github.com</email>
            <organization>green-code-initiative</organization>
            <organizationUrl>https://github.com/green-code-initiative</organizationUrl>
        </developer>
        <developer>
            <name>David DE CARVALHO</name>
            <email>dedece35@users.noreply.github.com</email>
            <organization>green-code-initiative</organization>
            <organizationUrl>https://github.com/green-code-initiative</organizationUrl>
        </developer>
        <developer>
            <name>Olivier LE GOAËR</name>
            <email>olegoaer@users.noreply.github.com</email>
            <organization>green-code-initiative</organization>
            <organizationUrl>https://github.com/green-code-initiative</organizationUrl>
        </developer>
        <developer>
            <name>Jean-Yves CRONIER</name>
            <email>jycr@users.noreply.github.com</email>
            <organization>green-code-initiative</organization>
            <organizationUrl>https://github.com/green-code-initiative</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/green-code-initiative/creedengo-integration-test</connection>
        <developerConnection>scm:git:https://github.com/green-code-initiative/creedengo-integration-test</developerConnection>
        <url>https://github.com/green-code-initiative/creedengo-integration-test</url>
        <tag>HEAD</tag>
    </scm>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/green-code-initiative/creedengo-integration-test/issues</url>
    </issueManagement>

    <properties>

        <sonar.organization>green-code-initiative</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>

        <!--
            Default version when disabling Maven `maven-git-versioning-extension` extension
            cf. https://github.com/qoomon/maven-git-versioning-extension#intellij&#45;&#45;-multi-modules-projects
        -->
        <revision>current-SNAPSHOT</revision>

        <!-- Helps ensure build reproducibility (cf. https://maven.apache.org/guides/mini/guide-reproducible-builds.html) -->
        <!--suppress UnresolvedMavenProperty -->
        <project.build.outputTimestamp>${git.commit.timestamp.datetime}</project.build.outputTimestamp>

        <java.version>17</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <!-- to prevent message: system modules path not set in conjunction with -source 11 -->
        <maven.compiler.release>${java.version}</maven.compiler.release>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- URL of the Maven repository where sonarqube will be downloaded -->
        <test-it.orchestrator.artifactory.url>https://repo1.maven.org/maven2</test-it.orchestrator.artifactory.url>
        <test-it.sonarqube.version>26.1.0.118079</test-it.sonarqube.version>

        <assertj.version>3.27.6</assertj.version>
        <orchestrator.version>5.6.2.2625</orchestrator.version>
        <logback.version>1.5.25</logback.version>
        <lombok.version>1.18.42</lombok.version>
        <data-url-handler.version>0.0.1</data-url-handler.version>

    </properties>

    <dependencies>

        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.version}</version>
        </dependency>

        <!-- Dependencies used by integration tests -->
        <dependency>
            <groupId>org.sonarsource.orchestrator</groupId>
            <artifactId>sonar-orchestrator-junit5</artifactId>
            <version>${orchestrator.version}</version>
        </dependency>
        <dependency>
            <groupId>org.sonarsource.sonarqube</groupId>
            <artifactId>sonar-ws</artifactId>
            <version>${test-it.sonarqube.version}</version>
        </dependency>
        <dependency>
            <groupId>io.github.jycr</groupId>
            <artifactId>java-data-url-handler</artifactId>
            <version>${data-url-handler.version}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>maven-central-publishing</id>
            <!--
                For publishing in Maven Central.
                For more information:
                - https://central.sonatype.org/publish/publish-guide/#deployment
                - https://central.sonatype.org/publish/release/#login-into-ossrh
            -->
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.4.0</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.12.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadoc</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <stylesheet>java</stylesheet>
                            <doclint>none</doclint>
                        </configuration>
                    </plugin>
                    <plugin>
                        <!--
                            For publishing in Maven Central, GPG key must be published to one of following servers:
                            - keyserver.ubuntu.com
                            - keys.openpgp.org
                            - pgp.mit.edu

                            For more informatino: https://central.sonatype.org/publish/requirements/gpg/#distributing-your-public-key
                        -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</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.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.10.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <tokenAuth>true</tokenAuth>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
