Author: veithen
Date: Thu Dec  6 20:10:24 2012
New Revision: 1418051

URL: http://svn.apache.org/viewvc?rev=1418051&view=rev
Log:
Added a Maven plug-in to manipulate WSDD files.

Added:
    axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/   (with props)
    axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/pom.xml   (with props)
    axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/
    axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/
    axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/java/
    axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/java/org/
    
axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/java/org/apache/
    
axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/java/org/apache/axis/
    
axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/java/org/apache/axis/tools/
    
axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/java/org/apache/axis/tools/maven/
    
axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/java/org/apache/axis/tools/maven/wsdd/
    
axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/java/org/apache/axis/tools/maven/wsdd/GenerateWSDDMojo.java
   (with props)
Modified:
    axis/axis1/java/branches/EMF/axis-model/model/wsdd.ecore
    
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/DeployableItem.java
    
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/Deployment.java
    
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/Flow.java
    
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/WSDDUtil.java
    
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/DeployableItemImpl.java
    
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/DeploymentImpl.java
    
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/FlowImpl.java
    
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/WSDDPackageImpl.java
    axis/axis1/java/branches/EMF/maven/pom.xml
    axis/axis1/java/branches/EMF/tests/spring-compat-tests/pom.xml

Modified: axis/axis1/java/branches/EMF/axis-model/model/wsdd.ecore
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/branches/EMF/axis-model/model/wsdd.ecore?rev=1418051&r1=1418050&r2=1418051&view=diff
==============================================================================
--- axis/axis1/java/branches/EMF/axis-model/model/wsdd.ecore (original)
+++ axis/axis1/java/branches/EMF/axis-model/model/wsdd.ecore Thu Dec  6 
20:10:24 2012
@@ -97,7 +97,7 @@
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="Flow">
     <eStructuralFeatures xsi:type="ecore:EReference" name="handlers" 
upperBound="-1"
-        eType="#//Handler">
+        eType="#//Handler" containment="true">
       <eAnnotations 
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData";>
         <details key="name" value="handler"/>
         <details key="kind" value="element"/>
@@ -106,8 +106,10 @@
     </eStructuralFeatures>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="DeployableItem" abstract="true" 
eSuperTypes="#//Parameterizable">
-    <eStructuralFeatures xsi:type="ecore:EReference" name="requestFlow" 
eType="#//Flow"/>
-    <eStructuralFeatures xsi:type="ecore:EReference" name="responseFlow" 
eType="#//Flow"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="requestFlow" 
eType="#//Flow"
+        containment="true"/>
+    <eStructuralFeatures xsi:type="ecore:EReference" name="responseFlow" 
eType="#//Flow"
+        containment="true"/>
   </eClassifiers>
   <eClassifiers xsi:type="ecore:EClass" name="GlobalConfiguration" 
eSuperTypes="#//DeployableItem"/>
   <eClassifiers xsi:type="ecore:EClass" name="Transport" 
eSuperTypes="#//DeployableItem">
@@ -165,11 +167,14 @@
       <details key="name" value="deployment"/>
       <details key="kind" value="element"/>
     </eAnnotations>
+    <eOperations name="merge">
+      <eParameters name="other" lowerBound="1" eType="#//Deployment"/>
+    </eOperations>
     <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" 
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
     <eStructuralFeatures xsi:type="ecore:EReference" 
name="globalConfiguration" eType="#//GlobalConfiguration"
         containment="true"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="handlers" 
upperBound="-1"
-        eType="#//Handler">
+        eType="#//Handler" containment="true">
       <eAnnotations 
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData";>
         <details key="name" value="handler"/>
         <details key="kind" value="element"/>
@@ -177,7 +182,7 @@
       </eAnnotations>
     </eStructuralFeatures>
     <eStructuralFeatures xsi:type="ecore:EReference" name="transports" 
upperBound="-1"
-        eType="#//Transport">
+        eType="#//Transport" containment="true">
       <eAnnotations 
source="http:///org/eclipse/emf/ecore/util/ExtendedMetaData";>
         <details key="name" value="transport"/>
         <details key="kind" value="element"/>

Modified: 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/DeployableItem.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/DeployableItem.java?rev=1418051&r1=1418050&r2=1418051&view=diff
==============================================================================
--- 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/DeployableItem.java
 (original)
+++ 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/DeployableItem.java
 Thu Dec  6 20:10:24 2012
