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

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

    <parent>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>closedsource-pom</artifactId>
        <version>5.0.24</version>
    </parent>

    <groupId>com.atlassian.plugins</groupId>
    <artifactId>document-conversion-library</artifactId>
    <version>2.1.0</version>
    <packaging>atlassian-plugin</packaging>

    <name>Document Conversion Library</name>
    <description>Document conversion library for office documents, images, pdfs, etc</description>
    <organization>
        <name>Atlassian</name>
        <url>http://www.atlassian.com/</url>
    </organization>

    <scm>
        <connection>scm:git:ssh://git@stash.atlassian.com:7997/confserver/document-conversion-library.git</connection>
        <developerConnection>scm:git:ssh://git@stash.atlassian.com:7997/confserver/document-conversion-library.git</developerConnection>
        <url>https://stash.atlassian.com/projects/CONFSERVER/repos/document-conversion-library</url>
        <tag>document-conversion-library-2.1.0</tag>
    </scm>

    <properties>
        <platform.version>2.23.4</platform.version>
        <refapp.version>2.21.2</refapp.version>
        <amps8.version>8.0.2</amps8.version>
        <confluence.version>6.10.2</confluence.version>
        <plugin.testrunner.version>1.1.4</plugin.testrunner.version>
        <javadoc.additional.params>-Xdoclint:none</javadoc.additional.params>
        <pdfbox.version>2.0.6</pdfbox.version>

        <aspose.slides.version>18.1</aspose.slides.version>
        <aspose.pdf.version>11.9.0</aspose.pdf.version>
        <aspose.word.version>16.4.0</aspose.word.version>
        <aspose.cells.version>18.2</aspose.cells.version>
        <aspose.imaging.version>2.1.0.0</aspose.imaging.version>
        <mockito.version>2.28.2</mockito.version>
        <byte-buddy.version>1.9.13</byte-buddy.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.platform</groupId>
                <artifactId>platform</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.platform</groupId>
                <artifactId>third-party</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-plugins-platform-pom</artifactId>
                <version>${confluence.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- TODO remove version override when on Confluence 7.0.1 or higher -->
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy</artifactId>
                <version>${byte-buddy.version}</version>
            </dependency>
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy-agent</artifactId>
                <version>${byte-buddy.version}</version>
            </dependency>
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy-dep</artifactId>
                <version>${byte-buddy.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <!--
        *** ¡¡¡¡¡¡¡¡¡¡¡ WARNING !!!!!!!!!!!!! ***
        Adding or modifying dependencies in this project is dangerous, Will Robinson.

        The generated jar is almost 65535 files (not classes) and Java 6 can't work with it after it reaches that number.
        So if you need to add or modify anything, test everything thoroughly. If you get a "class not found" when compiling with Maven,
        that's certainly the problem.

        If you're using Java 7, you can ignore this.
    -->
    <dependencies>
        <!-- Aspose -->
        <dependency>
            <groupId>com.aspose</groupId>
            <artifactId>aspose-words</artifactId>
            <version>${aspose.word.version}</version>
            <classifier>jdk16</classifier>
        </dependency>
        <dependency>
            <groupId>com.aspose</groupId>
            <artifactId>aspose-cells</artifactId>
            <version>${aspose.cells.version}</version>
        </dependency>
        <dependency>
            <groupId>com.aspose</groupId>
            <artifactId>aspose-slides</artifactId>
            <version>${aspose.slides.version}</version>
            <classifier>jdk16</classifier>
        </dependency>
        <dependency>
            <groupId>com.aspose</groupId>
            <artifactId>aspose-imaging</artifactId>
            <version>${aspose.imaging.version}</version>
            <classifier>jdk16</classifier>
        </dependency>
        <dependency>
            <groupId>com.aspose</groupId>
            <artifactId>aspose-pdf</artifactId>
            <version>${aspose.pdf.version}</version>
        </dependency>
        <dependency>
            <groupId>com.aspose</groupId>
            <artifactId>aspose-pdf-legacy</artifactId>
            <version>${aspose.pdf.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox</artifactId>
            <version>${pdfbox.version}</version>
            <scope>provided</scope>
        </dependency>
        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/xmpbox -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>xmpbox</artifactId>
            <version>${pdfbox.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk15on</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- Testing -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>xmlunit</groupId>
            <artifactId>xmlunit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>


        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Confluence -->
        <!-- FIXME: We can "easily" remove this dependency, as we're only using this for two particular (and replaceable) methods -->
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <version>${confluence.version}</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <version>${amps8.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${refapp.version}</productVersion>
                    <productDataVersion>${refapp.version}</productDataVersion>
                    <instructions>
                        <Atlassian-Plugin-Key>${project.groupId}.${project.artifactId}</Atlassian-Plugin-Key>
                        <Spring-Context>*</Spring-Context>
                        <Export-Package>
                            com.atlassian.plugins.conversion*,
                        </Export-Package>
                        <Import-Package>
                            !com.aspose.*,
                            !com.sun.*,
                            !sun.*,
                            *
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>javacc-maven-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                    <outputDirectory>${basedir}/src/main/generated</outputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>01-execute-javacc</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>javacc</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.9</version>
                <executions>
                    <execution>
                        <id>02-add-javacc-source</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${basedir}/src/main/generated</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/Viewer.swf</exclude>
                        <exclude>License/license.pdf</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
