<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.pdfsam</groupId>
    <artifactId>pdfsam-parent</artifactId>
    <packaging>pom</packaging>
    <version>5.2.6</version>
    <name>PDFsam</name>
    <description>A free open source desktop application to split and merge pdf documents</description>
    <url>https://pdfsam.org</url>

    <organization>
        <name>Sober Lemur S.r.l.</name>
    </organization>

    <scm>
        <connection>scm:git:git@github.com:torakiki/pdfsam.git</connection>
        <developerConnection>scm:git:git@github.com:torakiki/pdfsam.git</developerConnection>
        <url>scm:git:git@github.com:torakiki/pdfsam.git</url>
        <tag>v5.2.6</tag>
    </scm>

    <licenses>
        <license>
            <name>GNU Affero General Public License</name>
            <url>https://www.gnu.org/licenses/agpl-3.0.html</url>
            <distribution>repo</distribution>
            <comments>AGPLv3</comments>
        </license>
    </licenses>
    
    <distributionManagement>
        <snapshotRepository>
            <id>pdfsam-ossrh-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>pdfsam-ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <activation>
                <property>
                    <name>env.CI</name>
                    <value>true</value>
                </property>
            </activation>
            <id>no-headless-failing-tests</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <excludedGroups>NoHeadless</excludedGroups>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>org.pdfsam</groupId>
                    <artifactId>javafx-monocle</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>toolchain</id>
            <activation>
                <jdk>(,21)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-toolchains-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>toolchain</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <toolchains>
                                <jdk>
                                    <version>21</version>
                                </jdk>
                            </toolchains>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>basic-release</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <additionalOptions>
                                <additionalOption>-Xdoclint:none</additionalOption>
                                <additionalOption>--enable-preview</additionalOption>
                            </additionalOptions>
                            <release>21</release>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <configuration>
                            <tagNameFormat>v@{project.version}</tagNameFormat>
                            <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <preparationGoals>clean install</preparationGoals>
                            <localCheckout>true</localCheckout>
                            <goals>package</goals>
                        </configuration>
                    </plugin>
                    <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.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.7.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>pdfsam-ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                            <skipNexusStagingDeployMojo>false</skipNexusStagingDeployMojo>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <modules>
        <module>pdfsam-basic</module>
        <module>pdfsam-model</module>
        <module>pdfsam-gui</module>
        <module>pdfsam-i18n</module>
        <module>pdfsam-core</module>
        <module>pdfsam-service</module>
        <module>pdfsam-ui-components</module>
        <module>pdfsam-persistence</module>
        <module>pdfsam-themes</module>
        <module>pdfsam-tools/pdfsam-merge</module>
        <module>pdfsam-tools/pdfsam-simple-split</module>
        <module>pdfsam-tools/pdfsam-split-by-size</module>
        <module>pdfsam-tools/pdfsam-split-by-bookmarks</module>
        <module>pdfsam-tools/pdfsam-alternate-mix</module>
        <module>pdfsam-tools/pdfsam-rotate</module>
        <module>pdfsam-tools/pdfsam-extract</module>
        <module>pdfsam-tools/pdfsam-backpages</module>
        <module>pdfsam-test</module>
        <module>pdfsam-docs</module>
    </modules>

    <developers>
        <developer>
            <id>torakiki</id>
            <name>Andrea Vacondio</name>
            <email>andrea.vacondio@gmail.com</email>
        </developer>
    </developers>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.13.0</version>
                    <configuration>
                        <release>21</release>
                        <!-- remove this once Foreign Function & Memory API is out of preview-->
                        <compilerArgs>--enable-preview</compilerArgs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.4.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.7.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.7.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.4.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.6.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-toolchains-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.3.1</version>
                    <configuration>
                        <useModulePath>false</useModulePath>
                        <!-- remove this once Foreign Function & Memory API is out of preview-->
                        <argLine>--enable-preview</argLine>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.2.5</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.8.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <properties>
        <junit.version>5.11.0</junit.version>
        <junit.pioneer.version>2.2.0</junit.pioneer.version>
        <archunit.version>1.3.0</archunit.version>
        <slf4j.version>2.0.16</slf4j.version>
        <commons.lang.version>3.16.0</commons.lang.version>
        <commons.io.version>2.16.1</commons.io.version>
        <mockito.version>5.12.0</mockito.version>
        <tinylog.version>2.7.0</tinylog.version>
        <hibernate-validator.version>7.0.5.Final</hibernate-validator.version>
        <sejda.version>5.1.1</sejda.version>
        <sejda-io.version>4.0.0.M4</sejda-io.version>
        <sejda.commons.version>3.0.0</sejda.commons.version>
        <eventstudio.version>4.0.1</eventstudio.version>
        <injector.version>5.0.0</injector.version>
        <ikonli.version>12.3.1</ikonli.version>
        <testfx.version>4.0.18</testfx.version>
        <jackson.version>2.17.2</jackson.version>
        <bouncycastle.version>1.78.1</bouncycastle.version>
        <assertj.version>3.26.3</assertj.version>
        <hamcrest.version>2.2</hamcrest.version>
        <javafx.version>21.0.4</javafx.version>
        <jakarta-el.version>4.0.2</jakarta-el.version>
        <jakarta.inject.version>2.0.1</jakarta.inject.version>
        <validation.api.version>3.0.2</validation.api.version>
        <awaitility.version>4.2.0</awaitility.version>
        <monocle.version>21</monocle.version>
        <maven.build.timestamp.format>dd-MMM-yyyy</maven.build.timestamp.format>
        <pdfsam.builddate>${maven.build.timestamp}</pdfsam.builddate>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.javadoc.failOnError>false</maven.javadoc.failOnError>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.fasterxml.jackson</groupId>
                <artifactId>jackson-bom</artifactId>
                <version>${jackson.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.kordamp.ikonli</groupId>
                <artifactId>ikonli-bom</artifactId>
                <version>${ikonli.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>jakarta.validation</groupId>
                <artifactId>jakarta.validation-api</artifactId>
                <version>${validation.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>jakarta.el</artifactId>
                <version>${jakarta-el.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.validator</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>${hibernate-validator.version}</version>
            </dependency>
            <dependency>
                <groupId>org.pdfsam</groupId>
                <artifactId>eventstudio</artifactId>
                <version>${eventstudio.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons.io.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons.lang.version}</version>
            </dependency>
            <dependency>
                <groupId>org.sejda</groupId>
                <artifactId>sejda-io</artifactId>
                <version>${sejda-io.version}</version>
            </dependency>
            <dependency>
                <groupId>org.sejda</groupId>
                <artifactId>sejda-model</artifactId>
                <version>${sejda.version}</version>
            </dependency>
            <dependency>
                <groupId>org.sejda</groupId>
                <artifactId>sejda-conversion</artifactId>
                <version>${sejda.version}</version>
            </dependency>
            <dependency>
                <groupId>org.sejda</groupId>
                <artifactId>sejda-core</artifactId>
                <version>${sejda.version}</version>
            </dependency>
            <dependency>
                <groupId>org.sejda</groupId>
                <artifactId>sejda-sambox</artifactId>
                <version>${sejda.version}</version>
            </dependency>
            <dependency>
                <groupId>org.pdfsam</groupId>
                <artifactId>pdfsam-injector</artifactId>
                <version>${injector.version}</version>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-base</artifactId>
                <version>${javafx.version}</version>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-controls</artifactId>
                <version>${javafx.version}</version>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-graphics</artifactId>
                <version>${javafx.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk18on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcmail-jdk18on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.inject</groupId>
                <artifactId>jakarta.inject-api</artifactId>
                <version>${jakarta.inject.version}</version>
            </dependency>
            <dependency>
                <groupId>org.tinylog</groupId>
                <artifactId>slf4j-tinylog</artifactId>
                <version>${tinylog.version}</version>
            </dependency>
            <dependency>
                <groupId>org.tinylog</groupId>
                <artifactId>tinylog-impl</artifactId>
                <version>${tinylog.version}</version>
            </dependency>
            <dependency>
                <groupId>org.tinylog</groupId>
                <artifactId>tinylog-api</artifactId>
                <version>${tinylog.version}</version>
            </dependency>
            <!-- test -->
            <dependency>
                <groupId>org.testfx</groupId>
                <artifactId>testfx-core</artifactId>
                <version>${testfx.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.testfx</groupId>
                <artifactId>testfx-junit5</artifactId>
                <version>${testfx.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.pdfsam</groupId>
                <artifactId>javafx-monocle</artifactId>
                <version>${monocle.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.openjfx</groupId>
                <artifactId>javafx-swing</artifactId>
                <version>${javafx.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.sejda</groupId>
            <artifactId>sejda-commons</artifactId>
            <version>${sejda.commons.version}</version>
        </dependency>
        <!-- test depts -->
        <dependency>
            <groupId>org.sejda</groupId>
            <artifactId>sejda-tests</artifactId>
            <version>${sejda.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit-pioneer</groupId>
            <artifactId>junit-pioneer</artifactId>
            <version>${junit.pioneer.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.tngtech.archunit</groupId>
            <artifactId>archunit-junit5</artifactId>
            <version>${archunit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.tinylog</groupId>
            <artifactId>slf4j-tinylog</artifactId>
            <version>${tinylog.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.tinylog</groupId>
            <artifactId>tinylog-impl</artifactId>
            <version>${tinylog.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>animal-sniffer-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <version>${awaitility.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
