<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2014-2023 Philip Helger (www.helger.com)
    philip[at]helger[dot]com

    Licensed 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>com.helger</groupId>
    <artifactId>parent-pom</artifactId>
    <version>2.0.4</version>
  </parent>
  <artifactId>ph-pdf-layout</artifactId>
  <version>7.3.0</version>
  <packaging>bundle</packaging>
  <name>ph-pdf-layout</name>
  <description>Library for creating nicely layouted PDF documents based on PDFBox</description>
  <url>https://github.com/phax/ph-pdf-layout</url>
  <inceptionYear>2014</inceptionYear>

  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <repositories>
    <repository>
      <id>ApacheSnapshot</id>
      <name>Apache Repository</name>
      <url>https://repository.apache.org/content/groups/snapshots/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <scm>
    <connection>scm:git:https://github.com/phax/ph-pdf-layout.git</connection>
    <developerConnection>scm:git:https://github.com/phax/ph-pdf-layout.git</developerConnection>
    <url>http://github.com/phax/ph-pdf-layout</url>
    <tag>ph-pdf-layout-7.3.0</tag>
  </scm>

  <organization>
    <name>Philip Helger</name>
    <url>http://www.helger.com</url>
  </organization>

  <developers>
    <developer>
      <id>philip</id>
      <name>Philip Helger</name>
      <email>ph(at)helger.com</email>
      <url>http://www.helger.com</url>
    </developer>
  </developers>

  <properties>
    <pdfbox.version>3.0.0</pdfbox.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.helger.commons</groupId>
        <artifactId>ph-commons-parent-pom</artifactId>
        <version>11.1.2</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.helger.font</groupId>
        <artifactId>ph-fonts-parent-pom</artifactId>
        <version>5.0.1</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.pdfbox</groupId>
        <artifactId>pdfbox</artifactId>
        <version>${pdfbox.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.pdfbox</groupId>
        <artifactId>xmpbox</artifactId>
        <version>${pdfbox.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.pdfbox</groupId>
        <artifactId>pdfbox-examples</artifactId>
        <version>${pdfbox.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.pdfbox</groupId>
        <artifactId>pdfbox-app</artifactId>
        <version>${pdfbox.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.pdfbox</groupId>
        <artifactId>jbig2-imageio</artifactId>
        <version>3.0.4</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>com.helger.commons</groupId>
      <artifactId>ph-commons</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.commons</groupId>
      <artifactId>ph-collection</artifactId>
    </dependency>
    <dependency>
      <groupId>com.helger.font</groupId>
      <artifactId>ph-fonts-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.pdfbox</groupId>
      <artifactId>pdfbox</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.pdfbox</groupId>
      <artifactId>xmpbox</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
    </dependency>

    <dependency>
      <groupId>com.helger.commons</groupId>
      <artifactId>ph-xml</artifactId>
      <optional>true</optional>
    </dependency>
    <!-- For reading PDFs with contained JPEGs -->    
    <dependency>
      <groupId>org.apache.pdfbox</groupId>
      <artifactId>jbig2-imageio</artifactId>
      <optional>true</optional>
    </dependency>
    <!-- For reading encrypted PDFs -->
    <!--  
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcmail-jdk15on</artifactId>
      <version>${bc.version}</version>
      <optional>true</optional>
    </dependency>
    -->
    <dependency>
      <groupId>com.github.spotbugs</groupId>
      <artifactId>spotbugs-annotations</artifactId>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.helger.font</groupId>
      <artifactId>ph-fonts-alegreya-sans</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.helger.font</groupId>
      <artifactId>ph-fonts-anaheim</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.helger.font</groupId>
      <artifactId>ph-fonts-exo2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.helger.font</groupId>
      <artifactId>ph-fonts-lato2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.helger.font</groupId>
      <artifactId>ph-fonts-open-sans</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.helger.font</groupId>
      <artifactId>ph-fonts-roboto</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.helger.font</groupId>
      <artifactId>ph-fonts-source-sans-pro</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.helger.font</groupId>
      <artifactId>ph-fonts-markazi</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.helger.font</groupId>
      <artifactId>ph-fonts-noto-sans-hk</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.helger.font</groupId>
      <artifactId>ph-fonts-noto-sans-sc</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.pdfbox</groupId>
      <artifactId>pdfbox-examples</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.pdfbox</groupId>
      <artifactId>pdfbox-app</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <!-- Don't specify the targetPath because this leads to a broken JAR file 
        in combination with the bundle plugin (absolute file paths in ZIP file) -->
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>**/*.properties</include>
        </includes>
      </resource>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>**/*.properties</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Automatic-Module-Name>com.helger.pdflayout</Automatic-Module-Name>
            <Export-Package>org.apache.pdfbox.pdmodel.font;-split-package:=first,
              org.apache.pdfbox.pdmodel;-split-package:=first,
              com.helger.pdflayout.*</Export-Package>
            <Private-Package>org.apache.pdfbox.pdmodel.font;-split-package:=first,
              org.apache.pdfbox.pdmodel;-split-package:=first,
              com.helger.pdflayout.*</Private-Package>
            <Import-Package>!javax.annotation.*,*</Import-Package>
            <Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
            <Provide-Capability>osgi.serviceloader; osgi.serviceloader=com.helger.commons.thirdparty.IThirdPartyModuleProviderSPI</Provide-Capability>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>de.thetaphi</groupId>
        <artifactId>forbiddenapis</artifactId>
        <configuration>
          <signaturesArtifacts>
            <signaturesArtifact>
              <groupId>com.helger</groupId>
              <artifactId>ph-forbidden-apis</artifactId>
              <version>1.1.1</version>
              <type>jar</type>
              <path>forbidden-apis-java9.txt</path>
            </signaturesArtifact>
          </signaturesArtifacts>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <source>8</source>
        </configuration>
      </plugin> 
    </plugins>
  </build>
</project>
