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

    <groupId>uk.gov.dwp.pdf</groupId>
    <artifactId>html-to-pdf</artifactId>
    <version>1.0.1</version>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>Take an XHTML document and produce and pdf document at various conformance levels</description>
    <url>https://github.com/dwp/html-to-pdf</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <distribution>repo</distribution>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Steve Elliott</name>
            <organization>DWP</organization>
            <email>steve.elliott2@dwp.gov.uk</email>
            <organizationUrl>http://www.gov.uk/dwp</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git@github.com:dwp/html-to-pdf.git</connection>
        <developerConnection>scm:git:ssh://github.com:dwp/html-to-pdf.git</developerConnection>
        <url>https://github.com/dwp/html-to-pdf</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <mvn-javadoc.version>3.1.1</mvn-javadoc.version>
        <mvn-source.version>3.2.0</mvn-source.version>
        <mvn-gpg.version>1.6</mvn-gpg.version>
        <openhtml.version>1.0.1</openhtml.version>
        <junit.version>4.11</junit.version>
        <mockito.version>2.24.5</mockito.version>
        <lombok.version>1.18.8</lombok.version>
        <slf4j.version>1.7.28</slf4j.version>
        <verapdf.version>1.14.102</verapdf.version>
        <commons-io.version>1.3.2</commons-io.version>
        <jacoco.version>0.8.2</jacoco.version>
        <pmd.version>6.15.0</pmd.version>
        <java.version>1.8</java.version>
        <maven-pmd-plugin.version>3.12.0</maven-pmd-plugin.version>
        <maven-project-info-reports-plugin.version>3.0.0</maven-project-info-reports-plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.openhtmltopdf</groupId>
            <artifactId>openhtmltopdf-pdfbox</artifactId>
            <version>${openhtml.version}</version>
        </dependency>
        <dependency>
            <groupId>com.openhtmltopdf</groupId>
            <artifactId>openhtmltopdf-svg-support</artifactId>
            <version>${openhtml.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons-io.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.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.verapdf</groupId>
            <artifactId>validation-model</artifactId>
            <version>${verapdf.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-complete</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${maven-pmd-plugin.version}</version>
                <configuration>
                    <analysisCache>true</analysisCache>
                    <sourceEncoding>utf-8</sourceEncoding>
                    <minimumTokens>100</minimumTokens>
                    <skipEmptyReport>false</skipEmptyReport>
                    <skipPmdError>true</skipPmdError>
                    <targetJdk>${java.version}</targetJdk>
                    <rulesets>
                        <ruleset>pmd.xml</ruleset>s
                    </rulesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.7.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${mvn-javadoc.version}</version>
                <configuration>
                    <source>8</source>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${mvn-source.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${mvn-gpg.version}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${maven-project-info-reports-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${maven-pmd-plugin.version}</version>
                <configuration>
                    <analysisCache>true</analysisCache>
                    <sourceEncoding>utf-8</sourceEncoding>
                    <minimumTokens>100</minimumTokens>
                    <skipEmptyReport>false</skipEmptyReport>
                    <skipPmdError>true</skipPmdError>
                    <targetJdk>${java.version}</targetJdk>
                    <rulesets>
                        <ruleset>pmd.xml</ruleset>s
                    </rulesets>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>
