<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.fusesource.camel.component.sap.test</artifactId>

    <parent>
        <groupId>org.fusesource</groupId>
        <artifactId>camel-sap-parent</artifactId>
        <version>3.20.1.redhat-00089</version>
    </parent>

    <name>JBoss Fuse :: SAP JCO :: SAP Data Layer :: Test Plugin</name>
    <description>Provides Tests for the SAP Data Layer</description>
    <url>http://www.jboss.org/products/fuse/overview/</url>

    <organization>
        <name>Red Hat, Inc.</name>
        <url>http://www.redhat.com</url>
    </organization>

    <properties>
        <lib.directory>${project.build.directory}/lib</lib.directory>
        <native.lib.directory>${project.build.directory}/jni</native.lib.directory>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compiletests</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <osgi.nls.warnings>ignore</osgi.nls.warnings>
                    </systemProperties>
                    <reuseForks>false</reuseForks>
                    <argLine>-Djava.library.path="${native.lib.directory}"</argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-native-lib-for-unit-tests</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <stripVersion>true</stripVersion>
                            <outputDirectory>${native.lib.directory}</outputDirectory>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.sap.conn.jco</groupId>
                                    <artifactId>sapjco3</artifactId>
                                    <type>${envType}</type>
                                    <classifier>${envClassifier}</classifier>
                                    <overWrite>true</overWrite>
                                    <destFileName>${native.lib.filename}.${envType}</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-jco-libs-unit-tests</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <stripVersion>true</stripVersion>
                            <outputDirectory>${lib.directory}</outputDirectory>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.sap.conn.jco</groupId>
                                    <artifactId>sapjco3</artifactId>
                                    <overWrite>true</overWrite>
                                    <destFileName>sapjco3.jar</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>com.sap.conn.idoc</groupId>
                                    <artifactId>sapidoc3</artifactId>
                                    <overWrite>true</overWrite>
                                    <destFileName>sapidoc3.jar</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <reuseForks>false</reuseForks>
                        <argLine>-Djava.library.path="${native.lib.directory}"</argLine>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.emf</groupId>
            <artifactId>org.eclipse.emf.common</artifactId>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.eclipse.emf</groupId>
            <artifactId>org.eclipse.emf.ecore</artifactId>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.eclipse.emf</groupId>
            <artifactId>org.eclipse.emf.ecore.xmi</artifactId>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.eclipse.emf</groupId>
            <artifactId>org.eclipse.emf.edit</artifactId>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.sap.conn.jco</groupId>
            <artifactId>sapjco3</artifactId>
            <scope>system</scope>
            <systemPath>${lib.directory}/sapjco3.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.sap.conn.idoc</groupId>
            <artifactId>sapidoc3</artifactId>
            <scope>system</scope>
            <systemPath>${lib.directory}/sapidoc3.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>org.fusesource</groupId>
            <artifactId>org.fusesource.camel.component.sap</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.fusesource</groupId>
            <artifactId>org.fusesource.camel.component.sap.model</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
