axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davidills...@apache.org
Subject svn commit: r448655 - in /webservices/axis2/trunk/java/modules: kernel/ kernel/test/org/apache/axis2/addressing/wsdl/ kernel/test/org/apache/axis2/deployment/ kernel/test/org/apache/axis2/engine/ parent/
Date Thu, 21 Sep 2006 20:04:59 GMT
Author: davidillsley
Date: Thu Sep 21 13:04:57 2006
New Revision: 448655

URL: http://svn.apache.org/viewvc?view=rev&rev=448655
Log:
Update kernel module to support unit tests in maven2.
Now copies contents of test-resources to target/test-resources in both maven 1.x and maven2
Tests updated to find resources in that directory

Tested with maven 1.0.2, maven 1.1 beta2 and maven 2.0.4

woodstox-asl version defined in parent/pom.xml updated to 3.0.1

Times:
	maven1: 1min 12secs
	maven2:      25secs

Modified:
    webservices/axis2/trunk/java/modules/kernel/pom.xml
    webservices/axis2/trunk/java/modules/kernel/project.xml
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AddingObserverTest.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AxisMessageTest.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleDisEngagementTest.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/OperationExcludeTest.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ServiceGroupTest.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ModuleConfigTest.java
    webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ModuleEngageTest.java
    webservices/axis2/trunk/java/modules/parent/pom.xml

Modified: webservices/axis2/trunk/java/modules/kernel/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/pom.xml?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/kernel/pom.xml Thu Sep 21 13:04:57 2006
@@ -61,7 +61,10 @@
       <groupId>backport-util-concurrent</groupId>
       <artifactId>backport-util-concurrent</artifactId>
     </dependency>
-
+    <dependency>
+      <groupId>woodstox</groupId>
+      <artifactId>wstx-asl</artifactId>
+    </dependency>
     <!-- Added this to support WS Policy in Axis2 -->
     <dependency>
       <groupId>org.apache.ws.commons</groupId>
@@ -71,5 +74,70 @@
       <groupId>incubator-woden</groupId>
       <artifactId>woden</artifactId>
     </dependency>
