<!--
  ~ Copyright (c) 2008-2017 akquinet tech@spree GmbH
  ~
  ~ This file is part of Hibersap.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this software except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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.hibersap</groupId>
    <artifactId>hibersap-parent</artifactId>
    <version>1.3.0</version>
    <relativePath>../hibersap-parent</relativePath>
  </parent>

  <name>Hibersap JCo</name>

  <artifactId>hibersap-jco</artifactId>
  <packaging>bundle</packaging>

  <description>JCo specific Hibersap code</description>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <instructions>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-native-libs</id>
            <phase>process-test-resources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.hibersap</groupId>
                  <artifactId>com.sap.conn.jco.sapjco3</artifactId>
                  <version>${jco.native-lib.version}</version>
                  <classifier>${jco.native-lib.classifier}</classifier>
                  <type>${jco.native-lib.packaging}</type>
                  <overWrite>true</overWrite>
                  <destFileName>${jco.native-lib.filename}</destFileName>
                </artifactItem>
              </artifactItems>
              <outputDirectory>${project.build.directory}/native-lib</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <argLine>-Djava.library.path=${project.build.directory}/native-lib/</argLine>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.hibersap</groupId>
      <artifactId>hibersap-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.hibersap</groupId>
      <artifactId>com.sap.conn.jco.sapjco3</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>
  </dependencies>
</project>