<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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.gluonhq</groupId>
    <artifactId>rich-text-area</artifactId>
    <version>1.2.2</version>
    <packaging>jar</packaging>

    <name>Rich Text Area</name>
    <description>Rich text control for JavaFX</description>
    <inceptionYear>2022</inceptionYear>
    <url>https://github.com/gluonhq/rich-text-area</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.release>11</maven.compiler.release>
        <javafx.version>23.0.1</javafx.version>
        <gpg.plugin.version>3.2.7</gpg.plugin.version>
        <emoji.version>1.1.0</emoji.version>
        <test.headless/>
        <test.javafx.version>24-headless+0-2024-12-02-101029</test.javafx.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.openjfx</groupId>
            <artifactId>javafx-controls</artifactId>
            <version>${javafx.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.gluonhq.emoji</groupId>
            <artifactId>emoji</artifactId>
            <version>${emoji.version}</version>
        </dependency>
        <dependency>
            <groupId>com.gluonhq.emoji</groupId>
            <artifactId>offline</artifactId>
            <version>${emoji.version}</version>
        </dependency>

        <!-- TEST -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.11.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testfx</groupId>
            <artifactId>testfx-core</artifactId>
            <version>4.0.19-gluon-SNAPSHOT</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testfx</groupId>
            <artifactId>testfx-junit5</artifactId>
            <version>4.0.19-gluon-SNAPSHOT</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <version>3.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.26.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <developers>
        <developer>
            <name>Eugene Ryzhikov</name>
            <email>eugene.ryzhikov@gluonhq.com</email>
            <organization>Gluon</organization>
            <organizationUrl>https://www.gluonhq.com</organizationUrl>
        </developer>
        <developer>
            <name>José Pereda</name>
            <email>jose.pereda@gluonhq.com</email>
            <organization>Gluon</organization>
            <organizationUrl>https://www.gluonhq.com</organizationUrl>
        </developer>
        <developer>
            <name>Abhinay Agarwal</name>
            <email>abhinay.agarwal@gluonhq.com</email>
            <organization>Gluon</organization>
            <organizationUrl>https://www.gluonhq.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/gluonhq/rich-text-area</url>
        <connection>scm:git:git://github.com/gluonhq/rich-text-area.git</connection>
        <developerConnection>scm:git:ssh://git@github.com:gluonhq/rich-text-area.git</developerConnection>
    </scm>

    <organization>
        <name>Gluon</name>
        <url>https://www.gluonhq.com</url>
    </organization>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/gluonhq/rich-text-area/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>GNU GENERAL PUBLIC LICENSE, Version 3</name>
            <url>http://www.gnu.org/licenses/gpl-3.0.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <repositories>
        <repository>
            <id>Gluon Releases</id>
            <url>https://nexus.gluonhq.com/nexus/content/repositories/releases/</url>
        </repository>
        <repository>
            <id>Gluon Snapshots</id>
            <url>https://nexus.gluonhq.com/nexus/content/repositories/public-snapshots/</url>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.11.1</version>
                <executions>
                    <execution>
                        <id>javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <additionalJOption>-javafx</additionalJOption>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.7.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                    <waitUntil>published</waitUntil>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.5.2</version>
                <configuration>
                    <trimStackTrace>false</trimStackTrace>
                    <argLine>${test.headless} --add-opens javafx.graphics/com.sun.javafx.application=ALL-UNNAMED</argLine>
                    <systemProperties>
                        <property>
                            <name>java.util.logging.config.file</name>
                            <value>src/test/resources/logging.properties</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${gpg.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <!-- This is necessary for gpg to not try to use the pinentry programs -->
                                    <!-- Only required for GPG >= 2.2 -->
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>test</id>
            <properties>
                <test.headless>-Dtestfx.headless=true</test.headless>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.openjfx</groupId>
                    <artifactId>javafx-controls</artifactId>
                    <version>${test.javafx.version}</version>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
</project>
