<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ 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">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.apache.axis2</groupId>
        <artifactId>axis2-transport</artifactId>
        <version>0.5.wso2</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>
    <artifactId>axis2-transport-tests</artifactId>
    <name>Apache Axis2 - Transport - Tests</name>
    <description>Unit tests for Axis2 transports</description>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <!-- Add axis2-kernel as an explicit dependency and exclude the
                 Geronimo implementations of JavaMail and activation. They
                 don't work well with the mail transport. -->
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-kernel</artifactId>
            <version>1.4.1-wso2</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-javamail_1.4_spec</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-activation_1.1_spec</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-testkit</artifactId>
            <version>${pom.version}</version>
            <scope>test</scope>
            <exclusions>
                <!-- We want to choose the JavaMail implementation ourselves -->
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>mail</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.axis2</groupId>
                    <artifactId>axis2-kernel</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        
        <!-- HTTP transport tests -->
        <!--dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-http</artifactId>
            <version>${pom.version}</version>
            <scope>test</scope>
        </dependency-->    
        
        <!-- JMS transport tests -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-jms</artifactId>
            <version>${pom.version}</version>
            <scope>test</scope>
        </dependency>    
        <dependency>
            <groupId>org.mockejb</groupId>
            <artifactId>mockejb</artifactId>
            <version>0.6-beta2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.qpid</groupId>
            <artifactId>qpid-broker</artifactId>
            <version>1.0-incubating-M2.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.qpid</groupId>
            <artifactId>qpid-client</artifactId>
            <version>1.0-incubating-M2.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-core</artifactId>
            <version>5.1.0</version>
            <scope>test</scope>
            <exclusions>
                <!-- We want to choose the JAF implementation ourselves -->
                <exclusion>
                    <groupId>javax.activation</groupId>
                    <artifactId>activation</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        
        <!-- Mail transport tests -->
        <!--
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-mail</artifactId>
            <version>${pom.version}</version>
            <scope>test</scope>
        </dependency>    
        <dependency>
            <groupId>com.icegreen</groupId>
            <artifactId>greenmail</artifactId>
            <version>1.3</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.mail</groupId>
                    <artifactId>mail</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        -->
        
        <!-- UDP transport tests -->
        <!--dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-udp</artifactId>
            <version>${pom.version}</version>
            <scope>test</scope>
        </dependency-->    
    </dependencies>

    <profiles>
        <profile>
            <id>geronimo</id>
            <dependencies>
                <dependency>
                    <groupId>org.apache.axis2</groupId>
                    <artifactId>axis2-kernel</artifactId>
                    <version>1.4.1-wso2</version>
                    <scope>test</scope>
                    <exclusions>
                        <exclusion>
                            <groupId>javax.mail</groupId>
                            <artifactId>mail</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-activation_1.1_spec</artifactId>
                    <version>1.0.2</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.apache.geronimo.specs</groupId>
                    <artifactId>geronimo-javamail_1.4_spec</artifactId>
                    <version>1.6-SNAPSHOT</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.apache.geronimo.javamail</groupId>
                    <artifactId>geronimo-javamail_1.4_provider</artifactId>
                    <version>1.7-SNAPSHOT</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

    <repositories>
        <!-- this is for qpid -->
        <repository>
            <id>apache-incubating</id>
            <name>Apache Maven 2 Incubating Repository</name>
            <url>http://people.apache.org/repo/m2-incubating-repository/</url>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <updatePolicy>interval:60</updatePolicy>
            </snapshots>
        </repository>
    </repositories>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.0</version>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <stripVersion>true</stripVersion>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.aspectj</groupId>
                                    <artifactId>aspectjweaver</artifactId>
                                    <outputDirectory>target/lib</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <systemProperties>
                        <property>
                            <name>log4j.configuration</name>
                            <value>file:log4j.properties</value>
                        </property>
                        <property>
                            <name>net.sourceforge.cobertura.datafile</name>
                            <value>../../target/cobertura.ser</value>
                        </property>
                    </systemProperties>
                    <argLine>-javaagent:target/lib/aspectjweaver.jar -Xms64m -Xmx128m</argLine>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
