<?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.orbisgis</groupId>
    <artifactId>h2gis-parent</artifactId>
    <version>1.4.0</version>
    <relativePath>../</relativePath>
  </parent>
  <artifactId>h2gis</artifactId>
  <name>h2gis-functions</name>
  <packaging>bundle</packaging>
  <organization>
        <name>CNRS</name>
        <url>http://www.h2gis.org</url>
    </organization>
    <url>http://github.com/orbisgis/H2GIS</url>
    <licenses>
        <license>
            <name>GNU Lesser General Public License (LGPLV3+)</name>
            <url>http://www.gnu.org/licenses/lgpl-3.0.html</url>
        </license>
    </licenses>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit-version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>cts</artifactId>
      <version>${cts-version}</version>
      <!-- https://github.com/orbisgis/CTS -->
    </dependency>
    <dependency>
      <groupId>com.vividsolutions</groupId>
      <artifactId>jts-core</artifactId>
      <version>${jts-core-version}</version>
    </dependency>
    <dependency>
      <groupId>com.vividsolutions</groupId>
      <artifactId>jts-io</artifactId>
      <version>${jts-io-version}</version>
     </dependency>
    <dependency>
      <groupId>${h2-package}</groupId>
      <artifactId>h2</artifactId>
      <version>${h2-version}</version>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.enterprise</artifactId>
      <version>5.0.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <version>${osgi-core-version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
      <version>${org.osgi.compendium-version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>h2gis-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>h2gis-utilities</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>${sl4j-version}</version>
      <scope>test</scope>
    </dependency>
      <dependency>
          <groupId>${project.groupId}</groupId>
          <artifactId>h2gis-test-utilities</artifactId>
          <version>${project.version}</version>
          <scope>test</scope>
      </dependency>
       <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>poly2tri-core</artifactId>
            <version>0.1.2</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.3.1</version>
        </dependency>
        <dependency>
            <!-- Open osm.bz2 files -->
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>1.9</version>
        </dependency>        
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.3.2</version>
            <scope>test</scope>
        </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.3.7</version>
        <extensions>true</extensions>
        <configuration>
          <instructions>
            <Export-Package>org.h2gis.functions.*</Export-Package>
            <Fragment-Host>org.h2</Fragment-Host>    <!-- ;bundle-version=${h2-osgi-version} -->
            <Bundle-Vendor>CNRS</Bundle-Vendor>
            <Bundle-Category>JDBC</Bundle-Category>
              <Import-Package>
                  !org.h2.command,
                  !org.h2.command.ddl,
                  !org.h2.engine,
                  !org.h2.expression,
                  !org.h2.index,
                  !org.h2.message,
                  !org.h2.result,
                  !org.h2.schema,
                  !org.h2.table,*
              </Import-Package>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>cobertura-maven-plugin</artifactId>
            <version>2.6</version>
            <configuration>
                <check>
                    <!-- TODO Raise Coverage constraint -->
                    <branchRate>0</branchRate>
                    <lineRate>0</lineRate>
                    <haltOnFailure>true</haltOnFailure>
                    <totalBranchRate>50</totalBranchRate>
                    <totalLineRate>77</totalLineRate>
                    <packageLineRate>0</packageLineRate>
                    <packageBranchRate>0</packageBranchRate>
                </check>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>check</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.15</version>
      </plugin>
    </plugins>    
    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <filtering>true</filtering>
            <includes>
                <include>**/version.txt</include>
            </includes>
        </resource>
        <resource>
            <directory>src/main/resources</directory>
            <filtering>false</filtering>
            <excludes>
                <exclude>**/version.txt</exclude>
            </excludes>
        </resource>
    </resources>
  </build>
</project>
