<?xml version="1.0" encoding="UTF-8"?>
<!--

    Xpdf API Parent - The Xpdf API parent project (https://xpdf.io)
    Copyright © 2024 xpdf.io (info@xpdf.io)

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, version 3.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program. If not, see <http://www.gnu.org/licenses/>.

-->
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>io.xpdf</groupId>
    <artifactId>xpdf-api-parent</artifactId>
    <version>1.2.0</version>
    <packaging>pom</packaging>

    <modules>
        <module>common-api</module>
        <module>pdf-images-api</module>
        <module>pdf-images-api-spring-boot-starter</module>
        <module>pdf-info-api</module>
        <module>pdf-info-api-spring-boot-starter</module>
        <module>pdf-text-api</module>
        <module>pdf-text-api-spring-boot-starter</module>
    </modules>

    <name>Xpdf API Parent</name>
    <description>The Xpdf API parent project (https://xpdf.io)</description>
    <url>https://xpdf.io</url>
    <licenses>
        <license>
            <name>GNU General Public License, version 3 (GPLv3)</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.html</url>
        </license>
    </licenses>
    <inceptionYear>2024</inceptionYear>
    <developers>
        <developer>
            <name>Cody Frehr</name>
            <email>cfrehr@gmail.com</email>
            <organization>Xpdf API</organization>
            <organizationUrl>https://github.com/codyfrehr/xpdf-api</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/codyfrehr/xpdf-api.git</connection>
        <developerConnection>scm:git:ssh://github.com:codyfrehr/xpdf-api.git</developerConnection>
        <url>http://github.com/codyfrehr/xpdf-api/tree/main</url>
    </scm>

    <properties>
        <cucumber.version>7.15.0</cucumber.version>
        <cucumber-junit-platform.version>7.15.0</cucumber-junit-platform.version>
        <gpg.skip>true</gpg.skip>
        <junit-jupiter.version>5.10.2</junit-jupiter.version>
        <junit-platform-suite.version>1.10.2</junit-platform-suite.version>
        <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
        <kotlin.version>1.9.22</kotlin.version>
        <slf4j.version>2.0.11</slf4j.version>
        <lombok.version>1.18.28</lombok.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.javadoc.skip>true</maven.javadoc.skip>
        <maven.source.skip>true</maven.source.skip>
        <mockito.version>4.11.0</mockito.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <spring-boot.version>2.7.18</spring-boot.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.14.0</version>
            </dependency>
            <dependency>
                <groupId>io.xpdf</groupId>
                <artifactId>common-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.xpdf</groupId>
                <artifactId>pdf-images-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.xpdf</groupId>
                <artifactId>pdf-info-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.xpdf</groupId>
                <artifactId>pdf-text-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.12.0</version>
            </dependency>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter</artifactId>
                <version>${spring-boot.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!--test-->
            <dependency>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-java</artifactId>
                <version>${cucumber.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-junit-platform-engine</artifactId>
                <version>${cucumber-junit-platform.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.kotest</groupId>
                <artifactId>kotest-assertions-core-jvm</artifactId>
                <version>5.8.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.mockk</groupId>
                <artifactId>mockk-jvm</artifactId>
                <version>1.12.8</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>3.24.2</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-stdlib</artifactId>
                <version>${kotlin.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit-jupiter.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-suite-engine</artifactId>
                <version>${junit-platform-suite.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-inline</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-nop</artifactId>
                <version>${slf4j.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${slf4j.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-test</artifactId>
                <version>${spring-boot.version}</version>
                <scope>test</scope>
            </dependency>
            <!--CVE overrides-->
            <dependency>
                <!--spring boot starter-->
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>2.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!--dependencies that should be in every module-->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <!--test-->
        <dependency>
            <groupId>io.kotest</groupId>
            <artifactId>kotest-assertions-core-jvm</artifactId>
        </dependency>
        <dependency>
            <groupId>io.mockk</groupId>
            <artifactId>mockk-jvm</artifactId>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-inline</artifactId>
        </dependency>
        <!--CVE overrides-->
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-maven-plugin</artifactId>
                    <version>${kotlin.version}</version>
                    <extensions>true</extensions>
                    <executions>
                        <execution>
                            <id>test-compile</id>
                            <goals>
                                <goal>test-compile</goal>
                            </goals>
                            <configuration>
                                <sourceDirs>
                                    <sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
                                </sourceDirs>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.11.0</version>
                    <configuration>
                        <annotationProcessorPaths>
                            <path>
                                <groupId>org.projectlombok</groupId>
                                <artifactId>lombok</artifactId>
                                <version>${lombok.version}</version>
                            </path>
                        </annotationProcessorPaths>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default-testCompile</id>
                            <phase>none</phase>
                        </execution>
                        <execution>
                            <id>java-test-compile</id>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.0</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.6.3</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                        <tags>
                            <tag>
                                <name>implNote</name>
                                <placement>a</placement>
                                <head>Implementation Note:</head>
                            </tag>
                        </tags>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.5.0</version>
                    <dependencies>
                        <dependency>
                            <groupId>de.skuzzle.enforcer</groupId>
                            <artifactId>restrict-imports-enforcer-rule</artifactId>
                            <version>2.6.0</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>enforce-banned-logging-dependencies</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <phase>test-compile</phase>
                            <configuration>
                                <rules>
                                    <!--this rule prevents developers from including logging dependencies
                                        this project uses SLF4J interface and should leave logging implementation up to the end user-->
                                    <bannedDependencies>
                                        <message>Please remove logging dependencies (this project should use SLF4J logging interface only)</message>
                                        <excludes>
                                            <exclude>org.apache.logging.log4j</exclude>
                                            <exclude>log4j</exclude>
                                            <exclude>commons-logging</exclude>
                                            <exclude>ch.qos.logback</exclude>
                                        </excludes>
                                        <searchTransitive>true</searchTransitive>
                                    </bannedDependencies>
                                </rules>
                            </configuration>
                        </execution>
                        <execution>
                            <id>enforce-banned-logging-imports</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <phase>test-compile</phase>
                            <configuration>
                                <rules>
                                    <!--this rule prevents developers from importing JUL loggers
                                        JUL logging is built in to java and cannot be prevented via dependency check
                                        this project uses SLF4J interface and should leave logging implementation up to the end user-->
                                    <RestrictImports>
                                        <reason>Please remove java.util.logging imports (this project should use SLF4J logging interface only)</reason>
                                        <bannedImports>
                                            <bannedImport>java.util.logging.**</bannedImport>
                                        </bannedImports>
                                    </RestrictImports>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.2.5</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.11</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>3.2.5</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                    <configuration>
                        <gpgArguments>
                            <arg>--pinentry-mode</arg>
                            <arg>loopback</arg>
                        </gpgArguments>
                    </configuration>
                    <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>
                    <version>0.4.0</version>
                    <extensions>true</extensions>
                    <configuration>
                        <publishingServerId>central</publishingServerId>
                        <tokenAuth>true</tokenAuth>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>4.6</version>
                    <configuration>
                        <properties>
                            <owner>xpdf.io</owner>
                            <email>info@xpdf.io</email>
                        </properties>
                        <licenseSets>
                            <licenseSet>
                                <header>com/mycila/maven/plugin/license/templates/GPL-3-ONLY.txt</header>
                                <excludes>
                                    <exclude>.m2/**</exclude>
                                    <exclude>*.adoc</exclude>
                                    <exclude>src/main/resources/**</exclude>
                                    <exclude>src/test/resources/**</exclude>
                                </excludes>
                            </licenseSet>
                        </licenseSets>
                        <dependencyEnforce>true</dependencyEnforce>
                        <dependencyExceptionMessage>Please verify that the following dependencies are GPLv3 compatible:</dependencyExceptionMessage>
                        <dependencyPolicies>
                            <dependencyPolicy>
                                <type>ARTIFACT_PATTERN</type>
                                <rule>APPROVE</rule>
                                <value>io.xpdf</value>
                            </dependencyPolicy>
                            <dependencyPolicy>
                                <type>LICENSE_NAME</type>
                                <rule>APPROVE</rule>
                                <value>Apache License, Version 2.0</value>
                            </dependencyPolicy>
                            <dependencyPolicy>
                                <type>LICENSE_NAME</type>
                                <rule>APPROVE</rule>
                                <value>Apache-2.0</value>
                            </dependencyPolicy>
                            <dependencyPolicy>
                                <type>LICENSE_NAME</type>
                                <rule>APPROVE</rule>
                                <value>GNU Lesser General Public License</value>
                            </dependencyPolicy>
                            <dependencyPolicy>
                                <type>LICENSE_NAME</type>
                                <rule>APPROVE</rule>
                                <value>MIT License</value>
                            </dependencyPolicy>
                        </dependencyPolicies>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.6.1</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <!--plugins that should be in every module-->
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
            </plugin>
            <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>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>