<?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/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>org.wso2.governance</groupId>
        <artifactId>registry</artifactId>
        <version>4.5.2</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <name>Registry TestNG Test Module</name>
    <artifactId>registry-integration-test</artifactId>
    <packaging>jar</packaging>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <inherited>false</inherited>
                <configuration>
                    <!--<argLine>-Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006</argLine>-->
                    <argLine>-Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m</argLine>
                    <testFailureIgnore>true</testFailureIgnore>
                    <excludes>
                        <exclude>**/*MetaDataVolumeTestClient.java</exclude>
                        <exclude>**/*MetaDataConcurrentTestClient.java</exclude>
                        <!-- Test needs to be re-written to check for script elements -->
                        <exclude>**/*LifeCycleWithScriptTestCase.java</exclude>
                        <!--<exclude>**/*ServiceEditTestCase.java</exclude>-->
                        <!--<exclude>**/*SchemaTestCase.java</exclude>-->
                    </excludes>

                    <includes>
                        <include>**/*TestServerManager.java</include>
                        <include>**/**TestCase.java</include>
                    </includes>

                    <systemProperties>
                        <!--<property>-->
                        <!--<name>debug.mode</name>-->
                        <!--<value>true</value>-->
                        <!--</property>-->
                        <property>
                            <name>maven.test.haltafterfailure</name>
                            <value>false</value>
                        </property>
                        <property>
                            <name>carbon.zip</name>
                            <value>
                                ${basedir}/../../../distribution/target/wso2greg-${project.version}.zip
                            </value>
                        </property>
                        <property>
                            <name>samples.dir</name>
                            <value>${basedir}/../../../samples/product</value>
                        </property>
                        <sec.verifier.dir>${basedir}/target/security-verifier/</sec.verifier.dir>
                        <emma.home>${basedir}/target/emma</emma.home>
                        <instr.file>${basedir}/src/test/java/resources/instrumentation.txt
                        </instr.file>
                        <filters.file>${basedir}/src/test/java/resources/filters.txt</filters.file>
                        <emma.output>${basedir}/target/emma</emma.output>
                    </systemProperties>
                    <workingDirectory>${basedir}/target</workingDirectory>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-emma-dependencies</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/emma</outputDirectory>
                            <includeTypes>jar</includeTypes>
                            <includeArtifactIds>emma,org.wso2.carbon.integration.framework
                            </includeArtifactIds>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-secVerifier</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/security-verifier</outputDirectory>
                            <includeTypes>aar</includeTypes>
                            <includeArtifactIds>SecVerifier</includeArtifactIds>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <id>moving report to reporting module</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
                                <copy todir="../../../reporting/src/site/resources/report"
                                      overwrite="true">
                                    <fileset dir="target/report">
                                        <exclude name="**/*.gif"/>
                                        <exclude name="**/*.png"/>
                                        <exclude name="**/*.css"/>
                                        <include name="**/*.html"/>
                                    </fileset>
                                </copy>
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.7.1</version>
                <configuration>
                    <outputDirectory>${basedir}/target/report</outputDirectory>
                    <outputName>registry-api-test</outputName>
                </configuration>
                <executions>
                    <execution>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>report-only</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.integration.core</artifactId>
            <version>${carbon.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.caching.core</artifactId>
            <version>${carbon.patch.version.401}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.core</artifactId>
            <version>${carbon.patch.version.402}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2.wso2</groupId>
            <artifactId>axis2-json</artifactId>
            <version>${axis2.wso2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.ws.client</artifactId>
            <version>${carbon.patch.version.401}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.rampart.wso2</groupId>
                    <artifactId>rampart-trust</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.rampart.wso2</groupId>
                    <artifactId>rampart-policy</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.rampart.wso2</groupId>
                    <artifactId>rampart-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.rampart</groupId>
            <artifactId>rampart-core</artifactId>
            <version>1.6.1-wso2v1</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-jdk14</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>jcl-over-slf4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>log4j-over-slf4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.rampart</groupId>
            <artifactId>rampart</artifactId>
            <type>mar</type>
            <version>1.6.1-wso2v1</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-jdk14</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jettison.wso2</groupId>
            <artifactId>jettison</artifactId>
            <version>${version.jettison}</version>
        </dependency>

        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.handler.stub</artifactId>
            <version>${carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.resource.stub</artifactId>
            <version>${carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.governance.custom.lifecycles.checklist.stub</artifactId>
            <version>${carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.info.stub</artifactId>
            <version>${carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.relations.stub</artifactId>
            <version>${carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.governance.lcm.stub</artifactId>
            <version>${carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.properties.stub</artifactId>
            <version>${carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.governance.services.stub</artifactId>
            <version>${carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.activities.stub</artifactId>
            <version>${carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.indexing.stub</artifactId>
            <version>${carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.search.stub</artifactId>
            <version>${carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.governance.api</artifactId>
            <version>${carbon.patch.version.402}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.registry.extensions</artifactId>
            <version>${carbon.patch.version.402}</version>
        </dependency>
        <dependency>
            <groupId>emma</groupId>
            <artifactId>emma</artifactId>
            <version>${emma.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>SecVerifier</artifactId>
            <version>${carbon.patch.version.402}</version>
            <type>aar</type>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.automation</groupId>
            <artifactId>org.wso2.carbon.automation.api</artifactId>
            <version>${carbon.patch.version.401}</version>
        </dependency>
    </dependencies>


</project>
