<?xml version="1.0" encoding="UTF-8"?>

<!--
 ! Licensed to the Apache Software Foundation (ASF) under one or more
 ! contributor license agreements.  See the NOTICE file distributed with
 ! this work for additional information regarding copyright ownership.
 ! The ASF licenses this file to You under the Apache License, Version 2.0
 ! (the "License"); you may not use this file except in compliance with
 ! the License.  You may obtain a copy of the License at
 !
 !      http://www.apache.org/licenses/LICENSE-2.0
 !
 ! Unless required by applicable law or agreed to in writing, software
 ! distributed under the License is distributed on an "AS IS" BASIS,
 ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ! See the License for the specific language governing permissions and
 ! limitations under the License.
 !-->

<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>

  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <!-- don't increase number without investigation of the diffs
        https://maven.apache.org/pom/asf/ due to failure to build on jdk6 -->
    <version>19</version>
    <relativePath />
  </parent>

  <groupId>org.apache.pdfbox</groupId>
  <artifactId>pdfbox-parent</artifactId>
  <version>2.0.32</version>
  <packaging>pom</packaging>

  <name>Apache PDFBox parent</name>
  <inceptionYear>2002</inceptionYear>

  <organization>
    <name>The Apache Software Foundation</name>
    <url>https://pdfbox.apache.org</url>
  </organization>

  <scm>
    <connection>scm:svn:https://svn.apache.org/repos/asf/pdfbox/tags/2.0.32</connection>
    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/pdfbox/tags/2.0.32</developerConnection>
    <url>https://svn.apache.org/viewvc/pdfbox/tags/2.0.32</url>
  </scm>

  <issueManagement>
    <system>jira</system>
    <url>https://issues.apache.org/jira/browse/PDFBOX</url>
  </issueManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <bouncycastle.version>1.78.1</bouncycastle.version>
    <junit.version>4.13.2</junit.version>
    <jbig2.version>3.0.4</jbig2.version>
    <jai.version>1.4.0</jai.version>
    <!-- Version 2.6 and up requires Java 7 or above -->
    <commons-io.version>2.5</commons-io.version>
    <!-- Version 1.3.0 and up requires Java 8 or above -->
    <commons-logging.version>1.2</commons-logging.version>
    <!-- PDFBOX-4479 to build on jdk6 on newer Jenkins -->
    <jdk.path>${env.JAVA_HOME}</jdk.path>
  </properties>

  <modules>
    <module>fontbox</module>
    <module>xmpbox</module>
    <module>pdfbox</module>
    <module>preflight</module>
    <module>preflight-app</module>
    <module>debugger</module>
    <module>tools</module>
    <module>app</module>
    <module>debugger-app</module>
    <module>examples</module>
  </modules>

  <build>
    <plugins>
      <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <!-- fails with maven 3.6.0 on jdk 6, works with 3.2.1, 3.5.0 and 3.5.2 -->
          <configuration>
              <showDeprecation>true</showDeprecation>
              <target>1.6</target>
              <source>1.6</source>
              <encoding>UTF-8</encoding>
              <!-- https://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html -->
              <executable>${jdk.path}/bin/javac</executable>
              <fork>true</fork>
              <!-- enable these when getting CompilationFailureException without explanation: -->
              <!--
              <compilerArgument>-verbose</compilerArgument>
              <verbose>true</verbose>
              -->
          </configuration>
      </plugin>
      <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <configuration>
              <source>1.6</source>
              <links>
                  <link>https://docs.oracle.com/javase/6/docs/api/</link>
              </links>
              <encoding>UTF-8</encoding>
              <notimestamp>true</notimestamp>
              <locale>en</locale>
          </configuration>
      </plugin>
      <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <configuration>
              <autoVersionSubmodules>true</autoVersionSubmodules>
          </configuration>
      </plugin>
      <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              </manifest>
            </archive>
          </configuration>
      </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>
      <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>animal-sniffer-maven-plugin</artifactId>
              <!-- don't update, or it won't work with jdk1.7 -->
          <version>1.17</version>
          <executions>
              <execution>
                <id>check-java-version</id>
                <phase>test</phase>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                      <skip>${skipTests}</skip>
                  <signature>
                    <groupId>org.codehaus.mojo.signature</groupId>
                    <artifactId>java16</artifactId>
                    <version>1.0</version>
                  </signature>
                </configuration>
              </execution>
          </executions>
          </plugin>
      </plugins>
      <pluginManagement>
          <plugins>
              <plugin>
                  <groupId>com.googlecode.maven-download-plugin</groupId>
                  <artifactId>download-maven-plugin</artifactId>
                  <!-- PDFBOX-4980: don't update, or it won't work with jdk6 -->
                  <version>1.5.1</version>
                  <configuration>
                      <skip>${skipTests}</skip>
                  </configuration>
              </plugin>
              <plugin>
                  <artifactId>maven-enforcer-plugin</artifactId>
                  <executions>
                      <execution>
                          <goals>
                              <goal>enforce</goal>
                          </goals>
                          <configuration>
                              <rules combine.children="append">
                                  <requireMavenVersion>
                                      <version>3.2.5</version>
                                  </requireMavenVersion>
                                  <requireJavaVersion>
                                      <version>[1.7,12)</version>
                                      <message>Requires at least Java 7, and
                                          Java versions higher than 11 cannot
                                          build Java 6 bytecode</message>
                                  </requireJavaVersion>
                                  <requireEnvironmentVariable>
                                      <variableName>JAVA_HOME</variableName>
                                      <message>The JAVA_HOME environment variable must be set!</message>
                                  </requireEnvironmentVariable>
                                </rules>
                          </configuration>
                      </execution>
                  </executions>
              </plugin>
              <plugin>
                  <groupId>org.apache.rat</groupId>
                  <artifactId>apache-rat-plugin</artifactId>
                  <version>0.16.1</version>
                  <configuration>
                      <excludes>
                          <exclude>release.properties</exclude>
                      </excludes>
                  </configuration>
              </plugin>
              <plugin>
                  <groupId>org.apache.felix</groupId>
                  <artifactId>maven-bundle-plugin</artifactId>
                  <!-- don't upgrade to 4.0.x as long as we have to ensure jdk7 compatibility -->
                  <version>3.5.1</version>
              </plugin>
              <plugin>
                  <!-- default version 2.20.1 doesn't work with jdk11 -->
                  <artifactId>maven-surefire-plugin</artifactId>
                  <version>2.22.2</version>
              </plugin>
          </plugins>
      </pluginManagement>
  </build>