@@ -24,50 +24,50 @@ package org.apache.axis.model.wsdd;
  */
 public interface DeployableItem extends Parameterizable {
     /**
-     * Returns the value of the '<em><b>Request Flow</b></em>' reference.
+     * Returns the value of the '<em><b>Request Flow</b></em>' containment 
reference.
      * <!-- begin-user-doc -->
      * <p>
      * If the meaning of the '<em>Request Flow</em>' reference isn't clear,
      * there really should be more of a description here...
      * </p>
      * <!-- end-user-doc -->
-     * @return the value of the '<em>Request Flow</em>' reference.
+     * @return the value of the '<em>Request Flow</em>' containment reference.
      * @see #setRequestFlow(Flow)
-     * @model
+     * @model containment="true"
      * @generated
      */
     Flow getRequestFlow();
 
     /**
-     * Sets the value of the '{@link 
org.apache.axis.model.wsdd.DeployableItem#getRequestFlow <em>Request 
Flow</em>}' reference.
+     * Sets the value of the '{@link 
org.apache.axis.model.wsdd.DeployableItem#getRequestFlow <em>Request 
Flow</em>}' containment reference.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
-     * @param value the new value of the '<em>Request Flow</em>' reference.
+     * @param value the new value of the '<em>Request Flow</em>' containment 
reference.
      * @see #getRequestFlow()
      * @generated
      */
     void setRequestFlow(Flow value);
 
     /**
-     * Returns the value of the '<em><b>Response Flow</b></em>' reference.
+     * Returns the value of the '<em><b>Response Flow</b></em>' containment 
reference.
      * <!-- begin-user-doc -->
      * <p>
      * If the meaning of the '<em>Response Flow</em>' reference isn't clear,
      * there really should be more of a description here...
      * </p>
      * <!-- end-user-doc -->
-     * @return the value of the '<em>Response Flow</em>' reference.
+     * @return the value of the '<em>Response Flow</em>' containment reference.
      * @see #setResponseFlow(Flow)
-     * @model
+     * @model containment="true"
      * @generated
      */
     Flow getResponseFlow();
 
     /**
-     * Sets the value of the '{@link 
org.apache.axis.model.wsdd.DeployableItem#getResponseFlow <em>Response 
Flow</em>}' reference.
+     * Sets the value of the '{@link 
org.apache.axis.model.wsdd.DeployableItem#getResponseFlow <em>Response 
Flow</em>}' containment reference.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
-     * @param value the new value of the '<em>Response Flow</em>' reference.
+     * @param value the new value of the '<em>Response Flow</em>' containment 
reference.
      * @see #getResponseFlow()
      * @generated
      */

Modified: 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/Deployment.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/Deployment.java?rev=1418051&r1=1418050&r2=1418051&view=diff
==============================================================================
--- 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/Deployment.java
 (original)
+++ 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/Deployment.java
 Thu Dec  6 20:10:24 2012
@@ -79,7 +79,7 @@ public interface Deployment {
     void setGlobalConfiguration(GlobalConfiguration value);
 
     /**
-     * Returns the value of the '<em><b>Handlers</b></em>' reference list.
+     * Returns the value of the '<em><b>Handlers</b></em>' containment 
reference list.
      * The list contents are of type {@link 
org.apache.axis.model.wsdd.Handler}.
      * <!-- begin-user-doc -->
      * <p>
@@ -87,15 +87,15 @@ public interface Deployment {
      * there really should be more of a description here...
      * </p>
      * <!-- end-user-doc -->
-     * @return the value of the '<em>Handlers</em>' reference list.
-     * @model type="org.apache.axis.model.wsdd.Handler"
+     * @return the value of the '<em>Handlers</em>' containment reference list.
+     * @model type="org.apache.axis.model.wsdd.Handler" containment="true"
      *        extendedMetaData="name='handler' kind='element' 
namespace='##targetNamespace'"
      * @generated
      */
     List getHandlers();
 
     /**
-     * Returns the value of the '<em><b>Transports</b></em>' reference list.
+     * Returns the value of the '<em><b>Transports</b></em>' containment 
reference list.
      * The list contents are of type {@link 
org.apache.axis.model.wsdd.Transport}.
      * <!-- begin-user-doc -->
      * <p>
@@ -103,8 +103,8 @@ public interface Deployment {
      * there really should be more of a description here...
      * </p>
      * <!-- end-user-doc -->
-     * @return the value of the '<em>Transports</em>' reference list.
-     * @model type="org.apache.axis.model.wsdd.Transport"
+     * @return the value of the '<em>Transports</em>' containment reference 
list.
+     * @model type="org.apache.axis.model.wsdd.Transport" containment="true"
      *        extendedMetaData="name='transport' kind='element' 
namespace='##targetNamespace'"
      * @generated
      */
@@ -126,4 +126,12 @@ public interface Deployment {
      */
     List getServices();
 
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @model otherRequired="true"
+     * @generated
+     */
+    void merge(Deployment other);
+
 } // Deployment

Modified: 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/Flow.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/Flow.java?rev=1418051&r1=1418050&r2=1418051&view=diff
==============================================================================
--- 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/Flow.java
 (original)
+++ 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/Flow.java
 Thu Dec  6 20:10:24 2012
@@ -27,7 +27,7 @@ import java.util.List;
 public interface Flow {
 
     /**
-     * Returns the value of the '<em><b>Handlers</b></em>' reference list.
+     * Returns the value of the '<em><b>Handlers</b></em>' containment 
reference list.
      * The list contents are of type {@link 
org.apache.axis.model.wsdd.Handler}.
      * <!-- begin-user-doc -->
      * <p>
@@ -35,8 +35,8 @@ public interface Flow {
      * there really should be more of a description here...
      * </p>
      * <!-- end-user-doc -->
-     * @return the value of the '<em>Handlers</em>' reference list.
-     * @model type="org.apache.axis.model.wsdd.Handler"
+     * @return the value of the '<em>Handlers</em>' containment reference list.
+     * @model type="org.apache.axis.model.wsdd.Handler" containment="true"
      *        extendedMetaData="name='handler' kind='element' 
namespace='##targetNamespace'"
      * @generated
      */

Modified: 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/WSDDUtil.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/WSDDUtil.java?rev=1418051&r1=1418050&r2=1418051&view=diff
==============================================================================
--- 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/WSDDUtil.java
 (original)
+++ 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/WSDDUtil.java
 Thu Dec  6 20:10:24 2012
@@ -19,6 +19,7 @@
 package org.apache.axis.model.wsdd;
 
 import java.io.IOException;
+import java.io.OutputStream;
 import java.io.Writer;
 import java.util.HashMap;
 import java.util.Map;
@@ -42,6 +43,15 @@ public final class WSDDUtil {
         return (Deployment)resource.getContents().get(0);        
     }
     
+    public static void save(Deployment deployment, OutputStream out) throws 
IOException {
+        AxisXMLResource resource = new AxisXMLResource();
+        XMLProcessor processor = new XMLProcessor();
+        resource.getContents().add(deployment);
+        Map options = new HashMap();
+        options.put(XMLResource.OPTION_ENCODING, "UTF-8");
+        processor.save(out, resource, options);        
+    }
+    
     public static void save(Deployment deployment, Writer writer) throws 
IOException {
         AxisXMLResource resource = new AxisXMLResource();
         XMLProcessor processor = new XMLProcessor();

Modified: 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/DeployableItemImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/DeployableItemImpl.java?rev=1418051&r1=1418050&r2=1418051&view=diff
==============================================================================
--- 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/DeployableItemImpl.java
 (original)
+++ 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/DeployableItemImpl.java
 Thu Dec  6 20:10:24 2012
@@ -9,6 +9,7 @@ package org.apache.axis.model.wsdd.impl;
 import org.apache.axis.model.wsdd.DeployableItem;
 
 import org.apache.axis.model.wsdd.Flow;
+import org.eclipse.emf.common.notify.NotificationChain;
 import org.eclipse.emf.ecore.EClass;
 
 import org.eclipse.emf.ecore.EObject;
@@ -30,7 +31,7 @@ import org.eclipse.emf.ecore.InternalEOb
  */
 public abstract class DeployableItemImpl extends ParameterizableImpl 
implements DeployableItem {
     /**
-     * The cached value of the '{@link #getRequestFlow() <em>Request 
Flow</em>}' reference.
+     * The cached value of the '{@link #getRequestFlow() <em>Request 
Flow</em>}' containment reference.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @see #getRequestFlow()
@@ -39,7 +40,7 @@ public abstract class DeployableItemImpl
      */
     protected Flow requestFlow;
     /**
-     * The cached value of the '{@link #getResponseFlow() <em>Response 
Flow</em>}' reference.
+     * The cached value of the '{@link #getResponseFlow() <em>Response 
Flow</em>}' containment reference.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @see #getResponseFlow()
@@ -72,12 +73,6 @@ public abstract class DeployableItemImpl
      * @generated
      */
     public Flow getRequestFlow() {
-        if (requestFlow != null && ((EObject)requestFlow).eIsProxy()) {
-            InternalEObject oldRequestFlow = (InternalEObject)requestFlow;
-            requestFlow = (Flow)eResolveProxy(oldRequestFlow);
-            if (requestFlow != oldRequestFlow) {
-            }
-        }
         return requestFlow;
     }
 
@@ -86,8 +81,10 @@ public abstract class DeployableItemImpl
      * <!-- end-user-doc -->
      * @generated
      */
-    public Flow basicGetRequestFlow() {
-        return requestFlow;
+    public NotificationChain basicSetRequestFlow(Flow newRequestFlow, 
NotificationChain msgs) {
+        Flow oldRequestFlow = requestFlow;
+        requestFlow = newRequestFlow;
+        return msgs;
     }
 
     /**
@@ -96,7 +93,15 @@ public abstract class DeployableItemImpl
      * @generated
      */
     public void setRequestFlow(Flow newRequestFlow) {
-        requestFlow = newRequestFlow;
+        if (newRequestFlow != requestFlow) {
+            NotificationChain msgs = null;
+            if (requestFlow != null)
+                msgs = ((InternalEObject)requestFlow).eInverseRemove(this, 
EOPPOSITE_FEATURE_BASE - WSDDPackageImpl.DEPLOYABLE_ITEM__REQUEST_FLOW, null, 
msgs);
+            if (newRequestFlow != null)
+                msgs = ((InternalEObject)newRequestFlow).eInverseAdd(this, 
EOPPOSITE_FEATURE_BASE - WSDDPackageImpl.DEPLOYABLE_ITEM__REQUEST_FLOW, null, 
msgs);
+            msgs = basicSetRequestFlow(newRequestFlow, msgs);
+            if (msgs != null) msgs.dispatch();
+        }
     }
 
     /**
@@ -105,12 +110,6 @@ public abstract class DeployableItemImpl
      * @generated
      */
     public Flow getResponseFlow() {
-        if (responseFlow != null && ((EObject)responseFlow).eIsProxy()) {
-            InternalEObject oldResponseFlow = (InternalEObject)responseFlow;
-            responseFlow = (Flow)eResolveProxy(oldResponseFlow);
-            if (responseFlow != oldResponseFlow) {
-            }
-        }
         return responseFlow;
     }
 
@@ -119,8 +118,10 @@ public abstract class DeployableItemImpl
      * <!-- end-user-doc -->
      * @generated
      */
-    public Flow basicGetResponseFlow() {
-        return responseFlow;
+    public NotificationChain basicSetResponseFlow(Flow newResponseFlow, 
NotificationChain msgs) {
+        Flow oldResponseFlow = responseFlow;
+        responseFlow = newResponseFlow;
+        return msgs;
     }
 
     /**
@@ -129,7 +130,30 @@ public abstract class DeployableItemImpl
      * @generated
      */
     public void setResponseFlow(Flow newResponseFlow) {
-        responseFlow = newResponseFlow;
+        if (newResponseFlow != responseFlow) {
+            NotificationChain msgs = null;
+            if (responseFlow != null)
+                msgs = ((InternalEObject)responseFlow).eInverseRemove(this, 
EOPPOSITE_FEATURE_BASE - WSDDPackageImpl.DEPLOYABLE_ITEM__RESPONSE_FLOW, null, 
msgs);
+            if (newResponseFlow != null)
+                msgs = ((InternalEObject)newResponseFlow).eInverseAdd(this, 
EOPPOSITE_FEATURE_BASE - WSDDPackageImpl.DEPLOYABLE_ITEM__RESPONSE_FLOW, null, 
msgs);
+            msgs = basicSetResponseFlow(newResponseFlow, msgs);
+            if (msgs != null) msgs.dispatch();
+        }
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
+    public NotificationChain eInverseRemove(InternalEObject otherEnd, int 
featureID, NotificationChain msgs) {
+        switch (featureID) {
+            case WSDDPackageImpl.DEPLOYABLE_ITEM__REQUEST_FLOW:
+                return basicSetRequestFlow(null, msgs);
+            case WSDDPackageImpl.DEPLOYABLE_ITEM__RESPONSE_FLOW:
+                return basicSetResponseFlow(null, msgs);
+        }
+        return super.eInverseRemove(otherEnd, featureID, msgs);
     }
 
     /**
@@ -140,11 +164,9 @@ public abstract class DeployableItemImpl
     public Object eGet(int featureID, boolean resolve, boolean coreType) {
         switch (featureID) {
             case WSDDPackageImpl.DEPLOYABLE_ITEM__REQUEST_FLOW:
-                if (resolve) return getRequestFlow();
-                return basicGetRequestFlow();
+                return getRequestFlow();
             case WSDDPackageImpl.DEPLOYABLE_ITEM__RESPONSE_FLOW:
-                if (resolve) return getResponseFlow();
-                return basicGetResponseFlow();
+                return getResponseFlow();
         }
         return super.eGet(featureID, resolve, coreType);
     }

Modified: 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/DeploymentImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/DeploymentImpl.java?rev=1418051&r1=1418050&r2=1418051&view=diff
==============================================================================
--- 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/DeploymentImpl.java
 (original)
+++ 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/DeploymentImpl.java
 Thu Dec  6 20:10:24 2012
@@ -73,7 +73,7 @@ public class DeploymentImpl extends EObj
      */
     protected GlobalConfiguration globalConfiguration;
     /**
-     * The cached value of the '{@link #getHandlers() <em>Handlers</em>}' 
reference list.
+     * The cached value of the '{@link #getHandlers() <em>Handlers</em>}' 
containment reference list.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @see #getHandlers()
@@ -82,7 +82,7 @@ public class DeploymentImpl extends EObj
      */
     protected EList handlers;
     /**
-     * The cached value of the '{@link #getTransports() <em>Transports</em>}' 
reference list.
+     * The cached value of the '{@link #getTransports() <em>Transports</em>}' 
containment reference list.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @see #getTransports()
@@ -209,6 +209,17 @@ public class DeploymentImpl extends EObj
         return services;
     }
 
+    public void merge(Deployment other) {
+        // TODO: very naive implementation; need more fine grained merging
+        GlobalConfiguration otherGlobalConfiguration = 
other.getGlobalConfiguration();
+        if (otherGlobalConfiguration != null) {
+            setGlobalConfiguration(otherGlobalConfiguration);
+        }
+        getHandlers().addAll(other.getHandlers());
+        getTransports().addAll(other.getTransports());
+        getServices().addAll(other.getServices());
+    }
+
     /**
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
@@ -218,6 +229,10 @@ public class DeploymentImpl extends EObj
         switch (featureID) {
             case WSDDPackageImpl.DEPLOYMENT__GLOBAL_CONFIGURATION:
                 return basicSetGlobalConfiguration(null, msgs);
+            case WSDDPackageImpl.DEPLOYMENT__HANDLERS:
+                return ((InternalEList)getHandlers()).basicRemove(otherEnd, 
msgs);
+            case WSDDPackageImpl.DEPLOYMENT__TRANSPORTS:
+                return ((InternalEList)getTransports()).basicRemove(otherEnd, 
msgs);
             case WSDDPackageImpl.DEPLOYMENT__SERVICES:
                 return ((InternalEList)getServices()).basicRemove(otherEnd, 
msgs);
         }

Modified: 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/FlowImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/FlowImpl.java?rev=1418051&r1=1418050&r2=1418051&view=diff
==============================================================================
--- 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/FlowImpl.java
 (original)
+++ 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/FlowImpl.java
 Thu Dec  6 20:10:24 2012
@@ -11,11 +11,14 @@ import java.util.List;
 import org.apache.axis.model.wsdd.Flow;
 
 import org.apache.axis.model.wsdd.Handler;
+import org.eclipse.emf.common.notify.NotificationChain;
 import org.eclipse.emf.common.util.EList;
 import org.eclipse.emf.ecore.EClass;
 
+import org.eclipse.emf.ecore.InternalEObject;
 import org.eclipse.emf.ecore.impl.EObjectImpl;
 import org.eclipse.emf.ecore.util.BasicInternalEList;
+import org.eclipse.emf.ecore.util.InternalEList;
 
 /**
  * <!-- begin-user-doc -->
@@ -32,7 +35,7 @@ import org.eclipse.emf.ecore.util.BasicI
  */
 public class FlowImpl extends EObjectImpl implements Flow {
     /**
-     * The cached value of the '{@link #getHandlers() <em>Handlers</em>}' 
reference list.
+     * The cached value of the '{@link #getHandlers() <em>Handlers</em>}' 
containment reference list.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @see #getHandlers()
@@ -76,6 +79,19 @@ public class FlowImpl extends EObjectImp
      * <!-- end-user-doc -->
      * @generated
      */
+    public NotificationChain eInverseRemove(InternalEObject otherEnd, int 
featureID, NotificationChain msgs) {
+        switch (featureID) {
+            case WSDDPackageImpl.FLOW__HANDLERS:
+                return ((InternalEList)getHandlers()).basicRemove(otherEnd, 
msgs);
+        }
+        return super.eInverseRemove(otherEnd, featureID, msgs);
+    }
+
+    /**
+     * <!-- begin-user-doc -->
+     * <!-- end-user-doc -->
+     * @generated
+     */
     public Object eGet(int featureID, boolean resolve, boolean coreType) {
         switch (featureID) {
             case WSDDPackageImpl.FLOW__HANDLERS:

Modified: 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/WSDDPackageImpl.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/WSDDPackageImpl.java?rev=1418051&r1=1418050&r2=1418051&view=diff
==============================================================================
--- 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/WSDDPackageImpl.java
 (original)
+++ 
axis/axis1/java/branches/EMF/axis-model/src/main/java/org/apache/axis/model/wsdd/impl/WSDDPackageImpl.java
 Thu Dec  6 20:10:24 2012
@@ -668,7 +668,7 @@ public class WSDDPackageImpl extends EPa
     public static final int HANDLER_FEATURE_COUNT = 
PARAMETERIZABLE_FEATURE_COUNT + 2;
 
     /**
-     * The feature id for the '<em><b>Handlers</b></em>' reference list.
+     * The feature id for the '<em><b>Handlers</b></em>' containment reference 
list.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
@@ -705,7 +705,7 @@ public class WSDDPackageImpl extends EPa
     public static final int DEPLOYABLE_ITEM__PARAMETERS = 
PARAMETERIZABLE__PARAMETERS;
 
     /**
-     * The feature id for the '<em><b>Request Flow</b></em>' reference.
+     * The feature id for the '<em><b>Request Flow</b></em>' containment 
reference.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
@@ -714,7 +714,7 @@ public class WSDDPackageImpl extends EPa
     public static final int DEPLOYABLE_ITEM__REQUEST_FLOW = 
PARAMETERIZABLE_FEATURE_COUNT + 0;
 
     /**
-     * The feature id for the '<em><b>Response Flow</b></em>' reference.
+     * The feature id for the '<em><b>Response Flow</b></em>' containment 
reference.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
@@ -751,7 +751,7 @@ public class WSDDPackageImpl extends EPa
     public static final int GLOBAL_CONFIGURATION__PARAMETERS = 
DEPLOYABLE_ITEM__PARAMETERS;
 
     /**
-     * The feature id for the '<em><b>Request Flow</b></em>' reference.
+     * The feature id for the '<em><b>Request Flow</b></em>' containment 
reference.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
@@ -760,7 +760,7 @@ public class WSDDPackageImpl extends EPa
     public static final int GLOBAL_CONFIGURATION__REQUEST_FLOW = 
DEPLOYABLE_ITEM__REQUEST_FLOW;
 
     /**
-     * The feature id for the '<em><b>Response Flow</b></em>' reference.
+     * The feature id for the '<em><b>Response Flow</b></em>' containment 
reference.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
@@ -797,7 +797,7 @@ public class WSDDPackageImpl extends EPa
     public static final int TRANSPORT__PARAMETERS = 
DEPLOYABLE_ITEM__PARAMETERS;
 
     /**
-     * The feature id for the '<em><b>Request Flow</b></em>' reference.
+     * The feature id for the '<em><b>Request Flow</b></em>' containment 
reference.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
@@ -806,7 +806,7 @@ public class WSDDPackageImpl extends EPa
     public static final int TRANSPORT__REQUEST_FLOW = 
DEPLOYABLE_ITEM__REQUEST_FLOW;
 
     /**
-     * The feature id for the '<em><b>Response Flow</b></em>' reference.
+     * The feature id for the '<em><b>Response Flow</b></em>' containment 
reference.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
@@ -861,7 +861,7 @@ public class WSDDPackageImpl extends EPa
     public static final int SERVICE__PARAMETERS = DEPLOYABLE_ITEM__PARAMETERS;
 
     /**
-     * The feature id for the '<em><b>Request Flow</b></em>' reference.
+     * The feature id for the '<em><b>Request Flow</b></em>' containment 
reference.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
@@ -870,7 +870,7 @@ public class WSDDPackageImpl extends EPa
     public static final int SERVICE__REQUEST_FLOW = 
DEPLOYABLE_ITEM__REQUEST_FLOW;
 
     /**
-     * The feature id for the '<em><b>Response Flow</b></em>' reference.
+     * The feature id for the '<em><b>Response Flow</b></em>' containment 
reference.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
@@ -997,7 +997,7 @@ public class WSDDPackageImpl extends EPa
     public static final int DEPLOYMENT__GLOBAL_CONFIGURATION = 1;
 
     /**
-     * The feature id for the '<em><b>Handlers</b></em>' reference list.
+     * The feature id for the '<em><b>Handlers</b></em>' containment reference 
list.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
@@ -1006,7 +1006,7 @@ public class WSDDPackageImpl extends EPa
     public static final int DEPLOYMENT__HANDLERS = 2;
 
     /**
-     * The feature id for the '<em><b>Transports</b></em>' reference list.
+     * The feature id for the '<em><b>Transports</b></em>' containment 
reference list.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
      * @generated
@@ -1310,10 +1310,10 @@ public class WSDDPackageImpl extends EPa
     }
 
     /**
-     * Returns the meta object for the reference list '{@link 
org.apache.axis.model.wsdd.Flow#getHandlers <em>Handlers</em>}'.
+     * Returns the meta object for the containment reference list '{@link 
org.apache.axis.model.wsdd.Flow#getHandlers <em>Handlers</em>}'.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
-     * @return the meta object for the reference list '<em>Handlers</em>'.
+     * @return the meta object for the containment reference list 
'<em>Handlers</em>'.
      * @see org.apache.axis.model.wsdd.Flow#getHandlers()
      * @see #getFlow()
      * @generated
@@ -1846,10 +1846,10 @@ public class WSDDPackageImpl extends EPa
     }
 
     /**
-     * Returns the meta object for the reference '{@link 
org.apache.axis.model.wsdd.DeployableItem#getRequestFlow <em>Request 
Flow</em>}'.
+     * Returns the meta object for the containment reference '{@link 
org.apache.axis.model.wsdd.DeployableItem#getRequestFlow <em>Request 
Flow</em>}'.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
-     * @return the meta object for the reference '<em>Request Flow</em>'.
+     * @return the meta object for the containment reference '<em>Request 
Flow</em>'.
      * @see org.apache.axis.model.wsdd.DeployableItem#getRequestFlow()
      * @see #getDeployableItem()
      * @generated
@@ -1859,10 +1859,10 @@ public class WSDDPackageImpl extends EPa
     }
 
     /**
-     * Returns the meta object for the reference '{@link 
org.apache.axis.model.wsdd.DeployableItem#getResponseFlow <em>Response 
Flow</em>}'.
+     * Returns the meta object for the containment reference '{@link 
org.apache.axis.model.wsdd.DeployableItem#getResponseFlow <em>Response 
Flow</em>}'.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
-     * @return the meta object for the reference '<em>Response Flow</em>'.
+     * @return the meta object for the containment reference '<em>Response 
Flow</em>'.
      * @see org.apache.axis.model.wsdd.DeployableItem#getResponseFlow()
      * @see #getDeployableItem()
      * @generated
@@ -2089,10 +2089,10 @@ public class WSDDPackageImpl extends EPa
     }
 
     /**
-     * Returns the meta object for the reference list '{@link 
org.apache.axis.model.wsdd.Deployment#getHandlers <em>Handlers</em>}'.
+     * Returns the meta object for the containment reference list '{@link 
org.apache.axis.model.wsdd.Deployment#getHandlers <em>Handlers</em>}'.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
-     * @return the meta object for the reference list '<em>Handlers</em>'.
+     * @return the meta object for the containment reference list 
'<em>Handlers</em>'.
      * @see org.apache.axis.model.wsdd.Deployment#getHandlers()
      * @see #getDeployment()
      * @generated
@@ -2102,10 +2102,10 @@ public class WSDDPackageImpl extends EPa
     }
 
     /**
-     * Returns the meta object for the reference list '{@link 
org.apache.axis.model.wsdd.Deployment#getTransports <em>Transports</em>}'.
+     * Returns the meta object for the containment reference list '{@link 
org.apache.axis.model.wsdd.Deployment#getTransports <em>Transports</em>}'.
      * <!-- begin-user-doc -->
      * <!-- end-user-doc -->
-     * @return the meta object for the reference list '<em>Transports</em>'.
+     * @return the meta object for the containment reference list 
'<em>Transports</em>'.
      * @see org.apache.axis.model.wsdd.Deployment#getTransports()
      * @see #getDeployment()
      * @generated
@@ -2378,11 +2378,11 @@ public class WSDDPackageImpl extends EPa
         initEAttribute(getHandler_Type(), theXMLTypePackage.getQName(), 
"type", null, 0, 1, Handler.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, 
!IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
         initEClass(flowEClass, Flow.class, "Flow", !IS_ABSTRACT, 
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-        initEReference(getFlow_Handlers(), this.getHandler(), null, 
"handlers", null, 0, -1, Flow.class, !IS_TRANSIENT, !IS_VOLATILE, 
IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, 
!IS_DERIVED, IS_ORDERED);
+        initEReference(getFlow_Handlers(), this.getHandler(), null, 
"handlers", null, 0, -1, Flow.class, !IS_TRANSIENT, !IS_VOLATILE, 
IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, 
!IS_DERIVED, IS_ORDERED);
 
         initEClass(deployableItemEClass, DeployableItem.class, 
"DeployableItem", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
-        initEReference(getDeployableItem_RequestFlow(), this.getFlow(), null, 
"requestFlow", null, 0, 1, DeployableItem.class, !IS_TRANSIENT, !IS_VOLATILE, 
IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, 
!IS_DERIVED, IS_ORDERED);
-        initEReference(getDeployableItem_ResponseFlow(), this.getFlow(), null, 
"responseFlow", null, 0, 1, DeployableItem.class, !IS_TRANSIENT, !IS_VOLATILE, 
IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, 
!IS_DERIVED, IS_ORDERED);
+        initEReference(getDeployableItem_RequestFlow(), this.getFlow(), null, 
"requestFlow", null, 0, 1, DeployableItem.class, !IS_TRANSIENT, !IS_VOLATILE, 
IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, 
!IS_DERIVED, IS_ORDERED);
+        initEReference(getDeployableItem_ResponseFlow(), this.getFlow(), null, 
"responseFlow", null, 0, 1, DeployableItem.class, !IS_TRANSIENT, !IS_VOLATILE, 
IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, 
!IS_DERIVED, IS_ORDERED);
 
         initEClass(globalConfigurationEClass, GlobalConfiguration.class, 
"GlobalConfiguration", !IS_ABSTRACT, !IS_INTERFACE, 
IS_GENERATED_INSTANCE_CLASS);
 
@@ -2404,10 +2404,13 @@ public class WSDDPackageImpl extends EPa
         initEClass(deploymentEClass, Deployment.class, "Deployment", 
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
         initEAttribute(getDeployment_Name(), ecorePackage.getEString(), 
"name", null, 0, 1, Deployment.class, !IS_TRANSIENT, !IS_VOLATILE, 
IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
         initEReference(getDeployment_GlobalConfiguration(), 
this.getGlobalConfiguration(), null, "globalConfiguration", null, 0, 1, 
Deployment.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, 
!IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-        initEReference(getDeployment_Handlers(), this.getHandler(), null, 
"handlers", null, 0, -1, Deployment.class, !IS_TRANSIENT, !IS_VOLATILE, 
IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, 
!IS_DERIVED, IS_ORDERED);
-        initEReference(getDeployment_Transports(), this.getTransport(), null, 
"transports", null, 0, -1, Deployment.class, !IS_TRANSIENT, !IS_VOLATILE, 
IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, 
!IS_DERIVED, IS_ORDERED);
+        initEReference(getDeployment_Handlers(), this.getHandler(), null, 
"handlers", null, 0, -1, Deployment.class, !IS_TRANSIENT, !IS_VOLATILE, 
IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, 
!IS_DERIVED, IS_ORDERED);
+        initEReference(getDeployment_Transports(), this.getTransport(), null, 
"transports", null, 0, -1, Deployment.class, !IS_TRANSIENT, !IS_VOLATILE, 
IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, 
!IS_DERIVED, IS_ORDERED);
         initEReference(getDeployment_Services(), this.getService(), null, 
"services", null, 0, -1, Deployment.class, !IS_TRANSIENT, !IS_VOLATILE, 
IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, 
!IS_DERIVED, IS_ORDERED);
 
+        op = addEOperation(deploymentEClass, null, "merge");
+        addEParameter(op, this.getDeployment(), "other", 1, 1);
+
         // Initialize enums and add enum literals
         initEEnum(useEEnum, Use.class, "Use");
         addEEnumLiteral(useEEnum, Use.ENCODED_LITERAL);
@@ -2595,7 +2598,7 @@ public class WSDDPackageImpl extends EPa
         public static final EClass FLOW = eINSTANCE.getFlow();
 
         /**
-         * The meta object literal for the '<em><b>Handlers</b></em>' 
reference list feature.
+         * The meta object literal for the '<em><b>Handlers</b></em>' 
containment reference list feature.
          * <!-- begin-user-doc -->
          * <!-- end-user-doc -->
          * @generated
@@ -2951,7 +2954,7 @@ public class WSDDPackageImpl extends EPa
         public static final EClass DEPLOYABLE_ITEM = 
eINSTANCE.getDeployableItem();
 
         /**
-         * The meta object literal for the '<em><b>Request Flow</b></em>' 
reference feature.
+         * The meta object literal for the '<em><b>Request Flow</b></em>' 
containment reference feature.
          * <!-- begin-user-doc -->
          * <!-- end-user-doc -->
          * @generated
@@ -2959,7 +2962,7 @@ public class WSDDPackageImpl extends EPa
         public static final EReference DEPLOYABLE_ITEM__REQUEST_FLOW = 
eINSTANCE.getDeployableItem_RequestFlow();
 
         /**
-         * The meta object literal for the '<em><b>Response Flow</b></em>' 
reference feature.
+         * The meta object literal for the '<em><b>Response Flow</b></em>' 
containment reference feature.
          * <!-- begin-user-doc -->
          * <!-- end-user-doc -->
          * @generated
@@ -3111,7 +3114,7 @@ public class WSDDPackageImpl extends EPa
         public static final EReference DEPLOYMENT__GLOBAL_CONFIGURATION = 
eINSTANCE.getDeployment_GlobalConfiguration();
 
         /**
-         * The meta object literal for the '<em><b>Handlers</b></em>' 
reference list feature.
+         * The meta object literal for the '<em><b>Handlers</b></em>' 
containment reference list feature.
          * <!-- begin-user-doc -->
          * <!-- end-user-doc -->
          * @generated
@@ -3119,7 +3122,7 @@ public class WSDDPackageImpl extends EPa
         public static final EReference DEPLOYMENT__HANDLERS = 
eINSTANCE.getDeployment_Handlers();
 
         /**
-         * The meta object literal for the '<em><b>Transports</b></em>' 
reference list feature.
+         * The meta object literal for the '<em><b>Transports</b></em>' 
containment reference list feature.
          * <!-- begin-user-doc -->
          * <!-- end-user-doc -->
          * @generated

Propchange: axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Thu Dec  6 20:10:24 2012
@@ -0,0 +1,4 @@
+.classpath
+.project
+target
+.settings

Added: axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/pom.xml?rev=1418051&view=auto
==============================================================================
--- axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/pom.xml (added)
+++ axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/pom.xml Thu Dec  6 
20:10:24 2012
@@ -0,0 +1,68 @@
+<?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.axis</groupId>
+        <artifactId>maven</artifactId>
+        <version>1.4.1-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+    <artifactId>maven-wsdd-plugin</artifactId>
+    <packaging>maven-plugin</packaging>
+    <name>maven-wsdd-plugin</name>
+    <description>
+        Maven plugin to process WSDD files.
+    </description>
+    <url>${baseUrl}/maven/wsdd</url>
+    <distributionManagement>
+        <site>
+            <id>axis</id>
+            <url>${baseSiteUrl}/maven/wsdd</url>
+        </site>
+    </distributionManagement>
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axis-model</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-plugin-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.maven</groupId>
+            <artifactId>maven-project</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.github.veithen.ulog</groupId>
+            <artifactId>ulog</artifactId>
+        </dependency>
+    </dependencies>
+    <!-- reporting>
+        <plugins>
+            <plugin>
+                <artifactId>maven-plugin-plugin</artifactId>
+                <version>2.9</version>
+            </plugin>
+        </plugins>
+    </reporting -->
+</project>

Propchange: axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/java/org/apache/axis/tools/maven/wsdd/GenerateWSDDMojo.java
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/java/org/apache/axis/tools/maven/wsdd/GenerateWSDDMojo.java?rev=1418051&view=auto
==============================================================================
--- 
axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/java/org/apache/axis/tools/maven/wsdd/GenerateWSDDMojo.java
 (added)
+++ 
axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/java/org/apache/axis/tools/maven/wsdd/GenerateWSDDMojo.java
 Thu Dec  6 20:10:24 2012
@@ -0,0 +1,175 @@
+/*
+ * 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.
+ */
+package org.apache.axis.tools.maven.wsdd;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.Enumeration;
+import java.util.List;
+
+import org.apache.axis.model.wsdd.Deployment;
+import org.apache.axis.model.wsdd.WSDDUtil;
+import org.apache.maven.artifact.DependencyResolutionRequiredException;
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugin.MojoFailureException;
+import org.apache.maven.project.MavenProject;
+import org.xml.sax.InputSource;
+
+import com.github.veithen.ulog.PlexusLoggerInjector;
+
+/**
+ * 
+ * 
+ * @goal generate-wsdd
+ * @requiresDependencyResolution compile
+ */
+public class GenerateWSDDMojo extends AbstractMojo {
+    /**
+     * @component
+     */
+    // This is necessary to set up logging such that all messages logged by 
the Axis
+    // libraries through commons logging are redirected to Plexus logs.
+    PlexusLoggerInjector loggerInjector;
+
+    /**
+     * The maven project.
+     *
+     * @parameter expression="${project}"
+     * @required
+     * @readonly
+     */
+    private MavenProject project;
+
+    /**
+     * 
+     * 
+     * @parameter
+     * @required
+     */
+    private String type;
+    
+    /**
+     * 
+     * 
+     * @parameter
+     * @required
+     */
+    private File[] files;
+    
+    /**
+     * 
+     * @parameter
+     * @required
+     */
+    private File output;
+    
+    public void execute() throws MojoExecutionException, MojoFailureException {
+        // TODO: copy & paste from AbstractGenerateWsdlMojo
+        List classpath;
+        try {
+            classpath = project.getCompileClasspathElements();
+        } catch (DependencyResolutionRequiredException ex) {
+            throw new MojoExecutionException("Unexpected exception", ex);
+        }
+        URL[] urls = new URL[classpath.size()];
+        for (int i=0; i<classpath.size(); i++) {
+            try {
+                urls[i] = new File((String)classpath.get(i)).toURL();
+            } catch (MalformedURLException ex) {
+                throw new MojoExecutionException("Unexpected exception", ex);
+            }
+        }
+        ClassLoader cl = new URLClassLoader(urls);
+        
+        Deployment deployment;
+        
+        // Note: To locate the different parts of the default configuration, 
we use the same
+        //       algorithm as in DefaultConfiguration.
+        
+        // Load the base configuration
+        String resourceName = "org/apache/axis/" + type + "/" + type + 
"-config.wsdd";
+        InputStream in = cl.getResourceAsStream(resourceName);
+        if (in == null) {
+            throw new MojoFailureException("Resource " + resourceName + " not 
found");
+        }
+        getLog().info("Loading resource " + resourceName);
+        try {
+            try {
+                deployment = WSDDUtil.load(new InputSource(in));
+            } finally {
+                in.close();
+            }
+        } catch (IOException ex) {
+            throw new MojoFailureException("Failed to process resource " + 
resourceName, ex);
+        }
+        
+        // Discover and load additional default configuration fragments
+        resourceName = "META-INF/axis/default-" + type + "-config.wsdd";
+        Enumeration resources;
+        try {
+            resources = cl.getResources(resourceName);
+        } catch (IOException ex) {
+            throw new MojoFailureException("Failed to discover resources with 
name " + resourceName, ex);
+        }
+        while (resources.hasMoreElements()) {
+            URL url = (URL)resources.nextElement();
+            getLog().info("Loading " + url);
+            try {
+                in = url.openStream();
+                try {
+                    deployment.merge(WSDDUtil.load(new InputSource(in)));
+                } finally {
+                    in.close();
+                }
+            } catch (Exception ex) {
+                throw new MojoFailureException("Failed to process " + url, ex);
+            }
+        }
+        
+        // Load WSDD files from plug-in configuration
+        for (int i=0; i<files.length; i++) {
+            File file = files[i];
+            getLog().info("Loading " + file);
+            try {
+                deployment.merge(WSDDUtil.load(new 
InputSource(file.toURL().toString())));
+            } catch (Exception ex) {
+                throw new MojoFailureException("Failed to process " + file, 
ex);
+            }
+        }
+        
+        getLog().info("Writing " + output);
+        output.getParentFile().mkdirs();
+        try {
+            FileOutputStream out = new FileOutputStream(output);
+            try {
+                WSDDUtil.save(deployment, out);
+            } finally {
+                out.close();
+            }
+        } catch (Exception ex) {
+            throw new MojoFailureException("Failed to write " + output, ex);
+        }
+    }
+}

Propchange: 
axis/axis1/java/branches/EMF/maven/maven-wsdd-plugin/src/main/java/org/apache/axis/tools/maven/wsdd/GenerateWSDDMojo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: axis/axis1/java/branches/EMF/maven/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/branches/EMF/maven/pom.xml?rev=1418051&r1=1418050&r2=1418051&view=diff
==============================================================================
--- axis/axis1/java/branches/EMF/maven/pom.xml (original)
+++ axis/axis1/java/branches/EMF/maven/pom.xml Thu Dec  6 20:10:24 2012
@@ -68,6 +68,7 @@
     </dependencyManagement>
     <modules>
        <module>nsmap</module>
+        <module>maven-wsdd-plugin</module>
         <module>maven-wsdl2java-plugin</module>
         <module>maven-java2wsdl-plugin</module>
         <module>maven-axis-server-plugin</module>

Modified: axis/axis1/java/branches/EMF/tests/spring-compat-tests/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis1/java/branches/EMF/tests/spring-compat-tests/pom.xml?rev=1418051&r1=1418050&r2=1418051&view=diff
==============================================================================
--- axis/axis1/java/branches/EMF/tests/spring-compat-tests/pom.xml (original)
+++ axis/axis1/java/branches/EMF/tests/spring-compat-tests/pom.xml Thu Dec  6 
20:10:24 2012
@@ -68,13 +68,32 @@
                             <deployScope>application</deployScope>
                             
<implementationClassName>org.apache.axis.test.spring.OrderEndpoint</implementationClassName>
                             
<writeStubToTestSources>true</writeStubToTestSources>
-                            <!-- TODO: need to merge the output into 
server-config.wsdd -->
                             
<deployWsdd>${project.build.directory}/wsdd/OrderService.wsdd</deployWsdd>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
             <plugin>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>maven-wsdd-plugin</artifactId>
+                <version>${project.version}</version>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>generate-wsdd</goal>
+                        </goals>
+                        <configuration>
+                            <type>server</type>
+                            <files>
+                                
<file>${project.build.directory}/wsdd/OrderService.wsdd</file>
+                            </files>
+                            
<output>${project.build.directory}/webapp/WEB-INF/server-config.wsdd</output>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>build-helper-maven-plugin</artifactId>
                 <executions>


Reply via email to