Author: sagara
Date: Sat Jul 13 05:39:50 2013
New Revision: 1502750

URL: http://svn.apache.org/r1502750
Log:
Applied patch for AXIS2-5496

Modified:
    axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/pom.xml
    
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/test/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojoTest.java

Modified: 
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/pom.xml?rev=1502750&r1=1502749&r2=1502750&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/pom.xml 
(original)
+++ 
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/pom.xml 
Sat Jul 13 05:39:50 2013
@@ -121,6 +121,9 @@
                         <fileset>
                             <directory>src/test/test1/target</directory>
                         </fileset>
+                        <fileset>
+                            <directory>src/test/test2/target</directory>
+                        </fileset>
                     </filesets>
                 </configuration>
             </plugin>

Modified: 
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/test/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojoTest.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/test/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojoTest.java?rev=1502750&r1=1502749&r2=1502750&view=diff
==============================================================================
--- 
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/test/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojoTest.java
 (original)
+++ 
axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/test/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojoTest.java
 Sat Jul 13 05:39:50 2013
@@ -29,10 +29,16 @@ import java.util.HashSet;
 public class WSDL2CodeMojoTest extends AbstractMojoTestCase {
     /** Tests running the java generator. */
     public void testJava() throws Exception {
-        runTest("src/test/test1", "wsdl2code");
+        runTest("src/test/test1", "wsdl2code", "src/main/axis2/service.wsdl");
     }
 
-    protected WSDL2CodeMojo newMojo(String pDir, String pGoal) throws 
Exception {
+    /** This test is added to test wsdl2codegen when there is schema import
+     * involved and the wsdl path contains space character */
+    public void testSchemaImport() throws Exception {
+        runTest("src/test/test2", "wsdl2code", "src/main/axis2/test 
dir/service.wsdl");
+    }
+
+    protected WSDL2CodeMojo newMojo(String pDir, String pGoal, String 
baseFilePath) throws Exception {
         File baseDir = new File(new File(getBasedir()), pDir);
         File testPom = new File(baseDir, "pom.xml");
         WSDL2CodeMojo mojo = (WSDL2CodeMojo)lookupMojo(pGoal, testPom);
@@ -40,7 +46,7 @@ public class WSDL2CodeMojoTest extends A
         project.setDependencyArtifacts(new HashSet());
         setVariableValueToObject(mojo, "project", project);
         setVariableValueToObject(mojo, "wsdlFile",
-                                 new File(baseDir, 
"src/main/axis2/service.wsdl").getAbsolutePath());
+                                 new File(baseDir, 
baseFilePath).getAbsolutePath());
         setVariableValueToObject(mojo, "outputDirectory",
                                  new File(baseDir, 
"target/generated-sources/axis2/wsdl2code"));
         setVariableValueToObject(mojo, "syncMode", "both");
@@ -51,8 +57,8 @@ public class WSDL2CodeMojoTest extends A
         return mojo;
     }
 
-    protected void runTest(String pDir, String pGoal)
+    protected void runTest(String pDir, String pGoal, String baseFilePath)
             throws Exception {
-        newMojo(pDir, pGoal).execute();
+        newMojo(pDir, pGoal, baseFilePath).execute();
     }
 }


Reply via email to