<?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>io.ecocode</groupId>
    <artifactId>ecocode-parent</artifactId>
    <version>1.6.2</version>
    <packaging>pom</packaging>

    <name>ecoCode Sonar Plugins Project</name>
    <description>Provides rules to reduce the environmental footprint of your programs</description>
    <url>https://github.com/green-code-initiative/ecocode</url>
    <inceptionYear>2023</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>
        <!--
            Mandatory information to be able to publish to Maven Central:
            https://central.sonatype.org/publish/requirements/#developer-information
        -->
        <developer>
            <name>Gilles Grousset</name>
            <email>zippy1978@users.noreply.github.com</email>
            <organization>green-code-initiative</organization>
            <organizationUrl>https://github.com/green-code-initiative</organizationUrl>
        </developer>
        <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>Julien Hertout</name>
            <email>jhertout@users.noreply.github.com</email>
            <organization>green-code-initiative</organization>
            <organizationUrl>https://github.com/green-code-initiative</organizationUrl>
        </developer>
        <developer>
            <name>Jules Delecour</name>
            <email>jules-delecour-dav@users.noreply.github.com</email>
            <organization>green-code-initiative</organization>
            <organizationUrl>https://github.com/green-code-initiative</organizationUrl>
        </developer>
        <developer>
            <name>DUBOIS Maxime</name>
            <email>mdubois81@users.noreply.github.com</email>
            <organization>green-code-initiative</organization>
            <organizationUrl>https://github.com/green-code-initiative</organizationUrl>
        </developer>
    </developers>

    <modules>
        <module>ecocode-rules-specifications</module>
    </modules>

    <scm>
        <connection>scm:git:https://github.com/green-code-initiative/ecocode</connection>
        <developerConnection>scm:git:https://github.com/green-code-initiative/ecocode</developerConnection>
        <url>https://github.com/green-code-initiative/ecocode</url>
        <tag>1.6.2</tag>
    </scm>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/green-code-initiative/ecocode/issues</url>
    </issueManagement>

    <properties>

        <encoding>UTF-8</encoding>
        <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>

    </properties>

    <!-- <build>
        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>4.1</version>
                <configuration>
                    <properties>
                        <owner>Green Code Initiative</owner>
                        <email>https://www.ecocode.io</email>
                    </properties>
                    <licenseSets>
                        <licenseSet>
                            <header>com/mycila/maven/plugin/license/templates/GPL-3.txt</header>
                            <includes>
                                <include>**/*.java</include>
                            </includes>
                        </licenseSet>
                    </licenseSets>
                </configuration>
                <executions>
                    <execution>
                        <id>validate</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build> -->

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

            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin><!--

                        For publishing in Maven Central,
                        see: https://central.sonatype.org/publish/publish-maven/#distribution-management-and-authentication

                        -->
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <!-- if true : automatic publish / if false : manual publish on Nexus GUI ("staging repository" tab) -->
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </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.1.0</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>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
