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

<project>

  <modelVersion>4.0.0</modelVersion>
  <groupId>com.hp.hpl.jena</groupId>
  <artifactId>sdb</artifactId>
  <packaging>jar</packaging>
  <name>SDB</name>
  <version>1.3.4</version>
  <description/>
  <url>http://openjena.org/SDB</url>

  <organization>
    <name>OpenJena</name>
    <url>http://openjena.org/</url>
  </organization>

  <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/SDB/</connection>
    <url>http://jena.svn.sourceforge.net/viewvc/jena/SDB/</url>
  </scm>

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

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

    <!-- Need the tests as well -->
    <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>arq</artifactId>
      <version>${ver.arq}</version>
    </dependency>

    <!-- Need the tests as well -->
    <dependency>
      <groupId>com.hp.hpl.jena</groupId>
      <artifactId>arq</artifactId>
      <version>${ver.arq}</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </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>

    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <version>1.8.0.10</version>
      <scope>test</scope>
    </dependency>

    <!-- Choose your logging provider -->
    <!--
      <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.5.8</version>
      </dependency>

      <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.12</version>
      </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/sdb/</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>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <!-- Requires HSQL to be set in 
                 store-list.ttl and store-list-simple.ttl
            -->
            <include>com/hp/hpl/jena/sdb/test/SDBTestAll.java</include>
          </includes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions> 
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
	  <execution>
            <id>attach-sources-test</id>
            <goals>
              <goal>test-jar</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}</windowtitle>
          <doctitle>${project.name}</doctitle>
          <bottom>Copyright &#169; 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP
Copyright &#169; 2010 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>
        <version>2.2</version>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <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>
            <!-- Better after package because of javadoc, source and test-jar-->
            <phase>verify</phase>
            <goals>
              <goal>single</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>
                <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>
          <overWriteSnapshots>false</overWriteSnapshots>
	  <overWriteIfNewer>true</overWriteIfNewer>
	</configuration>
      </plugin>

    </plugins>

  </build>

  <reporting>
    <!-- Does not include the script outputs!
         <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>
         </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>
      <!-- <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>
