<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>com.github.kwart.jsign</groupId>
    <artifactId>jsignpdf-root</artifactId>
    <version>3.0.0-BETA-3</version>
    <packaging>pom</packaging>

    <name>${project.artifactId}</name>
    <description>JSignPdf - application for signing PDF files</description>
    <url>https://github.com/intoolswetrust/jsignpdf</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.release>11</maven.compiler.release>

        <maven.checkstyle.plugin.version>3.1.0</maven.checkstyle.plugin.version>
        <maven.assembly.plugin.version>3.8.0</maven.assembly.plugin.version>
        <maven.enforcer.plugin.version>3.6.2</maven.enforcer.plugin.version>
        <maven.jar.plugin.version>3.5.0</maven.jar.plugin.version>
        <maven.dependency.plugin.version>3.10.0</maven.dependency.plugin.version>
        <maven.shade.plugin.version>3.6.2</maven.shade.plugin.version>

        <bouncycastle.version>1.70</bouncycastle.version>
        <jsign.pkcs11.version>1.1.0</jsign.pkcs11.version>
        <jsign.jpedal.version>4.92.13</jsign.jpedal.version>
        <pdfbox.version>2.0.27</pdfbox.version>
        <pdf-renderer.version>140</pdf-renderer.version>
        <commons-io.version>2.21.0</commons-io.version>
        <commons-cli.version>1.11.0</commons-cli.version>
        <commons-lang3.version>3.20.0</commons-lang3.version>
        <openpdf.version>1.3.30</openpdf.version>
        <junit.version>4.13.2</junit.version>
        <openjfx.version>17.0.15</openjfx.version>
    </properties>

    <modules>
        <module>jsignpdf</module>
        <module>installcert</module>
        <module>distribution</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.github.librepdf</groupId>
                <artifactId>openpdf</artifactId>
                <version>${openpdf.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk15on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcpkix-jdk15on</artifactId>
                <version>${bouncycastle.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons-lang3.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-cli</groupId>
                <artifactId>commons-cli</artifactId>
                <version>${commons-cli.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons-io.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.rjolly</groupId>
                <artifactId>pdf-renderer</artifactId>
                <version>${pdf-renderer.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.pdfbox</groupId>
                <artifactId>pdfbox</artifactId>
                <version>${pdfbox.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.kwart.jsign</groupId>
                <artifactId>jsign-jpedal</artifactId>
                <version>${jsign.jpedal.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.kwart.jsign</groupId>
                <artifactId>jsign-pkcs11</artifactId>
                <version>${jsign.pkcs11.version}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <!-- We don't use the following jai-imageio dependency. We unify the version to make the enforcer's DependencyConvergence rule happy. -->
            <dependency>
                <groupId>com.github.jai-imageio</groupId>
                <artifactId>jai-imageio-core</artifactId>
                <version>1.4.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven.jar.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven.dependency.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven.enforcer.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${maven.shade.plugin.version}</version>
                    <configuration>
                        <filters>
                            <filter>
                                <artifact>*:*</artifact>
                                <excludes>
                                    <exclude>META-INF/*.SF</exclude>
                                    <exclude>META-INF/*.DSA</exclude>
                                    <exclude>META-INF/*.RSA</exclude>
                                    <exclude>**/module-info.class</exclude>
                                </excludes>
                            </filter>
                        </filters>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>


    <licenses>
        <license>
            <name>Mozilla Public License Version 2.0</name>
            <url>https://www.mozilla.org/en-US/MPL/2.0/</url>
        </license>
        <license>
            <name>GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1</name>
            <url>https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>kwart</id>
            <name>Josef Cacek</name>
            <email>josef@cacek.cz</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/intoolswetrust/jsignpdf.git</connection>
        <url>http://github.com/intoolswetrust/jsignpdf/</url>
        <tag>JSignPdf_3_0_0-BETA-3</tag>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://central.sonatype.com/repository/maven-snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>s01-snapshot-repository</id>
            <name>s01 Maven2 Snapshot Repository</name>
            <url>https://central.sonatype.com/repository/maven-snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>enforce-java</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <phase>compile</phase>
                                <configuration>
                                    <rules>
                                        <requireJavaVersion>
                                            <version>[11,12)</version>
                                        </requireJavaVersion>
                                    </rules>
                                </configuration>
                            </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>ossrh</serverId>
                            <nexusUrl>https://ossrh-staging-api.central.sonatype.com/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.4.0</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.12.0</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <doclint>none</doclint>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <gpgArguments>
                                <gpgArgument>--pinentry-mode</gpgArgument>
                                <gpgArgument>loopback</gpgArgument>
                            </gpgArguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
