Author: veithen
Date: Sat Oct  4 13:23:24 2008
New Revision: 701707

URL: http://svn.apache.org/viewvc?rev=701707&view=rev
Log:
* Moved all transport tests to a new module to avoid the chicken and egg 
problem cause by the fact that
- several Axis2 modules (in particular addressing) depend on the transports 
implementations for their unit tests;
- the unit tests for the transport implementations may depend on Axis2 modules 
other than axis2-kernel (in particular on addressing).
* Added a mechanism to get test coverage reports using Cobertura. This is 
triggered by the "cobertura" profile. 

Added:
    webservices/commons/trunk/modules/transport/modules/tests/
    webservices/commons/trunk/modules/transport/modules/tests/pom.xml
    webservices/commons/trunk/modules/transport/modules/tests/src/
    webservices/commons/trunk/modules/transport/modules/tests/src/test/
    webservices/commons/trunk/modules/transport/modules/tests/src/test/java/
    webservices/commons/trunk/modules/transport/modules/tests/src/test/java/org/
    
webservices/commons/trunk/modules/transport/modules/tests/src/test/java/org/apache/
    
webservices/commons/trunk/modules/transport/modules/tests/src/test/java/org/apache/axis2/
    
webservices/commons/trunk/modules/transport/modules/tests/src/test/java/org/apache/axis2/transport/
    
webservices/commons/trunk/modules/transport/modules/tests/src/test/java/org/apache/axis2/transport/http/
      - copied from r701669, 
webservices/commons/trunk/modules/transport/modules/testkit/test/org/apache/axis2/transport/http/
    
webservices/commons/trunk/modules/transport/modules/tests/src/test/java/org/apache/axis2/transport/jms/
      - copied from r701669, 
webservices/commons/trunk/modules/transport/modules/jms/src/test/java/org/apache/axis2/transport/jms/
    
webservices/commons/trunk/modules/transport/modules/tests/src/test/java/org/apache/axis2/transport/mail/
      - copied from r701669, 
webservices/commons/trunk/modules/transport/modules/mail/src/test/java/org/apache/axis2/transport/mail/
    
webservices/commons/trunk/modules/transport/modules/tests/src/test/resources/
    
webservices/commons/trunk/modules/transport/modules/tests/src/test/resources/META-INF/
    
webservices/commons/trunk/modules/transport/modules/tests/src/test/resources/META-INF/aop.xml
Removed:
    webservices/commons/trunk/modules/transport/modules/jms/src/test/
    webservices/commons/trunk/modules/transport/modules/mail/src/test/
    webservices/commons/trunk/modules/transport/modules/testkit/test/
    webservices/commons/trunk/modules/transport/modules/testkit/test-resources/
Modified:
    webservices/commons/trunk/modules/transport/modules/jms/pom.xml
    webservices/commons/trunk/modules/transport/modules/mail/pom.xml
    webservices/commons/trunk/modules/transport/modules/parent/pom.xml
    webservices/commons/trunk/modules/transport/modules/testkit/pom.xml
    webservices/commons/trunk/modules/transport/pom.xml

Modified: webservices/commons/trunk/modules/transport/modules/jms/pom.xml
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/jms/pom.xml?rev=701707&r1=701706&r2=701707&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/jms/pom.xml (original)
+++ webservices/commons/trunk/modules/transport/modules/jms/pom.xml Sat Oct  4 
13:23:24 2008
@@ -36,43 +36,6 @@
     <description>Apache Axis2 - JMS Transport</description>
     <packaging>jar</packaging>
 
-    <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>
-                    <argLine>-javaagent:target/lib/aspectjweaver.jar -Xms64m 
-Xmx128m</argLine>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
     <dependencies>
         <dependency>
             <groupId>org.apache.axis2</groupId>
@@ -85,59 +48,8 @@
             <artifactId>geronimo-jms_1.1_spec</artifactId>
             <version>${jms-1.1-spec.version}</version>
         </dependency>
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-transport-testkit</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>
-        </dependency>
     </dependencies>
     
-    <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>
-    
     <properties>
         <axis2.version>SNAPSHOT</axis2.version>
         <commons.logging.version>1.1</commons.logging.version>

Modified: webservices/commons/trunk/modules/transport/modules/mail/pom.xml
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/mail/pom.xml?rev=701707&r1=701706&r2=701707&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/mail/pom.xml (original)
+++ webservices/commons/trunk/modules/transport/modules/mail/pom.xml Sat Oct  4 
13:23:24 2008
@@ -36,43 +36,6 @@
     <description>Apache Axis2 - Mail Transport</description>
     <packaging>jar</packaging>
 
-    <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>
-                    <argLine>-javaagent:target/lib/aspectjweaver.jar -Xms64m 
-Xmx128m</argLine>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-
     <dependencies>
         <dependency>
             <groupId>org.apache.axis2</groupId>
@@ -94,24 +57,6 @@
             <artifactId>mail</artifactId>
             <version>1.4.1</version>
         </dependency>            
