<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>one.jpro.platform.jpms</groupId>
    <artifactId>jpms-parent</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>

    <name>JPro JPMS Dependencies Parent</name>
    <description>Parent POM for JPMS-compliant modules</description>

    <properties>
        <!-- Common properties -->
        <core.artifact.release>jpms</core.artifact.release>

        <!-- Project Encoding -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.resourceEncoding>UTF-8</project.build.resourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- Maven Plugin Versions -->
        <maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
        <maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version>
        <moditect-maven-plugin.version>1.2.2.Final</moditect-maven-plugin.version>
        <maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
        <build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
        <maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
        <central-publishing-maven-plugin.version>0.6.0</central-publishing-maven-plugin.version>
        <maven-deploy-plugin.version>3.1.3</maven-deploy-plugin.version>
    </properties>

    <!-- Common license, organization, developers, SCM, and issue management -->
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <url>https://www.jpro.one/</url>

    <organization>
        <name>JPro</name>
        <url>https://github.com/JPro-one</url>
    </organization>

    <developers>
        <developer>
            <id>jpro</id>
            <name>JPro Team</name>
            <email>info@jpro.one</email>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/JPro-one/jpro-jpms-deps</url>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/JPro-one/jpro-jpms-deps/issues</url>
    </issueManagement>

    <!-- Added modules section -->
    <modules>
        <module>cssfx</module>
        <module>eclipse-collections</module>
        <module>eclipse-collections-api</module>
        <module>guava</module>
        <module>jsr305</module>
        <module>jwks-rsa</module>
        <module>jwks-rsa-ikmdev</module>
        <module>openjfx-monocle-17</module>
        <module>openjfx-monocle-21</module>
        <module>testfx-core</module>
        <module>testfx-junit5</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Common Plugins -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven-dependency-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${build-helper-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.moditect</groupId>
                    <artifactId>moditect-maven-plugin</artifactId>
                    <version>${moditect-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>${maven-antrun-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven-gpg-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <version>${central-publishing-maven-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <!-- Profile for Maven Central Deployment -->
        <profile>
            <id>publishToSonatype</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>jpro-central-repository</publishingServerId>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <!-- Profile for JFrog Deployment -->
        <profile>
            <id>publishToSandec</id>
            <distributionManagement>
                <repository>
                    <id>jpro-sandec-repository</id>
                    <url>https://sandec.jfrog.io/artifactory/repo</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>deploy-artifact</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
