<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright © 2020-2024 Petr Panteleyev <petr@panteleyev.org>
  SPDX-License-Identifier: BSD-2-Clause
  -->
<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>org.panteleyev</groupId>
    <artifactId>java-fx-helpers</artifactId>
    <version>1.18.0</version>

    <packaging>jar</packaging>
    <name>${project.groupId}:${project.artifactId}</name>
    <description>JavaFX helper classes</description>
    <url>https://github.com/petr-panteleyev/java-fx-helpers</url>
    <licenses>
        <license>
            <name>The 2-Clause BSD License</name>
            <url>https://opensource.org/licenses/BSD-2-Clause</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Petr Panteleyev</name>
            <email>petr@panteleyev.org</email>
            <organization>panteleyev.org</organization>
            <organizationUrl>https://github.com/petr-panteleyev</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git://github.com/petr-panteleyev/java-fx-helpers.git</connection>
        <developerConnection>scm:git:ssh://github.com:petr-panteleyev/java-fx-helpers.git</developerConnection>
        <url>https://github.com/petr-panteleyev/java-fx-helpers/tree/master</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.release>21</maven.compiler.release>
        <!-- Plugins -->
        <mavenToolchainsPluginVersion>3.2.0</mavenToolchainsPluginVersion>
        <mavenCompilerPluginVersion>3.13.0</mavenCompilerPluginVersion>
        <mavenJarPluginVersion>3.4.1</mavenJarPluginVersion>
        <mavenSurefirePluginVersion>3.2.5</mavenSurefirePluginVersion>
        <mavenJavadocPluginVersion>3.7.0</mavenJavadocPluginVersion>
        <mavenSourcePluginVersion>3.3.1</mavenSourcePluginVersion>
        <mavenGpgPluginVersion>3.2.4</mavenGpgPluginVersion>
        <nexusStagingMavenPlugin>1.7.0</nexusStagingMavenPlugin>
        <!-- Dependencies -->
        <javaFxVersion>22.0.1</javaFxVersion>
        <jUnitVersion>5.10.2</jUnitVersion>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-base</artifactId>
            <version>${javaFxVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>${javaFxVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-graphics</artifactId>
            <version>${javaFxVersion}</version>
        </dependency>
        <!-- Test -->
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-swing</artifactId>
            <version>${javaFxVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${jUnitVersion}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-toolchains-plugin</artifactId>
                <version>${mavenToolchainsPluginVersion}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>toolchain</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <toolchains>
                        <jdk>
                            <version>${maven.compiler.release}</version>
                        </jdk>
                    </toolchains>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${mavenCompilerPluginVersion}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${mavenJarPluginVersion}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${mavenJavadocPluginVersion}</version>
                <configuration>
                    <notimestamp>true</notimestamp>
                    <author>false</author>
                    <bottom><![CDATA[Copyright &copy; 2015-2024, Petr Panteleyev]]></bottom>
                    <additionalOptions>-html5 --release ${maven.compiler.release}</additionalOptions>
                    <show>protected</show>
                    <doclint>none</doclint>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${mavenSurefirePluginVersion}</version>
                <configuration>
                    <argLine>
                        --add-exports javafx.base/com.sun.javafx.logging=ALL-UNNAMED
                        --add-exports javafx.graphics/com.sun.javafx.application=ALL-UNNAMED
                        --add-exports javafx.graphics/com.sun.javafx.embed=ALL-UNNAMED
                    </argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${mavenSourcePluginVersion}</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>${mavenGpgPluginVersion}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${nexusStagingMavenPlugin}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
