<?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>org.kendar.simplecli</groupId>
    <artifactId>simple-cli</artifactId>
    <version>1.0.1</version>

    <name>Simple Cli Handling</name>
    <description>Simple Cli Parser/handler</description>
    <url>https://www.github.com/kendarorg/simple-cli</url>
    <developers>
        <developer>
            <id>kendar</id>
            <name>Enrico Da Ros</name>
            <email>github@kendar.org</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/kendarorg/simple-cli.git</connection>
        <developerConnection>scm:git:git://github.com/kendarorg/simple-cli.git</developerConnection>
        <url>https://www.github.com/kendarorg/simple-cli</url>
        <tag>HEAD</tag>
    </scm>

    <distributionManagement>
        <repository>
            <id>central</id>
            <name>central</name>
            <url>https://central.sonatype.com</url>
        </repository>
    </distributionManagement>
    <licenses>
        <license>
            <name>The MIT License</name>
            <url>https://raw.githubusercontent.com/kendarorg/simple-cli/refs/heads/main/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <assembly.plugin.version>3.7.1</assembly.plugin.version>
        <maven.jar.version>3.2.0</maven.jar.version>
        <reflection.version>0.10.2</reflection.version>
        <junit.jupiter.version>RELEASE</junit.jupiter.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>distribute</id>
            <build>
                <plugins>
                    <plugin>
                        <!-- The extension to publish on maven central -->
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.7.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                        </configuration>
                    </plugin>
                    <plugin>
                        <!-- Build sources -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <!-- Build Javadoc -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.11.2</version>
                        <configuration>
                            <doclint>-missing</doclint>
                        </configuration>
                        <executions>
                            <execution>
                                <id>createJavadocs</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <!-- Sign the artifacts -->
                        <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>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>