<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <groupId>org.jwat</groupId>
  <artifactId>jwat-tools</artifactId>
  <version>0.6.2</version>

  <packaging>jar</packaging>

  <name>jwat-tools</name>
  <description>JWAT Tools</description>
  <url>http://jwat.org/</url>

  <inceptionYear>2011</inceptionYear>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>

  <scm>
    <connection>scm:hg:http://bitbucket.org/nclarkekb/jwat-tools</connection>
    <developerConnection>scm:hg:https://bitbucket.org/nclarkekb/jwat-tools</developerConnection>
    <url>http://bitbucket.org/nclarkekb/jwat-tools</url>
  </scm>

  <issueManagement>
    <system>jira</system> 
    <url>https://sbforge.org/jira/browse/JWAT</url> 
  </issueManagement>

  <ciManagement>
    <system>jenkins</system>
    <url>https://sbforge.org/jenkins/view/JWAT/</url>
  </ciManagement>

  <developers>
    <developer>
      <name>Nicholas Clarke</name>
      <roles>
        <role>developer</role>
      </roles>
      <email>nicl@kb.dk</email>
      <organization>Det Kongelige Bibliotek/Royal Danish Library</organization>
      <organizationUrl>http://www.kb.dk</organizationUrl>
    </developer>
  </developers>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <jwat.core.version>1.0.4</jwat.core.version>
    <maven.assembly.plugin>2.2.2</maven.assembly.plugin>
    <maven.compiler.plugin>3.3</maven.compiler.plugin>
    <maven.jar.plugin>2.3</maven.jar.plugin>
    <maven.javadoc.plugin>2.10.3</maven.javadoc.plugin>
    <maven.source.plugin>2.4</maven.source.plugin>
    <license.maven.plugin>1.8</license.maven.plugin>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.jwat</groupId>
      <artifactId>jwat-common</artifactId>
      <version>${jwat.core.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jwat</groupId>
      <artifactId>jwat-gzip</artifactId>
      <version>${jwat.core.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jwat</groupId>
      <artifactId>jwat-arc</artifactId>
      <version>${jwat.core.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jwat</groupId>
      <artifactId>jwat-warc</artifactId>
      <version>${jwat.core.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jwat</groupId>
      <artifactId>jwat-archive</artifactId>
      <version>${jwat.core.version}</version>
    </dependency>

    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna</artifactId>
      <version>3.2.7</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${maven.compiler.plugin}</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>${license.maven.plugin}</version>
        <configuration>
          <generateBundle>true</generateBundle>
          <licenseName>apache_v2</licenseName>
          <failIfWarning>true</failIfWarning>
          <useMissingFile>true</useMissingFile>
        </configuration>
      </plugin>

      <plugin>
        <!-- install source jars to maven repo
             http://maven.apache.org/plugins/maven-source-plugin/usage.html -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${maven.source.plugin}</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>verify</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Generate javadoc jar. Note: Java 8 (doclint) check has been disabled. -->
      <plugin> 
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId> 
        <version>${maven.javadoc.plugin}</version>
        <configuration>
          <aggregate>true</aggregate>
          <linksource>true</linksource>
          <quiet>true</quiet>
          <!-- Note: This fails with a JVM older than Java 8 -->
          <additionalparam>-Xdoclint:none</additionalparam>
        </configuration>
        <executions> 
          <execution> 
            <id>attach-javadocs</id>
            <phase>verify</phase>
            <goals>
              <goal>jar</goal>
            </goals> 
          </execution> 
        </executions> 
      </plugin>

      <!-- generate the JWAT-Tools Command Line jar executable -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven.jar.plugin}</version>
        <configuration>
          <archive>
            <addMavenDescriptor>false</addMavenDescriptor>
            <!-- make jar executable -->
            <manifest>
              <mainClass>org.jwat.tools.JWATTools</mainClass>
            </manifest>
            <manifestEntries>
              <Specification-Title>${project.name}</Specification-Title>
              <Specification-Version>${project.version}</Specification-Version>
              <!--Specification-Vendor>${project.specification_vendor}</Specification-Vendor-->
              <Implementation-Title>${project.groupId}.${project.artifactId}</Implementation-Title>
              <!--Implementation-Version>${git.revision}</Implementation-Version-->
              <!--Implementation-Vendor>${project.implementation_vendor}</Implementation-Vendor-->
              <!--X-Git-Branch>${git.branch}</X-Git-Branch-->
              <!--X-Git-Tag>${git.tag}</X-Git-Tag-->
              <!--X-Git-Commits-Count>${git.commitsCount}</X-Git-Commits-Count-->
              <Sealed>false</Sealed>
            </manifestEntries>
          </archive>
           <forceCreation>true</forceCreation>
          <finalName>${project.build.finalName}</finalName>
        </configuration>
      </plugin>

      <!--
        package the jar, artifacts,and bin scripts into zip and tar files
        for JWAT-Tools release
      -->
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>${maven.assembly.plugin}</version>
        <executions>
          <execution>
            <id>distro-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>src/main/assembly/release.xml</descriptor>
              </descriptors>
              <appendAssemblyId>false</appendAssemblyId>
              <tarLongFileMode>gnu</tarLongFileMode>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