-
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.axis2</groupId>
-            <artifactId>axis2-transport-testkit</artifactId>
-            <version>${pom.version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.icegreen</groupId>
-            <artifactId>greenmail</artifactId>
-            <version>1.3</version>
-            <scope>test</scope>
-        </dependency>
     </dependencies>
 
     <properties>

Modified: webservices/commons/trunk/modules/transport/modules/parent/pom.xml
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/parent/pom.xml?rev=701707&r1=701706&r2=701707&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/parent/pom.xml 
(original)
+++ webservices/commons/trunk/modules/transport/modules/parent/pom.xml Sat Oct  
4 13:23:24 2008
@@ -147,6 +147,42 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>cobertura</id>
+            <dependencies>
+                <dependency>
+                    <groupId>net.sourceforge.cobertura</groupId>
+                    <artifactId>cobertura</artifactId>
+                    <version>1.9</version>
+                </dependency>
+            </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>process-classes</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <taskdef 
classpathref="maven.runtime.classpath" resource="tasks.properties"/>
+                                        <mkdir dir="target/classes"/>
+                                        <cobertura-instrument 
datafile="../../target/cobertura.ser">
+                                            <fileset dir="target/classes">
+                                                <exclude 
name="org/apache/axis2/transport/testkit/**/*.class"/>
+                                            </fileset>
+                                        </cobertura-instrument>
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
     <build>
         <plugins>

Modified: webservices/commons/trunk/modules/transport/modules/testkit/pom.xml
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/testkit/pom.xml?rev=701707&r1=701706&r2=701707&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/testkit/pom.xml 
(original)
+++ webservices/commons/trunk/modules/transport/modules/testkit/pom.xml Sat Oct 
 4 13:23:24 2008
@@ -87,11 +87,6 @@
                 <directory>target/generated-resources</directory>
             </resource>
         </resources>
-        <testResources>
-            <testResource>
-                <directory>test-resources</directory>
-            </testResource>
-        </testResources>
         <plugins>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
@@ -99,7 +94,7 @@
                 <version>2.0</version>
                 <executions>
                     <execution>
-                        <id>copy-1</id>
+                        <id>copy</id>
                         <phase>generate-resources</phase>
                         <goals>
                             <goal>copy</goal>
@@ -119,41 +114,8 @@
                             </artifactItems>
                         </configuration>
                     </execution>
-                    <execution>
-                        <id>copy-2</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>
-                    <argLine>-javaagent:target/lib/aspectjweaver.jar -Xms64m 
-Xmx128m</argLine>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>1.5</source>
-                    <target>1.5</target>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 </project>

Added: webservices/commons/trunk/modules/transport/modules/tests/pom.xml
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/tests/pom.xml?rev=701707&view=auto
==============================================================================
--- webservices/commons/trunk/modules/transport/modules/tests/pom.xml (added)
+++ webservices/commons/trunk/modules/transport/modules/tests/pom.xml Sat Oct  
4 13:23:24 2008
@@ -0,0 +1,160 @@
+<?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>SNAPSHOT</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>
+            <groupId>org.apache.axis2</groupId>
+            <artifactId>axis2-transport-testkit</artifactId>
+            <version>${pom.version}</version>
+            <scope>test</scope>
+        </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>
+        </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>
+        </dependency>
+    </dependencies>
+
+    <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>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>

Added: 
webservices/commons/trunk/modules/transport/modules/tests/src/test/resources/META-INF/aop.xml
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/modules/tests/src/test/resources/META-INF/aop.xml?rev=701707&view=auto
==============================================================================
--- 
webservices/commons/trunk/modules/transport/modules/tests/src/test/resources/META-INF/aop.xml
 (added)
+++ 
webservices/commons/trunk/modules/transport/modules/tests/src/test/resources/META-INF/aop.xml
 Sat Oct  4 13:23:24 2008
@@ -0,0 +1,28 @@
+<?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.
+  -->
+<aspectj>
+    <aspects>
+        <aspect name="org.apache.axis2.transport.jms.LogAspect"/>
+        <aspect name="org.apache.axis2.transport.mail.LogAspect"/>
+    </aspects>
+    <weaver options="-showWeaveInfo">
+        <include within="org.apache.axis2.transport..*"/>
+    </weaver>
+</aspectj>

Modified: webservices/commons/trunk/modules/transport/pom.xml
URL: 
http://svn.apache.org/viewvc/webservices/commons/trunk/modules/transport/pom.xml?rev=701707&r1=701706&r2=701707&view=diff
==============================================================================
--- webservices/commons/trunk/modules/transport/pom.xml (original)
+++ webservices/commons/trunk/modules/transport/pom.xml Sat Oct  4 13:23:24 2008
@@ -42,7 +42,8 @@
         <module>modules/xmpp</module>
         <module>modules/mail</module>
         <module>modules/jms</module>
-        <module>modules/testkit</module>
+        <module>modules/testkit</module>
+        <module>modules/tests</module>
     </modules>
     <profiles>
         <profile>
@@ -119,6 +120,45 @@
                 </plugins>
             </build>
         </profile>
+        <profile>
+            <id>cobertura</id>
+            <dependencies>
+                <dependency>
+                    <groupId>net.sourceforge.cobertura</groupId>
+                    <artifactId>cobertura</artifactId>
+                    <version>1.9</version>
+                </dependency>
+            </dependencies>
+            <build>
+                <plugins>
+                    <plugin>
+                        <artifactId>maven-antrun-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>site</phase>
+                                <goals>
+                                    <goal>run</goal>
+                                </goals>
+                                <configuration>
+                                    <tasks>
+                                        <taskdef 
classpathref="maven.runtime.classpath" resource="tasks.properties"/>
+                                        <mkdir 
dir="${project.build.directory}/site/cobertura" />
+                                        <cobertura-report format="html"
+                                                          
datafile="target/cobertura.ser"
+                                                          
destdir="${project.build.directory}/cobertura">
+                                            <fileset 
dir="modules/base/src/main/java"/>
+                                            <fileset dir="modules/http/src"/>
+                                            <fileset 
dir="modules/jms/src/main/java"/>
+                                            <fileset 
dir="modules/mail/src/main/java"/>
+                                        </cobertura-report>
+                                    </tasks>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
     </profiles>
       <scm>
         
<connection>scm:svn:http://svn.apache.org/repos/asf/webservices/commons/trunk/modules/transport</connection>


Reply via email to