axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r560849 - in /webservices/axis2/trunk/java/modules/tool/axis2-java2wsdl-maven-plugin: pom.xml src/main/java/org/apache/axis2/maven2/java2wsdl/Java2WSDLMojo.java
Date Mon, 30 Jul 2007 03:17:09 GMT
Author: dims
Date: Sun Jul 29 20:17:08 2007
New Revision: 560849

URL: http://svn.apache.org/viewvc?view=rev&rev=560849
Log:
- Better default for the wsdl file
- Behave better if the output location is not specified in the pom configuration
- add dependency for RPC MR
- add checks for null's for params that are not specified.


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?view=diff&rev=560849&r1=560848&r2=560849
==============================================================================
--- 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 Sun Jul
29 20:17:08 2007
@@ -42,6 +42,11 @@
 			<version>${version}</version>
 		</dependency>
 		<dependency>
+			<groupId>org.apache.axis2</groupId>
+			<artifactId>axis2-adb</artifactId>
+			<version>${version}</version>
+		</dependency>
+		<dependency>
 			<groupId>org.apache.maven</groupId>
 			<artifactId>maven-plugin-api</artifactId>
 		</dependency>

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?view=diff&rev=560849&r1=560848&r2=560849
==============================================================================
--- 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
Sun Jul 29 20:17:08 2007
@@ -97,7 +97,7 @@
 
     /**
      * Name of the service file, which is being generated.
-     * @parameter expression="${axis2.java2wsdl.outputFileName}" default-value="${project.build.outputDirectory}/generated-resources/java2wsdl/service.xml"
+     * @parameter expression="${axis2.java2wsdl.outputFileName}" default-value="${project.build.directory}/generated-resources/service.wsdl"
      */
     private String outputFileName;
 
@@ -213,8 +213,11 @@
         addToOptionMap( optionMap,
                         Java2WSDLConstants.SERVICE_NAME_OPTION,
                         serviceName);
-        File f = new File(project.getBasedir(), outputFileName);
-        File dir = f.getParentFile();
+        File outputFile = new File(outputFileName);
+        if(!outputFile.isAbsolute()){
+            outputFile = new File(project.getBasedir(), outputFileName);
+        }
+        File dir = outputFile.getParentFile();
         if (!dir.isDirectory()) {
             dir.mkdirs();
         }
@@ -223,7 +226,7 @@
                         dir.getPath() );
         addToOptionMap( optionMap,
                         Java2WSDLConstants.OUTPUT_FILENAME_OPTION,
-                        f.getName() );
+                        outputFile.getName() );
 
         Set artifacts = project.getArtifacts();
         String[] artifactFileNames = new String[artifacts.size() + 1];
@@ -237,45 +240,65 @@
                         Java2WSDLConstants.CLASSPATH_OPTION,
                         artifactFileNames);
 
-        addToOptionMap(optionMap,
-                Java2WSDLConstants.STYLE_OPTION,
-                style);
-
-        addToOptionMap(optionMap,
-                Java2WSDLConstants.USE_OPTION,
-                use);
-
-        addToOptionMap(optionMap,
-                Java2WSDLConstants.WSDL_VERSION_OPTION,
-                wsdlVersion);
-
-        addToOptionMap(optionMap,
-                Java2WSDLConstants.DOC_LIT_BARE,
-                docLitBare);
-
-        addToOptionMap(optionMap,
-                Java2WSDLConstants.LOCATION_OPTION,
-                locationUri);
-
-        addToOptionMap(optionMap,
-                Java2WSDLConstants.NAMESPACE_GENERATOR_OPTION,
-                nsGenClassName);
-
-        addToOptionMap(optionMap,
-                Java2WSDLConstants.SCHEMA_GENERATOR_OPTION,
-                schemaGenClassName);
-
-        addToOptionMap(optionMap,
-                Java2WSDLConstants.ATTR_FORM_DEFAULT_OPTION,
-                attrFormDefault);
-
-        addToOptionMap(optionMap,
-                Java2WSDLConstants.ELEMENT_FORM_DEFAULT_OPTION,
-                elementFormDefault);
-
-        addToOptionMap(optionMap,
-                Java2WSDLConstants.EXTRA_CLASSES_DEFAULT_OPTION,
-                extraClasses);
+        if (style != null) {
+            addToOptionMap(optionMap,
+                    Java2WSDLConstants.STYLE_OPTION,
+                    style);
+        }
+
+        if (use != null) {
+            addToOptionMap(optionMap,
+                    Java2WSDLConstants.USE_OPTION,
+                    use);
+        }
+
+        if (wsdlVersion != null) {
+            addToOptionMap(optionMap,
+                    Java2WSDLConstants.WSDL_VERSION_OPTION,
+                    wsdlVersion);
+        }
+
+        if (docLitBare != null) {
+            addToOptionMap(optionMap,
+                    Java2WSDLConstants.DOC_LIT_BARE,
+                    docLitBare);
+        }
+
+        if (locationUri != null) {
+            addToOptionMap(optionMap,
+                    Java2WSDLConstants.LOCATION_OPTION,
+                    locationUri);
+        }
+
+        if (nsGenClassName != null) {
+            addToOptionMap(optionMap,
+                    Java2WSDLConstants.NAMESPACE_GENERATOR_OPTION,
+                    nsGenClassName);
+        }
+
+        if (schemaGenClassName != null) {
+            addToOptionMap(optionMap,
+                    Java2WSDLConstants.SCHEMA_GENERATOR_OPTION,
+                    schemaGenClassName);
+        }
+
+        if (attrFormDefault != null) {
+            addToOptionMap(optionMap,
+                    Java2WSDLConstants.ATTR_FORM_DEFAULT_OPTION,
+                    attrFormDefault);
+        }
+
+        if (elementFormDefault != null) {
+            addToOptionMap(optionMap,
+                    Java2WSDLConstants.ELEMENT_FORM_DEFAULT_OPTION,
+                    elementFormDefault);
+        }
+
+        if (extraClasses != null && extraClasses.length > 0) {
+            addToOptionMap(optionMap,
+                    Java2WSDLConstants.EXTRA_CLASSES_DEFAULT_OPTION,
+                    extraClasses);
+        }
 
         ArrayList list = new ArrayList();
         Iterator iterator = package2Namespace.entrySet().iterator();



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