<profiles>
  <!-- call mvn with -Pjdk9 or call with -Daddmod="...." -->
  <profile>
      <id>jdk9</id>
      <!--
      allows automatic activation when jdk9 or jdk10 are used
      https://maven.apache.org/guides/introduction/introduction-to-profiles.html
      https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html
      -->
      <activation>
          <jdk>[9,10]</jdk>
      </activation>
      <properties>
          <addmod>--add-modules java.activation --add-modules java.xml.bind</addmod>
      </properties>
  </profile>
  <!-- need to specify release version so that if PDFBox is built with
        a version after Java 8, it can still be run with e.g. Java 6; PDFBOX-4715 -->
  <profile>
      <id>jdkGte9</id>
      <activation>
          <jdk>[1.9,)</jdk>
      </activation>
      <build>
          <plugins>
              <plugin>
                  <artifactId>maven-compiler-plugin</artifactId>
                  <configuration>
                      <release>6</release>
                  </configuration>
              </plugin>
          </plugins>
      </build>
  </profile>
  <profile>
      <!-- from jdk11 onwards activation and bind are no longer part of the jdk -->
      <!-- must be set to "test" or "provided" in subprojects -->
      <id>jdk11</id>
      <activation>
          <jdk>[11,)</jdk>
      </activation>
      <dependencyManagement>
          <dependencies>
              <dependency>
                  <groupId>javax.xml.bind</groupId>
                  <artifactId>jaxb-api</artifactId>
                  <version>2.3.1</version>
              </dependency>
              <dependency>
                  <groupId>javax.activation</groupId>
                  <artifactId>activation</artifactId>
                  <version>1.1.1</version>
              </dependency>
          </dependencies>
      </dependencyManagement>
  </profile>
  <profile>
      <id>pedantic</id>
      <build>
          <plugins>
              <plugin>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                      <systemPropertyVariables>
                          <!-- we don't want to DoS the TSA server, thus we test this only in pedantic mode -->
                          <org.apache.pdfbox.examples.pdmodel.tsa>http://time.certum.pl</org.apache.pdfbox.examples.pdmodel.tsa>
                      </systemPropertyVariables>
                  </configuration>
              </plugin>
              <plugin>
                  <groupId>org.apache.rat</groupId>
                  <artifactId>apache-rat-plugin</artifactId>
                  <executions>
                      <execution>
                          <phase>verify</phase>
                          <goals>
                              <goal>check</goal>
                          </goals>
                      </execution>
                  </executions>
              </plugin>
              <plugin>
                  <groupId>org.owasp</groupId>
                  <artifactId>dependency-check-maven</artifactId>
                  <version>10.0.3</version>
                  <configuration>
                      <failBuildOnCVSS>0</failBuildOnCVSS>
                      <!-- https://github.com/jeremylong/DependencyCheck/issues/1574 -->
                      <skipSystemScope>true</skipSystemScope>
                      <!-- cache if NVD is down
                      https://github.com/jeremylong/DependencyCheck/issues/6515#issuecomment-2012014015
                      <nvdDatafeedUrl>https://dependency-check.github.io/DependencyCheck_Builder/nvd_cache/</nvdDatafeedUrl>
                      -->
                  </configuration>
                  <executions>
                      <execution>
                          <goals>
                              <goal>check</goal>
                          </goals>
                      </execution>
                  </executions>
              </plugin>
          </plugins>
      </build>
  </profile>
    <profile>
      <id>apache-release</id>
      <properties>
          <!-- needs to exist even if empty due to problems with jacoco-maven-plugin -->
          <addmod />
      </properties>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.6</version>
            <inherited>false</inherited>
            <executions>
              <execution>
                <goals>
                  <goal>single</goal>
                </goals>
                <phase>package</phase>
                <configuration>
                  <finalName>pdfbox-${project.version}</finalName>
                  <descriptors>
                    <descriptor>assembly.xml</descriptor>
                  </descriptors>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>3.1.0</version>
            <inherited>false</inherited>
            <executions>
              <execution>
                <goals>
                  <goal>run</goal>
                </goals>
                <phase>deploy</phase>
                <configuration>
                  <target>
                    <mkdir dir="${basedir}/target/${project.version}" />
                    <copy todir="${basedir}/target/${project.version}" flatten="true">
                      <fileset dir="${basedir}">
                        <include name="RELEASE-NOTES.txt" />
                        <include name="target/*-src.zip*" />
                        <include name="fontbox/target/*-${project.version}.jar*" />
                        <include name="pdfbox/target/*-${project.version}.jar*" />
                        <include name="xmpbox/target/*-${project.version}.jar*" />
                        <include name="preflight/target/*-${project.version}.jar*" />
                        <include name="debugger/target/*-${project.version}.jar*" />
                        <include name="tools/target/*-${project.version}.jar*" />
                        <include name="app/target/*-${project.version}.jar*" />
                        <include name="preflight-app/target/*-${project.version}.jar*" />
                        <include name="debugger-app/target/*-${project.version}.jar*" />
                      </fileset>
                    </copy>
                    <checksum algorithm="SHA-512" fileext=".sha512">
                      <fileset dir="${basedir}/target/${project.version}">
                        <include name="*.zip" />
                        <include name="*.jar" />
                      </fileset>
                    </checksum>
                    <checksum file="${basedir}/target/${project.version}/pdfbox-${project.version}-src.zip" algorithm="SHA-512" property="checksum" />
                    <echo file="${basedir}/target/vote.txt">
