<?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>io.github.fherbreteau</groupId>
    <artifactId>gatling-ftp</artifactId>
    <version>0.0.10</version>
    <name>FTP plugin</name>
    <description>FTP plugin for Gatling</description>
    <url>${project.scm.url}</url>

    <properties>
        <java.version>11</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <!-- Maven plugins version -->
        <maven.compiler.release>${java.version}</maven.compiler.release>
        <maven.compiler.plugin.version>3.15.0</maven.compiler.plugin.version>
        <maven-source-plugin.version>3.4.0</maven-source-plugin.version>
        <maven-jar-plugin.version>3.5.0</maven-jar-plugin.version>
        <maven-scala-plugin.version>4.9.9</maven-scala-plugin.version>
        <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
        <maven-deploy-plugin.version>1.7.0</maven-deploy-plugin.version>
        <maven-release-plugin.version>3.3.1</maven-release-plugin.version>
        <maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
        <maven-gatling-plugin.version>4.21.0</maven-gatling-plugin.version>

        <!-- Dependencies Versions -->
        <gatling.version>3.15.0</gatling.version>
        <commons.net.version>3.12.0</commons.net.version>
        <jakarta.annotation.version>3.0.0</jakarta.annotation.version>

        <!-- Sonar Properties -->
        <sonar.organization>fherbreteau</sonar.organization>
        <sonar.projectKey>fherbreteau_gatling-ftp</sonar.projectKey>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    </properties>

    <dependencies>
        <!-- Gatling dependencies -->
        <dependency>
            <groupId>io.gatling</groupId>
            <artifactId>gatling-core-java</artifactId>
            <version>${gatling.version}</version>
        </dependency>
        <dependency>
            <groupId>io.gatling.highcharts</groupId>
            <artifactId>gatling-charts-highcharts</artifactId>
            <version>${gatling.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Jakarta Annotations -->
        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
            <version>${jakarta.annotation.version}</version>
        </dependency>

        <!-- Apache Net -->
        <dependency>
            <groupId>commons-net</groupId>
            <artifactId>commons-net</artifactId>
            <version>${commons.net.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>${maven-scala-plugin.version}</version>
                <executions>
                    <execution>
                        <id>scala-compile</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <args>
                                <arg>-deprecation</arg>
                                <arg>-feature</arg>
                                <arg>-unchecked</arg>
                                <arg>-language:implicitConversions</arg>
                                <arg>-language:postfixOps</arg>
                            </args>
                        </configuration>
                    </execution>
                    <execution>
                        <id>scala-test-compile</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                        <configuration>
                            <args>
                                <arg>-deprecation</arg>
                                <arg>-feature</arg>
                                <arg>-unchecked</arg>
                                <arg>-language:implicitConversions</arg>
                                <arg>-language:postfixOps</arg>
                            </args>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <executions>
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>default-testCompile</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.gatling</groupId>
                <artifactId>gatling-maven-plugin</artifactId>
                <version>${maven-gatling-plugin.version}</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>${maven-jar-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>empty-javadoc-jar</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <classifier>javadoc</classifier>
                                    <classesDirectory>${basedir}/javadoc</classesDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>${maven-release-plugin.version}</version>
                        <configuration>
                            <scmCommentPrefix>[ci skip]</scmCommentPrefix>
                            <tagNameFormat>@{project.version}</tagNameFormat>
                            <arguments>-Dmaven.javadoc.skip=true</arguments>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${maven-deploy-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://ossrh-staging-api.central.sonatype.com/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <version>${maven-enforcer-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>enforce-versions</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireReleaseDeps>
                                            <message>No Snapshots Allowed!</message>
                                        </requireReleaseDeps>
                                    </rules>
                                    <fail>true</fail>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <name>Central Repository OSSRH</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <developers>
        <developer>
            <id>fherbreteau</id>
            <name>François Herbreteau</name>
            <email>fherbreteau@gmail.com</email>
            <roles>
                <role>Maintainer</role>
            </roles>
            <timezone>Europe/Paris</timezone>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:${project.scm.url}.git</connection>
        <developerConnection>scm:git:${project.scm.url}.git</developerConnection>
        <url>https://github.com/fherbreteau/gatling-ftp</url>
        <tag>0.0.10</tag>
    </scm>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://raw.githubusercontent.com/fherbreteau/gatling-ftp/refs/heads/main/LICENSE</url>
        </license>
    </licenses>
</project>
