<?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.itextpdf</groupId>
    <artifactId>itext-parent</artifactId>
    <version>1.0.0</version>
    <relativePath />
  </parent>

  <groupId>com.itextpdf.tool</groupId>
  <artifactId>xmlworker</artifactId>
  <version>5.5.12</version>

  <name>iText XML Worker</name>
  <description>Parses XML to PDF, with CSS support, using iText</description>
  <url>http://www.itextpdf.com/</url>

  <licenses>
    <license>
      <name>GNU Affero General Public License v3</name>
      <url>http://www.fsf.org/licensing/licenses/agpl-3.0.html</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>itext</id>
      <name>iText Software</name>
      <email>info@itextpdf.com</email>
      <url>http://www.itextpdf.com</url>
    </developer>
  </developers>

  <mailingLists>
    <mailingList>
      <name>iText on StackOverflow</name>
      <subscribe>http://stackoverflow.com/questions/tagged/itext</subscribe>
      <archive>http://stackoverflow.com/questions/tagged/itext</archive>
      <otherArchives>
        <otherArchive>http://news.gmane.org/gmane.comp.java.lib.itext.general</otherArchive>
        <otherArchive>http://itext-general.2136553.n4.nabble.com/</otherArchive>
        <otherArchive>http://www.junlu.com/2.html</otherArchive>
        <otherArchive>http://sourceforge.net/mailarchive/forum.php?forum_id=3273</otherArchive>
        <otherArchive>http://www.mail-archive.com/itext-questions%40lists.sourceforge.net/</otherArchive>
      </otherArchives>
    </mailingList>
  </mailingLists>

  <scm>
    <connection>scm:git:git@github.com:itext/itextpdf.git</connection>
    <url>https://github.com/itext/itextpdf</url>
  </scm>

  <issueManagement>
    <system>jira</system>
    <url>https://jira.itextsupport.com/</url>
  </issueManagement>

  <ciManagement>
    <system>jenkins-ci</system>
    <url>http://ci.itextsupport.com/</url>
  </ciManagement>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <sonar.language>java</sonar.language>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.itextpdf</groupId>
      <artifactId>itextpdf</artifactId>
      <version>${project.version}</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.0.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <doCheck>false</doCheck>
          <doUpdate>false</doUpdate>
        </configuration>
      </plugin>

      <plugin>
        <!-- Add osgi meta data to manifest file -->
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>3.2.0</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>process-classes</phase>
            <!-- bind the manifest.mf generation after the 'compile' phase -->
            <goals>
              <goal>manifest</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <unpackBundle>true</unpackBundle>
          <instructions>
            <Export-Package>com.itextpdf.tool.xml.*</Export-Package>
            <Import-Package>com.itextpdf.text.*</Import-Package>
          </instructions>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
            <manifestEntries>
              <Implementation-Build>${buildNumber}</Implementation-Build>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.19.1</version>
        <configuration>
          <includes>
            <include>**/*.java</include>
          </includes>
          <excludes>
            <exclude>examples/*.java</exclude>
            <exclude>com/itextpdf/tool/xml/examples/*.java</exclude>
            <exclude>com/itextpdf/tool/xml/BugRunnerTest.java</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>external.atlassian.jgitflow</groupId>
        <artifactId>jgitflow-maven-plugin</artifactId>
        <version>1.0-m5.1</version>
        <configuration>
          <flowInitContext>
            <masterBranchName>master</masterBranchName>
            <developBranchName>develop</developBranchName>
            <featureBranchPrefix>feature/</featureBranchPrefix>
            <releaseBranchPrefix>release/</releaseBranchPrefix>
            <hotfixBranchPrefix>hotfix/</hotfixBranchPrefix>
            <versionTagPrefix />
          </flowInitContext>
          <allowUntracked>true</allowUntracked>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <updateDependencies>true</updateDependencies>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <profiles>

    <profile>
      <id>all</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.10.4</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <links>
                <link>http://developers.itextpdf.com/reference/classes</link>
              </links>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>snapshot</id>
      <build>
        <finalName>${project.artifactId}-${project.version}-rev${buildNumber}</finalName>
      </build>
    </profile>

    <profile>
      <id>doclint-java8-disable</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.10.4</version>
            <configuration>
              <additionalparam>-Xdoclint:none</additionalparam>
              <additionalparam>--allow-script-in-comments</additionalparam>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>compileWithLegacyJDK</id>
      <!--
        NOTE
        Make sure to set the environment variable JAVA5_HOME
        to your JDK 1.5 HOME when using this profile.
      -->
      <properties>
        <java.version>1.5</java.version>
        <java.home>${env.JAVA5_HOME}</java.home>
        <java.libs>${java.home}/jre/lib</java.libs>
        <java.bootclasspath>${java.libs}/rt.jar${path.separator}${java.libs}/jce.jar</java.bootclasspath>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.6.1</version>
            <configuration>
              <source>${java.version}</source>
              <target>${java.version}</target>
              <compilerArguments>
                <bootclasspath>${java.bootclasspath}</bootclasspath>
              </compilerArguments>
              <compilerVersion>${java.version}</compilerVersion>
              <fork>true</fork>
              <executable>${java.home}/bin/javac</executable>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

</project>
