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

  <groupId>com.hp.hpl.jena</groupId>
  <artifactId>arq</artifactId>
  <packaging>jar</packaging>
  <name>ARQ</name>
  <version>2.8.8</version>

  <description>ARQ is a SPARQL query engine for Jena</description>
  <url>http://openjena.org/ARQ</url>

  <organization>
    <name>OpenJena</name>
    <url>http://www.openjena.org/</url>
  </organization>
  <developers>
    <developer>
      <name>Andy Seaborne</name>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>BSD-style license</name>
      <url>http://openjena.org/license.html</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:svn:https://jena.svn.sourceforge.net/svnroot/jena/ARQ/</connection>
    <url>http://jena.svn.sourceforge.net/viewvc/jena/ARQ/</url>
  </scm>

  <properties>
    <this.root>${project.artifactId}-${project.version}</this.root>
    <ver.jena>2.6.4</ver.jena>
    <ver.arq>${project.version}</ver.arq>
  </properties>

  <dependencies>

    <dependency>
      <groupId>com.hp.hpl.jena</groupId>
      <artifactId>jena</artifactId>
      <version>${ver.jena}</version>
    </dependency>

    <dependency>
      <groupId>com.hp.hpl.jena</groupId>
      <artifactId>jena</artifactId>
      <classifier>tests</classifier>
      <version>${ver.jena}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.hp.hpl.jena</groupId>
      <artifactId>iri</artifactId>
      <version>0.8</version>
    </dependency>

    <dependency>
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>wstx-asl</artifactId>
      <version>3.2.9</version>
      <!--
	And recode XMLInputStax to use STaX2 as stil have the same problems of STaX1 if just upgrade woodstox.
      <groupId>org.codehaus.woodstox</groupId>
      <artifactId>woodstox-core-asl</artifactId>
      <version>4.0.0</version>
      -->
    </dependency>

    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-core</artifactId>
      <version>2.3.1</version>
    </dependency>

    <!--
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>1.4</version>
    </dependency>
    -->

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.5</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.5.8</version>
    </dependency>

    <!-- Choose your logging provider 
         But note ARQ confgures log4j (and java.util.logging)
         in its logging support utilities so needs it to 
         compile.
    -->
    
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.5.8</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.14</version>
      <!--<optional>true</optional>-->
      <exclusions>
        <exclusion>
          <groupId>javax.jms</groupId>
          <artifactId>jms</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.sun.jdmk</groupId>
          <artifactId>jmxtools</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.sun.jmx</groupId>
          <artifactId>jmxri</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.mail</groupId>
          <artifactId>mail</artifactId>
        </exclusion>
      </exclusions> 
    </dependency>

  </dependencies>

  <build>
    <sourceDirectory>src</sourceDirectory>
    <testSourceDirectory>src-test</testSourceDirectory>
    
    <!-- The filter file is written by antrun -->
    <filters>
      <filter>${project.basedir}/target/filter.properties</filter>
    </filters>

    <resources>
      <resource>
        <targetPath>com/hp/hpl/jena/sparql/</targetPath>
        <filtering>true</filtering>
        <directory>resources</directory>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <encoding>UTF-8</encoding>
          <debug>true</debug>
          <debuglevel>source,lines,vars</debuglevel>
          <optimize>true</optimize>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <include>**/TS_*.java</include>
          </includes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.1.2</version><!-- To get a version with jar-no-fork -->
        <executions> 
          <execution>
            <id>attach-sources</id>
            <!-- <phase>package</phase> package is the default -->
            <goals>
              <goal>jar-no-fork</goal> 
            </goals>
          </execution>
          <execution>
            <id>attach-sources-test</id>
            <goals>
              <goal>test-jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <version>true</version>
          <show>public</show>
          <quiet>true</quiet>
          <encoding>UTF-8</encoding>
          <windowtitle>${project.name} ${project.version}</windowtitle>
          <doctitle>${project.name} ${project.version}</doctitle>
	  <excludePackageNames>arq:arq.*:riotcmd:riotcmd.*</excludePackageNames>
	  <groups>
	    <group>
              <title>SPARQL Query and Update</title>
              <packages>com.hp.hpl.jena.query:com.hp.hpl.jena.update</packages>
            </group>
            <group>
              <title>LARQ -- Lucene Search for ARQ</title>
              <packages>com.hp.hpl.jena.query.larq</packages>
            </group>
	    <!--
            <group>
              <title>RIOT</title>
              <packages>org.openjena.riot</packages>
            </group>
	    -->
	    <!-- "Other packages" catches everything else unless excluded -->
	  </groups>
          <bottom>Copyright &#169; 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
