<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.2.0</version>
        <relativePath>../hibersap-parent</relativePath>
    </parent>

    <name>Hibersap JCo</name>

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

    <description>JCo specific Hibersap code</description>

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

        <dependency>
            <groupId>org.hibersap</groupId>
            <artifactId>sapjco3</artifactId>
            <version>3.0.10</version>
        </dependency>

        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>

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

    <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>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>
</project>