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

    <parent>
        <groupId>com.bagridb</groupId>
        <artifactId>bagri</artifactId>
        <version>1.2.0</version>
        <relativePath>..</relativePath>
    </parent>

    <artifactId>bagri-xqj</artifactId>
    <name>bagri-xqj</name>
    <description>Bagri XQJ API Implementation</description>

    <dependencies>

        <dependency>
            <groupId>com.bagridb</groupId>
            <artifactId>bagri-core</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.xml.xquery</groupId>
            <artifactId>xqj-api</artifactId>
        </dependency>

        <!-- Dependencies for logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <!--dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>runtime</scope>
        </dependency-->

        <!--Test dependencies-->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <!--dependency>
            <groupId>com.bagridb</groupId>
            <artifactId>bagri-xquery-saxon</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.bagridb</groupId>
            <artifactId>bagri-client-hazelcast</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast-all</artifactId>
            <scope>test</scope>
        </dependency-->
    </dependencies>

    <build>
	<plugins>
	    <plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-surefire-plugin</artifactId>
		<configuration>
		    <skipTests>true</skipTests>
		</configuration>
	    </plugin>

	    <!--plugin>
		<groupId>org.codehaus.mojo</groupId>
		<artifactId>exec-maven-plugin</artifactId>
		<executions>
		    <execution>
			<phase>test</phase>
			<goals>
			    <goal>java</goal>
			</goals>
		    </execution>
		</executions>
		<configuration>
		    <includeProjectDependencies>true</includeProjectDependencies>
		    <includePluginDependencies>true</includePluginDependencies>
		    <executableDependency>
			<groupId>javax.xml.xquery</groupId>
			<artifactId>xqj-tck</artifactId>
		    </executableDependency>
		    <mainClass>com.oracle.xqj.tck.AllTests</mainClass>
		    <systemProperties>
			<systemProperty>
			    <key>com.oracle.xqj.tck.datasource</key>
			    <value>tck.properties</value>
			</systemProperty>
			<systemProperty>
			    <key>logback.configurationFile</key>
			    <value>hz-client-logging.xml</value>
			</systemProperty>
			<systemProperty>
			    <key>hazelcast.logging.type</key>
			    <value>slf4j</value>
			</systemProperty>
			<systemProperty>
			    <key>hz.log.level</key>
			    <value>ERROR</value>
			</systemProperty>
			<systemProperty>
			    <key>bdb.log.level</key>
			    <value>OFF</value>
			</systemProperty>
			<systemProperty>
			    <key>log.name</key>
			    <value>xqj-tck</value>
			</systemProperty>
		    </systemProperties>
		</configuration>
		<dependencies>
		    <dependency>
			<groupId>javax.xml.xquery</groupId>
			<artifactId>xqj-tck</artifactId>
			<version>1.0</version>
			<scope>system</scope>
			<systemPath>${project.basedir}/../etc/lib/xqj-tck-1.0.jar</systemPath>
		    </dependency>
		</dependencies>
	    </plugin-->

	</plugins>
    </build>

    <profiles>
        <profile>
            <id>test</id>
            <dependencies>
                <dependency>
                    <groupId>com.bagridb</groupId>
                    <artifactId>bagri-xquery-saxon</artifactId>
                    <scope>runtime</scope>
                </dependency>
                <dependency>
                    <groupId>com.bagridb</groupId>
                    <artifactId>bagri-client-hazelcast</artifactId>
                    <scope>runtime</scope>
                </dependency>
                <dependency>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                    <scope>runtime</scope>
                </dependency>
                <dependency>
                    <groupId>javax.xml.xquery</groupId>
                    <artifactId>xqj-tck</artifactId>
                    <version>1.0</version>
                    <scope>system</scope>
                    <!--optional>false</optional-->
                    <systemPath>${project.basedir}/../etc/lib/xqj-tck-1.0.jar</systemPath>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <!-- Run XQL TCK -->
                            <execution>
                                <id>run-tck</id>
                                <phase>test</phase>
                                <configuration>
                                    <tasks if="run-tck">
                                        <java fork="true" classname="com.oracle.xqj.tck.AllTests">
                                            <!--jvmarg line="${run.jvm.args}"/-->
                                            <!--sysproperty key="host" value="127.0.0.1" />
                                            <sysproperty key="port" value="5701"/-->
                                            <sysproperty key="logback.configurationFile" value="hz-client-logging.xml" />
                                            <sysproperty key="hz.log.level" value="ERROR" />
                                            <sysproperty key="bdb.log.level" value="OFF" />
                                            <sysproperty key="log.name" value="xqj-tck" />
                                            <sysproperty key="hazelcast.logging.type" value="slf4j" />
                                            <sysproperty key="com.oracle.xqj.tck.datasource" value="tck.properties" />
                                            <classpath>
                                                <path refid="maven.compile.classpath" />
                                                <path refid="maven.runtime.classpath" />
                                                <!--pathelement location="config/"/-->
                                            </classpath>
                                        </java>
                                    </tasks>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
