axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r635143 - in /webservices/axis2/trunk/java/modules/tool/axis2-java2wsdl-maven-plugin: pom.xml src/main/java/org/apache/axis2/maven2/java2wsdl/Java2WSDLMojo.java
Date Sun, 09 Mar 2008 02:49:54 GMT
Author: dims
Date: Sat Mar  8 18:49:53 2008
New Revision: 635143

URL: http://svn.apache.org/viewvc?rev=635143&view=rev
Log:
enable test case for java2wsdl mojo

Modified:
    webservices/axis2/trunk/java/modules/tool/axis2-java2wsdl-maven-plugin/pom.xml
    webservices/axis2/trunk/java/modules/tool/axis2-java2wsdl-maven-plugin/src/main/java/org/apache/axis2/maven2/java2wsdl/Java2WSDLMojo.java

Modified: webservices/axis2/trunk/java/modules/tool/axis2-java2wsdl-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-java2wsdl-maven-plugin/pom.xml?rev=635143&r1=635142&r2=635143&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-java2wsdl-maven-plugin/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-java2wsdl-maven-plugin/pom.xml Sat Mar
 8 18:49:53 2008
@@ -34,7 +34,16 @@
 	<build>
 		<sourceDirectory>src/main/java</sourceDirectory>
 		<testSourceDirectory>src/test/java</testSourceDirectory>
-	</build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <inherited>true</inherited>
+                <configuration>
+                    <skip>false</skip>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 	<dependencies>
 		<dependency>
 			<groupId>org.apache.axis2</groupId>
@@ -78,7 +87,7 @@
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-javadoc-plugin</artifactId>
 			</plugin>
-			<plugin>
+            <plugin>
 				<groupId>org.apache.maven.plugins</groupId>
 				<artifactId>maven-changes-plugin</artifactId>
 				<reportSets>

Modified: webservices/axis2/trunk/java/modules/tool/axis2-java2wsdl-maven-plugin/src/main/java/org/apache/axis2/maven2/java2wsdl/Java2WSDLMojo.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/tool/axis2-java2wsdl-maven-plugin/src/main/java/org/apache/axis2/maven2/java2wsdl/Java2WSDLMojo.java?rev=635143&r1=635142&r2=635143&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/tool/axis2-java2wsdl-maven-plugin/src/main/java/org/apache/axis2/maven2/java2wsdl/Java2WSDLMojo.java
(original)
+++ webservices/axis2/trunk/java/modules/tool/axis2-java2wsdl-maven-plugin/src/main/java/org/apache/axis2/maven2/java2wsdl/Java2WSDLMojo.java
Sat Mar  8 18:49:53 2008
@@ -228,13 +228,19 @@
                         Java2WSDLConstants.OUTPUT_FILENAME_OPTION,
                         outputFile.getName() );
 
+        Artifact artifact = project.getArtifact();
         Set artifacts = project.getArtifacts();
-        String[] artifactFileNames = new String[artifacts.size() + 1];
+        String[] artifactFileNames = new String[artifacts.size() + (artifact == null ? 0
: 1)];
         int j = 0;
         for(Iterator i = artifacts.iterator(); i.hasNext(); j++) {
             artifactFileNames[j] = ((Artifact) i.next()).getFile().getAbsolutePath();
         }
-        artifactFileNames[j] = project.getArtifact().getFile().getAbsolutePath();
+        if(artifact != null) {
+            File file = artifact.getFile();
+            if(file != null){
+                artifactFileNames[j] = file.getAbsolutePath();
+            }
+        }
 
         addToOptionMap( optionMap,
                         Java2WSDLConstants.CLASSPATH_OPTION,
@@ -301,17 +307,19 @@
         }
 
         ArrayList list = new ArrayList();
-        Iterator iterator = package2Namespace.entrySet().iterator();
-
-        while (iterator.hasNext()) {
-            Map.Entry entry = (Map.Entry) iterator.next();
-            String packageName = (String) entry.getKey();
-            String namespace = (String) entry.getValue();
-            list.add(OPEN_BRACKET +
-                    packageName +
-                    COMMA +
-                    namespace +
-                    CLOSE_BRACKET);
+        if(package2Namespace != null){
+            Iterator iterator = package2Namespace.entrySet().iterator();
+    
+            while (iterator.hasNext()) {
+                Map.Entry entry = (Map.Entry) iterator.next();
+                String packageName = (String) entry.getKey();
+                String namespace = (String) entry.getValue();
+                list.add(OPEN_BRACKET +
+                        packageName +
+                        COMMA +
+                        namespace +
+                        CLOSE_BRACKET);
+            }
         }
         addToOptionMap(optionMap,
                 Java2WSDLConstants.JAVA_PKG_2_NSMAP_OPTION,



---------------------------------------------------------------------
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