<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.enosistudio</groupId>
    <artifactId>r-for-maven</artifactId>
    <version>1.0.2</version>
    <packaging>maven-plugin</packaging>

    <!-- Metadata for project -->
    <name>r-for-maven</name>
    <description>Generate compile-time constants for all your resource files automatically, just like Android's R.java class.</description>
    <url>https://github.com/Voidstack/r-for-maven</url>

    <!-- License for project -->
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.html</url>
        </license>
    </licenses>

    <!-- Developer for project -->
    <developers>
        <developer>
            <id>voidstack</id>
            <name>Baptiste Martin</name>
            <email>baptiste.martin56@outlook.fr</email>
        </developer>
    </developers>

    <!-- SCM for link repository -->
    <scm>
        <connection>scm:git:git://github.com/Voidstack/r-for-maven.git</connection>
        <developerConnection>scm:git:ssh://github.com:Voidstack/r-for-maven.git</developerConnection>
        <url>https://github.com/Voidstack/r-for-maven</url>
    </scm>

    <!-- Properties for project -->
    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <gpg.executable>gpg</gpg.executable>
    </properties>

    <dependencies>
        <!-- API Maven for develop plugin -->
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>3.9.11</version>
            <scope>provided</scope>
        </dependency>

        <!-- Annotations for develop plugin -->
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.9.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- Jetbrains Annotations for develop plugin -->
        <!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>26.0.2-1</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Plugin Maven for generate descriptor -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.15.1</version>
                <configuration>
                    <goalPrefix>generate</goalPrefix>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.jetbrains</groupId>
                        <artifactId>annotations</artifactId>
                        <version>26.0.2-1</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>default-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                        <phase>process-classes</phase>
                    </execution>
                </executions>
            </plugin>

            <!-- Compiler Java for set version -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.11.0</version>
                <configuration>
                    <source>17</source> <!-- ou ta version Java -->
                    <target>17</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>

            <!-- Central Publishing for deploy on Maven Central -->
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.8.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                </configuration>
            </plugin>

            <!-- Source for attach sources -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals><goal>jar-no-fork</goal></goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Javadoc for attach javadocs -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.11.3</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals><goal>jar</goal></goals>
                    </execution>
                </executions>
            </plugin>

            <!-- GPG for sign artifacts -->
            <plugin>
                <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>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>