<?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.pdfbox</groupId>
        <artifactId>pdfbox-parent</artifactId>
        <version>2.0.4</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>

    <artifactId>pdfbox</artifactId>
    <packaging>bundle</packaging>

    <name>Apache PDFBox</name>
    <description>
        The Apache PDFBox library is an open source Java tool for working with PDF documents.
    </description>
    <inceptionYear>2002</inceptionYear>
    
    <properties>
    	<git.scmJavadocUrl>git:https://git-wip-us.apache.org/repos/asf/pdfbox-docs//content/docs/${project.version}/javadocs</git.scmJavadocUrl>
    </properties>
    
    <dependencies>
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>fontbox</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcmail-jdk15on</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk15on</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.googlecode.java-diff-utils</groupId>
            <artifactId>diffutils</artifactId>
            <version>1.3.0</version>
            <scope>test</scope>
        </dependency>
        <!-- For legal reasons (incompatible license), these three dependencies below
        are to be used only in the tests and may not be distributed. 
        See also LEGAL-195 -->
        <dependency>
            <groupId>com.levigo.jbig2</groupId>
            <artifactId>levigo-jbig2-imageio</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.jai-imageio</groupId>
            <artifactId>jai-imageio-core</artifactId>
            <scope>test</scope>
        </dependency>    
        <dependency>
            <groupId>com.github.jai-imageio</groupId>
            <artifactId>jai-imageio-jpeg2000</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.properties</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>**/*.properties</exclude>
                </excludes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>-Xmx768m</argLine>
                    <excludes>
                        <exclude>org/apache/pdfbox/rendering/TestPDFToImage.java</exclude>
                    </excludes>
                    <systemPropertyVariables>
                        <java.util.logging.config.file>src/test/resources/logging.properties</java.util.logging.config.file>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Include-Resource>
                            {maven-resources},
                            META-INF=target/maven-shared-archive-resources/META-INF,
                            org/apache/pdfbox/resources=target/classes/org/apache/pdfbox/resources
                        </Include-Resource>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>src/main/resources/org/apache/pdfbox/resources/afm/*</exclude>
                        <exclude>src/main/resources/org/apache/pdfbox/resources/icc/*</exclude>
                        <exclude>src/main/resources/org/apache/pdfbox/resources/glyphlist/glyphlist.txt</exclude>
                        <exclude>src/main/resources/org/apache/pdfbox/resources/glyphlist/zapfdingbats.txt</exclude>
                        <exclude>src/main/resources/org/apache/pdfbox/resources/text/BidiMirroring.txt</exclude>
                        <exclude>src/main/resources/META-INF/services/*</exclude>
                        <exclude>src/test/resources/input/rendering/*.ai</exclude>
                        <exclude>src/test/resources/input/*.txt</exclude>
                        <exclude>src/test/resources/output/*</exclude>
                        <exclude>src/test/resources/org/apache/pdfbox/pdmodel/sRGB.*</exclude>
                        <exclude>release.properties</exclude>
                        <exclude>src/test/resources/org/apache/pdfbox/encryption/*.der</exclude>
                        <exclude>src/test/resources/org/apache/pdfbox/encryption/*.pfx</exclude>
                        <exclude>src/test/resources/org/apache/pdfbox/filter/*.bin</exclude>
                        <exclude>src/test/resources/org/apache/pdfbox/text/*.txt</exclude>
                        <exclude>src/main/java/org/apache/pdfbox/filter/CCITTFaxDecoderStream.java</exclude>
                        <exclude>src/main/java/org/apache/pdfbox/filter/CCITTFaxEncoderStream.java</exclude>
                        <exclude>src/main/java/org/apache/pdfbox/filter/TIFFExtension.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <!-- 
            	Publish Javadoc to Apache CMS
            	After completion log in to https://cms.apache.org/pdfbox/publish 
            	and click on the Submit button to commit to production.
             -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-publish-plugin</artifactId>
                <configuration>
                    <content>${project.reporting.outputDirectory}/apidocs</content>
                    <pubScmUrl>scm:${git.scmJavadocUrl}</pubScmUrl>
                    <tryUpdate>true</tryUpdate>
                    <checkoutDirectory>${svn.scmJavadocCheckoutDirectory}</checkoutDirectory>
                    <serverId>pdfbox-site</serverId>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

