<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements. See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership. The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file 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">

    <parent>
        <groupId>org.apache.sandesha2</groupId>
        <artifactId>sandesha2-parent</artifactId>
        <version>1.7.0-SNAPSHOT</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>sandesha2-tests</artifactId>
    <packaging>jar</packaging>
    <name>Sandesha2 - Test Suite</name>

    <!-- This needs to be set explicitly because the project structure implies that the Maven calculated defaults are wrong -->
    <scm>
        <connection>scm:svn:http://svn.apache.org/repos/asf/axis/axis2/java/sandesha/trunk/modules/tests</connection>
        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/axis/axis2/java/sandesha/trunk/modules/tests</developerConnection>
        <url>http://svn.apache.org/viewvc/axis/axis2/java/sandesha/trunk/modules/tests</url>
    </scm>
    <!-- This also needs to be set explicitly because the Maven calculated URL would point to nowhere -->
    <url>http://axis.apache.org/axis2/java/sandesha/</url>

    <build>
        <testResources>
            <testResource>
                <directory>test-resources</directory>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                    <include>**/*.xsl</include>
                    <include>**/*.dat</include>
                </includes>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.sandesha2</groupId>
                                    <artifactId>sandesha2</artifactId>
                                    <version>${project.version}</version>
                                    <type>mar</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/copiedmars</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.axis2</groupId>
                                    <artifactId>addressing</artifactId>
                                    <version>${addressing.version}</version>
                                    <type>mar</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/copiedmars</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.rampart</groupId>
                                    <artifactId>rampart</artifactId>
                                    <version>${rampart.version}</version>
                                    <type>mar</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/copiedmars</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.rampart</groupId>
                                    <artifactId>rampart-core</artifactId>
                                    <version>${rampart.version}</version>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/copiedjars</outputDirectory>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.apache.rampart</groupId>
                                    <artifactId>rampart-policy</artifactId>
                                    <version>${ramprt.version}</version>
                                    <type>jar</type>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>${project.build.directory}/copiedjars</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.directory}/wars</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <id>create_test_repos</id>
                        <phase>process-test-resources</phase>
                        <configuration>
                            <tasks>
                                <ant antfile="tests.build.xml" inheritAll="true" target="repo:create">
                                    <property name="sandesha2.version" value="${project.version}" />
                                    <property name="build.dir" value="${project.build.directory}" />
                                    <property name="local.repo" value="${settings.localRepository}" />
                                    <property name="addressing.version" value="${axis2.version}" />
                                    <property name="rampart.version" value="${rampart.version}" />
                                </ant>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                       <includes>
                         <include>**/*Test.java</include>
                    </includes>
                    <forkMode>pertest</forkMode>
                    <!--<argLine>-Xnoagent -Djava.compiler=NONE -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005</argLine>-->
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>
    
    <dependencies>
    
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-http</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-local</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-testutils</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.sandesha2</groupId>
            <artifactId>sandesha2-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.sandesha2</groupId>
            <artifactId>sandesha2-policy</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.sandesha2</groupId>
            <artifactId>sandesha2-samples</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.rampart</groupId>
            <artifactId>rampart</artifactId>
            <type>mar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.rampart</groupId>
            <artifactId>rampart-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.rampart</groupId>
            <artifactId>rampart-policy</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>mail</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.jms</groupId>
                    <artifactId>jms</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jdmk</groupId>
                    <artifactId>jmxtools</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.jmx</groupId>
                    <artifactId>jmxri</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>oro</groupId>
                    <artifactId>oro</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>${commons.logging.version}</version>
        </dependency>
    </dependencies>

    <properties>
        <test.property>2.8.1</test.property>
    </properties>
     
</project>
