<?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>com.decathlon.tzatziki</groupId>
    <artifactId>tzatziki-parent</artifactId>
    <packaging>pom</packaging>
    <version>2.3.5</version>
    <modules>
        <module>tzatziki-mapper</module>
        <module>tzatziki-jackson</module>
        <module>tzatziki-common</module>
        <module>tzatziki-core</module>
        <module>tzatziki-testng</module>
        <module>tzatziki-logback</module>
        <module>mockfaster</module>
        <module>tzatziki-http-mockserver-legacy</module>
        <module>tzatziki-http</module>
        <module>tzatziki-spring</module>
        <module>tzatziki-spring-jpa</module>
        <module>tzatziki-spring-kafka</module>
        <module>report</module>
        <module>tzatziki-spring-mongodb</module>
        <module>tzatziki-opensearch</module>
    </modules>
    <name>tzatziki</name>
    <description>cucumber library</description>
    <url>https://github.com/Decathlon/tzatziki</url>

    <scm>
        <connection>scm:git:git://github.com/Decathlon/tzatziki.git</connection>
        <developerConnection>scm:git:git@github.com:Decathlon/tzatziki.git</developerConnection>
        <tag>HEAD</tag>
        <url>https://github.com/Decathlon/tzatziki/</url>
    </scm>

    <properties>
        <java.version>17</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <lombok.version>1.18.42</lombok.version>
        <testcontainer.version>1.21.3</testcontainer.version>
        <mockserver.version>5.15.0</mockserver.version>
        <cucumber.version>7.28.2</cucumber.version>
        <commonstext.version>1.14.0</commonstext.version>
        <zookeeper.version>3.9.4</zookeeper.version>
        <sonar.organization>decathlon</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    </properties>

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

    <organization>
        <name>Decathlon</name>
        <url>https://developers.decathlon.com</url>
    </organization>

    <developers>
        <developer>
            <email>oss@decathlon.com</email>
            <name>decathlon</name>
            <url>https://github.com/decathlon</url>
            <id>decathlon</id>
        </developer>
    </developers>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>5.13.4</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>2025.0.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <!-- Import dependency management from Spring Boot -->
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>3.5.6</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-text</artifactId>
                <version>${commonstext.version}</version>
            </dependency>
            <dependency>
                <artifactId>zookeeper</artifactId>
                <groupId>org.apache.zookeeper</groupId>
                <version>${zookeeper.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.18.0</version>
            </dependency>
            <dependency>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-bom</artifactId>
                <version>${cucumber.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.14.1</version>
                <configuration>
                    <release>${java.version}</release>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <testCompilerArgument>-parameters</testCompilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.6.1</version>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <rules>
                        <DependencyConvergence/>
                    </rules>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.5.4</version>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.13</version>
                <configuration>
                    <excludes>
                        <exclude>io/cucumber/**/*</exclude>
                        <exclude>edu/utexas/**/*</exclude>
                        <exclude>org/mockserver/**/*</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <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>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>3.1.4</version>
                <configuration>
                    <deployAtEnd>true</deployAtEnd>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>sonatypeDeploy</id>
            <!-- Based on: https://central.sonatype.org/pages/apache-maven.html-->
            <build>
                <plugins>
                    <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>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.12.0</version>
                        <configuration>
                            <source>17</source>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                     <plugin>
                         <groupId>org.sonatype.central</groupId>
                         <artifactId>central-publishing-maven-plugin</artifactId>
                         <version>0.9.0</version>
                         <extensions>true</extensions>
                         <configuration>
                           <publishingServerId>central</publishingServerId>
                           <autoPublish>true</autoPublish>
                           <waitUntil>published</waitUntil>
                         </configuration>
                   </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