From: ${username}@apache.org
To: dev@pdfbox.apache.org
Subject: [VOTE] Release Apache PDFBox ${project.version}

A candidate for the PDFBox ${project.version} release is available at:

    https://dist.apache.org/repos/dist/dev/pdfbox/${project.version}/

The release candidate is a zip archive of the sources in:

    https://svn.apache.org/repos/asf/pdfbox/tags/${project.version}/

The SHA-512 checksum of the archive is ${checksum}.

Please vote on releasing this package as Apache PDFBox ${project.version}.
The vote is open for the next 72 hours and passes if a majority of at
least three +1 PDFBox PMC votes are cast.

    [ ] +1 Release this package as Apache PDFBox ${project.version}
    [ ] -1 Do not release this package because...${line.separator}
                    </echo>
                    <echo />
                    <echo>
The release candidate has been prepared in:

    ${basedir}/target/${project.version}

Please commit it to

    https://dist.apache.org/repos/dist/dev/pdfbox/${project.version}/

A release vote template has been generated for you:

    file://${basedir}/target/vote.txt
                    </echo>
                    <echo />
                  </target>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                 <groupId>org.apache.ant</groupId>
                 <artifactId>ant-nodeps</artifactId>
                 <version>1.8.1</version>
               </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

      <!-- Developers listed by PMC Chair, PMC all alphabetical-->
  <developers>
      <developer>
          <id>lehmi</id>
          <name>Andreas Lehmkühler</name>
          <roles>
              <role>PMC Chair</role>
          </roles>
      </developer>
      <developer>
          <id>adam</id>
          <name>Adam Nichols</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>blitchfield</id>
          <name>Ben Litchfield</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>carrier</id>
          <name>Brian Carrier</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>danielwilson</id>
          <name>Daniel Wilson</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>gbailleul</id>
          <name>Guillaume Bailleul</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>hennejg</id>
          <name>Jörg Henne</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>holdersn</id>
          <name>Sebastian Holder</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>jahewson</id>
          <name>John Hewson</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>jeremias</id>
          <name>Jeremias Maerki</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>kjackson</id>
          <name>Kevin Jackson</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>koch</id>
          <name>Johannes Koch</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>koehlecn</id>
          <name>Carolin Köhler</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>mmayer</id>
          <name>Matthäus Mayer</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>msahyoun</id>
          <name>Maruan Sahyoun</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>pkoch</id>
          <name>Phillipp Koch</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>tallison</id>
          <name>Tim Allison</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>tchojecki</id>
          <name>Thomas Chojecki</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>tboehme</id>
          <name>Timo Boehme</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>tilman</id>
          <name>Tilman Hausherr</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>vfed</id>
          <name>Villu Ruusmann</name>
          <roles>
              <role>PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>leleueri</id>
          <name>Eric Leleu</name>
          <roles>
              <role>Emeritus PMC Member</role>
          </roles>
      </developer>
      <developer>
          <id>jukka</id>
          <name>Jukka Zitting</name>
          <roles>
              <role>Emeritus PMC Member</role>
          </roles>
      </developer>
  </developers>

</project>