-  </dependencies>
+  </dependencies>
+  <build>
+  <testResources>
+   <testResource>
+    <targetPath>../test-resources</targetPath>
+    <directory>test-resources</directory>
+    <includes>
+     <include>**/**</include>
+    </includes>
+   </testResource>
+  </testResources>
+  <plugins>
+  	<plugin>
+  		<artifactId>maven-surefire-plugin</artifactId>
+  		<inherited>true</inherited>
+  		<configuration>
+  			<skip>false</skip>
+  			<excludes>
+                <exclude>**/*Abstract*.java</exclude>
+                <exclude>**/*Util*.java</exclude>
+                <exclude>**/*PhaseResolvingTest.java</exclude>
+            </excludes>
+            <includes>
+                <include>**/*Test.java</include>
+            </includes>
+  		</configuration>
+  	</plugin>
+  	<plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <version>1.1</version>
+        <executions>
+          <execution>
+            <id>process-test-resources</id>
+            <phase>process-test-resources</phase>
+            <configuration>
+              <tasks>
+				<ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/service2"/>
+	            <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/echo"/>
+	            <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/invalidservice"/>
+	            <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/outservice"/>
+	            <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/module1"/>
+	            <ant antfile="build.xml" inheritall="true" inheritrefs="true" dir="test-resources/deployment/serviceModule"/>
+	            <copy file="${basedir}/test-resources/deployment/axis2.xml" tofile="${basedir}/target/test-resources/deployment/axis2.xml"/>
+              </tasks>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+        <dependencies>
+          <dependency>
+            <groupId>ant</groupId>
+            <artifactId>ant-antlr</artifactId>
+            <version>1.6.5</version>
+          </dependency>
+          <dependency>
+            <groupId>antlr</groupId>
+            <artifactId>antlrall</artifactId>
+            <version>2.7.4</version>
+          </dependency>
+        </dependencies>
+      </plugin>
+  </plugins>
+  </build>
 </project>

Modified: webservices/axis2/trunk/java/modules/kernel/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/project.xml?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/project.xml (original)
+++ webservices/axis2/trunk/java/modules/kernel/project.xml Thu Sep 21 13:04:57 2006
@@ -212,5 +212,13 @@
 			</resource>
 		</resources>
     </build>
+    <unitTest>
+	  <resources>
+		<resource>
+		  <targetPath>../test-resources</targetPath>
+	      <directory>test-resources</directory>
+	    </resource>
+	  </resources>
+	</unitTest>
     <reports/>
 </project>

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/addressing/wsdl/WSDL11ActionHelperTest.java
Thu Sep 21 13:04:57 2006
@@ -1,5 +1,6 @@
 package org.apache.axis2.addressing.wsdl;
 
+import java.io.File;
 import java.net.URL;
 import java.util.List;
 
@@ -17,18 +18,17 @@
 
 public class WSDL11ActionHelperTest extends TestCase {
 
-	String testWSDLFile = "wsdl/actionTests.wsdl";
+	String testWSDLFile = "/target/test-resources/wsdl/actionTests.wsdl";
 	
 	Definition definition;
 	
 	protected void setUp() throws Exception {
 		super.setUp();
 		WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
-
         reader.setFeature("javax.wsdl.importDocuments", false);
         reader.setFeature("javax.wsdl.verbose", false);
 
-        URL wsdlFile = getClass().getClassLoader().getResource(testWSDLFile);
+        URL wsdlFile = new File(System.getProperty("basedir")+testWSDLFile).toURL();//getClass().getClassLoader().getResource(testWSDLFile);
         definition =  reader.readWSDL(wsdlFile.toString());
 	}
 

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AddingObserverTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AddingObserverTest.java?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AddingObserverTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AddingObserverTest.java
Thu Sep 21 13:04:57 2006
@@ -26,7 +26,7 @@
 
     public void testAddingObservs() throws Exception {
         try {
-            String filename = "./test-resources/deployment/ConfigWithObservers";
+            String filename = System.getProperty("basedir")+"/test-resources/deployment/ConfigWithObservers";
             er = ConfigurationContextFactory.createConfigurationContextFromFileSystem(filename,
filename + "/axis2.xml").getAxisConfiguration();
             assertNotNull(er);
         } catch (DeploymentException e) {

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AxisMessageTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AxisMessageTest.java?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AxisMessageTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/AxisMessageTest.java
Thu Sep 21 13:04:57 2006
@@ -29,7 +29,7 @@
 public class AxisMessageTest extends TestCase {
 
     public void testAxisMessage() throws Exception {
-        String filename = "./test-resources/deployment/AxisMessageTestRepo";
+        String filename = System.getProperty("basedir")+"/test-resources/deployment/AxisMessageTestRepo";
         AxisConfiguration er = ConfigurationContextFactory.createConfigurationContextFromFileSystem(filename,
filename + "/axis2.xml")
                 .getAxisConfiguration();
 

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/BuildERWithDeploymentTest.java
Thu Sep 21 13:04:57 2006
@@ -34,7 +34,7 @@
 
     public void testDeployment() {
         try {
-            String filename = "./target/test-resources/deployment";
+            String filename = System.getProperty("basedir")+"/target/test-resources/deployment";
             AxisConfiguration er = ConfigurationContextFactory.createConfigurationContextFromFileSystem(filename,null)
                     .getAxisConfiguration();
 

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/DeploymentTotalTest.java
Thu Sep 21 13:04:57 2006
@@ -32,7 +32,7 @@
             DeploymentException,
             AxisFault,
             XMLStreamException {
-        String filename = "./target/test-resources/deployment";
+        String filename = System.getProperty("basedir")+"/target/test-resources/deployment";
         er = ConfigurationContextFactory.createConfigurationContextFromFileSystem(filename,
filename + "/axis2.xml")
                         .getAxisConfiguration();
 

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleDisEngagementTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleDisEngagementTest.java?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleDisEngagementTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleDisEngagementTest.java
Thu Sep 21 13:04:57 2006
@@ -36,7 +36,7 @@
     QName opName = new QName("testOperation");
 
     protected void setUp() throws Exception {
-        String filename = "./test-resources/deployment/moduleDisEngegeRepo";
+        String filename = System.getProperty("basedir")+"/test-resources/deployment/moduleDisEngegeRepo";
         er = ConfigurationContextFactory.
                 createConfigurationContextFromFileSystem(filename, null).getAxisConfiguration();
         AxisService testService = new AxisService();

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ModuleversionTest.java
Thu Sep 21 13:04:57 2006
@@ -30,7 +30,7 @@
 public class ModuleversionTest extends TestCase {
 
     public void testDefautModuleVersion() throws AxisFault {
-        String filename = "./test-resources/deployment/moduleVersion/Test1/axis2.xml";
+        String filename = System.getProperty("basedir")+"/test-resources/deployment/moduleVersion/Test1/axis2.xml";
         AxisConfiguration ac = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,filename)
                 .getAxisConfiguration();
         assertNotNull(ac);

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/OperationExcludeTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/OperationExcludeTest.java?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/OperationExcludeTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/OperationExcludeTest.java
Thu Sep 21 13:04:57 2006
@@ -34,7 +34,7 @@
             DeploymentException,
             AxisFault,
             XMLStreamException {
-        String filename = "./test-resources/deployment/exculeRepo";
+        String filename = System.getProperty("basedir")+"/test-resources/deployment/exculeRepo";
         er = ConfigurationContextFactory.createConfigurationContextFromFileSystem(filename,
null)
                 .getAxisConfiguration();
         AxisService service = er.getService("excludeService");

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ServiceGroupTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ServiceGroupTest.java?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ServiceGroupTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/deployment/ServiceGroupTest.java
Thu Sep 21 13:04:57 2006
@@ -24,7 +24,7 @@
 import org.apache.axis2.engine.AxisConfiguration;
 public class ServiceGroupTest extends TestCase {
     AxisConfiguration ar;
-    String repo ="./test-resources/deployment/serviceGroupRepo";
+    String repo = System.getProperty("basedir")+"/test-resources/deployment/serviceGroupRepo";
 
 
 

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ModuleConfigTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ModuleConfigTest.java?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ModuleConfigTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ModuleConfigTest.java
Thu Sep 21 13:04:57 2006
@@ -35,8 +35,8 @@
 public class ModuleConfigTest extends TestCase {
 
     AxisConfiguration ar;
-    String axis2xml = "./test-resources/deployment/moduleConfig/axis2.xml";
-    String repo = "./test-resources/deployment/moduleConfig";
+    String axis2xml = System.getProperty("basedir")+"/target/test-resources/deployment/moduleConfig/axis2.xml";
+    String repo = System.getProperty("basedir")+"/target/test-resources/deployment/moduleConfig";
 
 
     public void testModuleConfigAtAxisConfig() {

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ModuleEngageTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ModuleEngageTest.java?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ModuleEngageTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/ModuleEngageTest.java
Thu Sep 21 13:04:57 2006
@@ -35,7 +35,7 @@
             DeploymentException,
             AxisFault,
             XMLStreamException {
-        String filename = "./target/test-resources/deployment";
+        String filename = System.getProperty("basedir")+"/target/test-resources/deployment";
         ac = ConfigurationContextFactory.createConfigurationContextFromFileSystem(filename,null)
                 .getAxisConfiguration();
         AxisModule module = ac.getModule(new QName("module1"));

Modified: webservices/axis2/trunk/java/modules/parent/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/parent/pom.xml?view=diff&rev=448655&r1=448654&r2=448655
==============================================================================
--- webservices/axis2/trunk/java/modules/parent/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/parent/pom.xml Thu Sep 21 13:04:57 2006
@@ -301,7 +301,11 @@
         <artifactId>axis2-codegen</artifactId>
         <version>${project.version}</version>
       </dependency>
-
+	  <dependency>
+        <groupId>org.apache.ws.commons.axiom</groupId>
+        <artifactId>axiom-api</artifactId>
+        <version>1.1</version>
+      </dependency>
       <dependency>
         <groupId>org.apache.ws.commons.axiom</groupId>
         <artifactId>axiom-impl</artifactId>
@@ -335,7 +339,7 @@
       <dependency>
         <groupId>woodstox</groupId>
         <artifactId>wstx-asl</artifactId>
-        <version>2.9.3</version>
+        <version>3.0.1</version>
       </dependency>
       <dependency>
         <groupId>stax</groupId>



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message