Copyright &#169; 2010 Talis Systems Ltd.
Copyright &#169; 2010, 2011 Epimorphics Ltd.
          </bottom>
        </configuration>
      </plugin>

      <!-- see: http://maven.apache.org/guides/mini/guide-attached-tests.html -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>ant-timestamp</id>
            <phase>generate-resources</phase>
            <configuration>
              <tasks>
                <mkdir dir="${project.basedir}/target"/>
                <tstamp>
                  <format property="build.time.xsd"  pattern="yyyy-MM-dd'T'HH:mm:ssZ"/>
                  <format property="build.time.txt"  pattern="yyyy-MM-dd HH:mm z"/>
                </tstamp>
                <!-- Do not indent (it does not work) -->
                <echo file="${project.basedir}/target/filter.properties">
#begin
build.time.xsd=${build.time.xsd}
build.time.txt=${build.time.txt}
#end
                </echo>
                <echo message="version=${project.version}"/>
                <echo message="build.time=${build.time.txt}"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
          <!-- Another task, another execution -->
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <configuration>
          <overWriteReleases>false</overWriteReleases>
          <overWriteIfNewer>true</overWriteIfNewer>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <configuration>
          <buildOutputDirectory>${project.build.directory}/classes-eclipse</buildOutputDirectory>
          <downloadSources>true</downloadSources>
          <downloadJavadocs>false</downloadJavadocs>
        </configuration>
      </plugin>

      <plugin>
        <!-- This must be the last plug-in attached to the package phase 
             because it replies on the packaging of the jar to happen first.
        -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>assembly.xml</descriptor>
            <descriptor>assembly-testing.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <id>create-assembly</id>
            <!-- Must be last plugin attached to "package" -->
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <reporting>
    <!-- <outputDirectory>${project.build.directory}/site</outputDirectory> -->
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <configuration>
          <outputDirectory>${project.basedir}/target/surefire-reports-html</outputDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <configuration>
          <instrumentation>
            <ignores>
              <ignore>org.slf4j.*</ignore>
            </ignores>
          </instrumentation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <!--<version>2.4</version>-->
        <configuration>
          <linkXref>true</linkXref>
          <sourceEncoding>utf-8</sourceEncoding>
          <minimumTokens>100</minimumTokens>
          <targetJdk>1.5</targetJdk>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>

  <repositories>

    <!-- jena-repo is mirrored to Maven central repository -->
    <!-- In case mirroring has not happened yet ... -->
    <repository>
      <id>repo-jena</id>
      <name>Jena Maven - Repository</name>
      <layout>default</layout>
      <url>http://openjena.org/repo</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>

    <!-- jena-repo-dev is where SNAPSHOTs and RCs are published -->  
    <repository>
      <id>repo-jena-dev</id>
      <name>Jena Maven - Development Repository</name>
      <layout>default</layout>
      <url>http://openjena.org/repo-dev</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <distributionManagement>
    <downloadUrl>http://openjena.org/repo-dev</downloadUrl>

    <repository>
      <id>jena-repo</id>
      <name>Jena repo</name>
      <url>sftp://openjena.org/var/repo</url>
      <!-- Because RC's are snapshots IMHO -->
      <!-- <url>sftp://openjena.org/var/repo-dev</url> -->
      <layout>default</layout>
    </repository> 

    <snapshotRepository>
      <id>jena-repo-dev</id>
      <name>Jena development repo</name>
      <url>sftp://openjena.org/var/repo-dev</url>
      <!--<url>file:tmp</url>-->
      <layout>default</layout>
    </snapshotRepository>

  </distributionManagement>

</project>
