<?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.cleverpine</groupId>
    <artifactId>cp-translations-lib</artifactId>
    <version>1.2.0</version>
    <packaging>pom</packaging>

    <modules>
        <module>cp-translations-i18n-plugin</module>
        <module>cp-translations-util</module>
    </modules>

    <properties>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>
        <spring.boot.version>2.6.2</spring.boot.version>
        <org.projectlombok.version>1.18.22</org.projectlombok.version>
        <org.mapstruct.version>1.4.2.Final</org.mapstruct.version>
        <maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
        <maven.build.helper.plugin.version>3.0.0</maven.build.helper.plugin.version>
    </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <scm>
        <connection>scm:git:https://cleverpine@dev.azure.com/cleverpine/CP%20Translations%20Service/_git/ts-be-library</connection>
        <developerConnection>scm:git:https://cleverpine@dev.azure.com/cleverpine/CP%20Translations%20Service/_git/ts-be-library</developerConnection>
        <url>dev.azure.com:v3/cleverpine/CP%20Translations%20Service/ts-be-library</url>
      <tag>v1.2.0</tag>
  </scm>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>parse-versions-for-release</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                        <configuration>
                            <propertyPrefix>parsedVersion</propertyPrefix>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                    <developmentVersion>${parsedVersion.majorVersion}.${parsedVersion.nextMinorVersion}.0-SNAPSHOT</developmentVersion>
                    <username>${user_name}</username>
                    <password>${user_password}</password>
                    <scmCommentPrefix>[skip ci]</scmCommentPrefix>
                </configuration>
            </plugin>
            <plugin>
                <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>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <name>CP Translations Util library and plugin</name>
    <description>Util library for Spring Framework projects that provides a set of tools to implement i18n.</description>
    <url>https://dev.azure.com/cleverpine/CP%20Translations%20Service/_git/ts-be-library</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Nelly Jekova</name>
            <email>nelly.jekova@cleverpine.com</email>
            <organization>CleverPine</organization>
            <organizationUrl>https://www.cleverpine.com</organizationUrl>
        </developer>
        <developer>
            <name>Yuliya Gerasimova</name>
            <email>yuliya.gerasimova@cleverpine.com</email>
            <organization>CleverPine</organization>
            <organizationUrl>https://www.cleverpine.com</organizationUrl>
        </developer>
        <developer>
            <name>Ivan Nikolov</name>
            <email>ivan.nikolov@cleverpine.com</email>
            <organization>CleverPine</organization>
            <organizationUrl>https://www.cleverpine.com</organizationUrl>
        </developer>
    </developers>

    <profiles>
        <profile>
            <id>cloud</id>
            <build>
                <plugins>
                    <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>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>