You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2012/02/12 14:32:13 UTC

svn commit: r1243252 - in /axis/axis1/java/trunk: integration/ maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ samples/attachments-sample/ samples/bidbuy-sample/ samples/encoding-sample/ samples/faults-sample/ samples/handler...

Author: veithen
Date: Sun Feb 12 13:32:12 2012
New Revision: 1243252

URL: http://svn.apache.org/viewvc?rev=1243252&view=rev
Log:
Some refactorings of the maven-axis-server-plugin so that we will be able to add goals that start other types of processes.

Added:
    axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AdminClientUtils.java   (with props)
    axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AxisServerStartAction.java   (with props)
    axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AxisServerStopAction.java   (with props)
    axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ManagedProcess.java
      - copied, changed from r1243042, axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/Server.java
    axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ProcessStartAction.java   (with props)
    axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ProcessStopAction.java   (with props)
    axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/StopAllMojo.java
      - copied, changed from r1243216, axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/StopServerMojo.java
Removed:
    axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/Server.java
    axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/StopServerMojo.java
Modified:
    axis/axis1/java/trunk/integration/pom.xml
    axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/DefaultServerManager.java
    axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ServerManager.java
    axis/axis1/java/trunk/samples/attachments-sample/pom.xml
    axis/axis1/java/trunk/samples/bidbuy-sample/pom.xml
    axis/axis1/java/trunk/samples/encoding-sample/pom.xml
    axis/axis1/java/trunk/samples/faults-sample/pom.xml
    axis/axis1/java/trunk/samples/handler-sample/pom.xml
    axis/axis1/java/trunk/samples/message-sample/pom.xml
    axis/axis1/java/trunk/samples/misc-sample/pom.xml
    axis/axis1/java/trunk/samples/proxy-sample/pom.xml
    axis/axis1/java/trunk/samples/stock-sample/pom.xml

Modified: axis/axis1/java/trunk/integration/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/integration/pom.xml?rev=1243252&r1=1243251&r2=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/integration/pom.xml (original)
+++ axis/axis1/java/trunk/integration/pom.xml Sun Feb 12 13:32:12 2012
@@ -915,7 +915,7 @@
                     <execution>
                         <id>stop-server</id>
                         <goals>
-                            <goal>stop-server</goal>
+                            <goal>stop-all</goal>
                         </goals>
                     </execution>
                 </executions>

Added: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AdminClientUtils.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AdminClientUtils.java?rev=1243252&view=auto
==============================================================================
--- axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AdminClientUtils.java (added)
+++ axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AdminClientUtils.java Sun Feb 12 13:32:12 2012
@@ -0,0 +1,42 @@
+/*
+ * 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.maven.server;
+
+import java.io.File;
+
+import org.apache.axis.client.AdminClient;
+import org.codehaus.plexus.logging.Logger;
+
+public final class AdminClientUtils {
+    private AdminClientUtils() {}
+    
+    public static void process(Logger logger, AdminClient adminClient, File[] wsddFiles) throws Exception {
+        for (int i=0; i<wsddFiles.length; i++) {
+            File wsddFile = wsddFiles[i];
+            if (logger.isDebugEnabled()) {
+                logger.debug("Starting to process " + wsddFile);
+            }
+            String result = adminClient.process(wsddFile.getPath());
+            if (logger.isDebugEnabled()) {
+                logger.debug("AdminClient result: " + result);
+            }
+            logger.info("Processed " + wsddFile);
+        }
+    }
+}

Propchange: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AdminClientUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AxisServerStartAction.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AxisServerStartAction.java?rev=1243252&view=auto
==============================================================================
--- axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AxisServerStartAction.java (added)
+++ axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AxisServerStartAction.java Sun Feb 12 13:32:12 2012
@@ -0,0 +1,73 @@
+/*
+ * 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.maven.server;
+
+import java.io.File;
+import java.net.URL;
+import java.rmi.RemoteException;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.client.AdminClient;
+import org.apache.axis.client.Call;
+import org.codehaus.plexus.logging.Logger;
+
+public class AxisServerStartAction implements ProcessStartAction {
+    private final int port;
+    private final AdminClient adminClient;
+    private final File[] deployments;
+    private final int timeout;
+    
+    public AxisServerStartAction(int port, AdminClient adminClient, File[] deployments, int timeout) {
+        this.port = port;
+        this.adminClient = adminClient;
+        this.deployments = deployments;
+        this.timeout = timeout;
+    }
+
+    public void execute(Logger logger, Process process) throws Exception {
+        // Wait for server to become ready
+        String versionUrl = "http://localhost:" + port + "/axis/services/Version";
+        Call call = new Call(new URL(versionUrl));
+        call.setOperationName(new QName(versionUrl, "getVersion"));
+        long start = System.currentTimeMillis();
+        while (true) {
+            try {
+                String result = (String)call.invoke(new Object[0]);
+                logger.info("Server ready on port " + port + ": " + result.replace('\n', ' '));
+                break;
+            } catch (RemoteException ex) {
+                if (System.currentTimeMillis() > start + timeout) {
+                    throw ex;
+                }
+            }
+            try {
+                int exitValue = process.exitValue();
+                // TODO: choose a better exception here
+                throw new RemoteException("The server process unexpectedly died with exit status " + exitValue);
+            } catch (IllegalThreadStateException ex) {
+                // This means that the process is still running; continue
+            }
+            Thread.sleep(200);
+        }
+        
+        // Deploy services
+        AdminClientUtils.process(logger, adminClient, deployments);
+    }
+}

Propchange: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AxisServerStartAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AxisServerStopAction.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AxisServerStopAction.java?rev=1243252&view=auto
==============================================================================
--- axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AxisServerStopAction.java (added)
+++ axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AxisServerStopAction.java Sun Feb 12 13:32:12 2012
@@ -0,0 +1,40 @@
+/*
+ * 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.maven.server;
+
+import java.io.File;
+
+import org.apache.axis.client.AdminClient;
+import org.codehaus.plexus.logging.Logger;
+
+public class AxisServerStopAction implements ProcessStopAction {
+    private final AdminClient adminClient;
+    private final File[] undeployments;
+
+    public AxisServerStopAction(AdminClient adminClient, File[] undeployments) {
+        this.adminClient = adminClient;
+        this.undeployments = undeployments;
+    }
+
+    public int execute(Logger logger) throws Exception {
+        AdminClientUtils.process(logger, adminClient, undeployments);
+        adminClient.quit();
+        return STOPPING;
+    }
+}

Propchange: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/AxisServerStopAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/DefaultServerManager.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/DefaultServerManager.java?rev=1243252&r1=1243251&r2=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/DefaultServerManager.java (original)
+++ axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/DefaultServerManager.java Sun Feb 12 13:32:12 2012
@@ -20,23 +20,18 @@ package org.apache.axis.maven.server;
 
 import java.io.File;
 import java.net.URL;
-import java.rmi.RemoteException;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
-
-import javax.xml.namespace.QName;
 
 import org.apache.axis.client.AdminClient;
-import org.apache.axis.client.Call;
 import org.codehaus.plexus.logging.LogEnabled;
 import org.codehaus.plexus.logging.Logger;
 import org.codehaus.plexus.util.StringUtils;
 
 public class DefaultServerManager implements ServerManager, LogEnabled {
-    private final Map servers = new HashMap();
+    private final List managedProcesses = new ArrayList();
     
     private Logger logger;
     
@@ -44,20 +39,6 @@ public class DefaultServerManager implem
         this.logger = logger;
     }
 
-    private void process(AdminClient adminClient, File[] wsddFiles) throws Exception {
-        for (int i=0; i<wsddFiles.length; i++) {
-            File wsddFile = wsddFiles[i];
-            if (logger.isDebugEnabled()) {
-                logger.debug("Starting to process " + wsddFile);
-            }
-            String result = adminClient.process(wsddFile.getPath());
-            if (logger.isDebugEnabled()) {
-                logger.debug("AdminClient result: " + result);
-            }
-            logger.info("Processed " + wsddFile);
-        }
-    }
-    
     public void startServer(String jvm, String[] classpath, int port, String[] vmArgs, File workDir, File[] deployments, File[] undeployments, File[] jwsDirs, int timeout) throws Exception {
         AdminClient adminClient = new AdminClient(true);
         adminClient.setTargetEndpointAddress(new URL("http://localhost:" + port + "/axis/services/AdminService"));
@@ -79,45 +60,38 @@ public class DefaultServerManager implem
             logger.debug("Starting process with command line: " + cmdline);
         }
         Process process = Runtime.getRuntime().exec((String[])cmdline.toArray(new String[cmdline.size()]), null, workDir);
-        servers.put(Integer.valueOf(port), new Server(process, adminClient, undeployments));
+        managedProcesses.add(new ManagedProcess(process, "Server on port " + port, new AxisServerStopAction(adminClient, undeployments)));
         new Thread(new StreamPump(process.getInputStream(), System.out), "axis-server-" + port + "-stdout").start();
         new Thread(new StreamPump(process.getErrorStream(), System.err), "axis-server-" + port + "-stderr").start();
         
-        // Wait for server to become ready
-        String versionUrl = "http://localhost:" + port + "/axis/services/Version";
-        Call call = new Call(new URL(versionUrl));
-        call.setOperationName(new QName(versionUrl, "getVersion"));
-        long start = System.currentTimeMillis();
-        for (int i=0; ; i++) {
+        new AxisServerStartAction(port, adminClient, deployments, timeout).execute(logger, process);
+    }
+    
+    public void stopAll() throws Exception {
+        Exception savedException = null;
+        for (Iterator it = managedProcesses.iterator(); it.hasNext(); ) {
+            ManagedProcess server = (ManagedProcess)it.next();
+            int result;
             try {
-                String result = (String)call.invoke(new Object[0]);
-                logger.info("Server ready on port " + port + ": " + result.replace('\n', ' '));
-                break;
-            } catch (RemoteException ex) {
-                if (System.currentTimeMillis() > start + timeout) {
-                    throw ex;
+                result = server.getStopAction().execute(logger);
+            } catch (Exception ex) {
+                if (savedException == null) {
+                    savedException = ex;
                 }
+                result = -1;
             }
-            try {
-                int exitValue = process.exitValue();
-                // TODO: choose a better exception here
-                throw new RemoteException("The server process unexpectedly died with exit status " + exitValue);
-            } catch (IllegalThreadStateException ex) {
-                // This means that the process is still running; continue
+            if (result == ProcessStopAction.STOPPING) {
+                server.getProcess().waitFor();
+            } else {
+                server.getProcess().destroy();
             }
-            Thread.sleep(200);
+            logger.info(server.getDescription() + " stopped");
+        }
+        // TODO: need to clear the collection because the same ServerManager instance may be used by multiple projects in a reactor build;
+        //       note that this means that the plugin is not thread safe (i.e. doesn't support parallel builds in Maven 3)
+        managedProcesses.clear();
+        if (savedException != null) {
+            throw savedException;
         }
-        
-        // Deploy services
-        process(adminClient, deployments);
-    }
-    
-    public void stopServer(int port) throws Exception {
-        Server server = (Server)servers.remove(Integer.valueOf(port));
-        AdminClient adminClient = server.getAdminClient();
-        process(adminClient, server.getUndeployments());
-        adminClient.quit();
-        server.getProcess().waitFor();
-        logger.info("Server on port " + port + " stopped");
     }
 }

Copied: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ManagedProcess.java (from r1243042, axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/Server.java)
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ManagedProcess.java?p2=axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ManagedProcess.java&p1=axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/Server.java&r1=1243042&r2=1243252&rev=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/Server.java (original)
+++ axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ManagedProcess.java Sun Feb 12 13:32:12 2012
@@ -18,30 +18,26 @@
  */
 package org.apache.axis.maven.server;
 
-import java.io.File;
-
-import org.apache.axis.client.AdminClient;
-
-public class Server {
+public class ManagedProcess {
     private final Process process;
-    private final AdminClient adminClient;
-    private final File[] undeployments;
+    private final String description;
+    private final ProcessStopAction stopAction;
 
-    public Server(Process process, AdminClient adminClient, File[] undeployments) {
+    public ManagedProcess(Process process, String description, ProcessStopAction stopAction) {
         this.process = process;
-        this.adminClient = adminClient;
-        this.undeployments = undeployments;
+        this.description = description;
+        this.stopAction = stopAction;
     }
 
     public Process getProcess() {
         return process;
     }
 
-    public AdminClient getAdminClient() {
-        return adminClient;
+    public String getDescription() {
+        return description;
     }
 
-    public File[] getUndeployments() {
-        return undeployments;
+    public ProcessStopAction getStopAction() {
+        return stopAction;
     }
 }

Added: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ProcessStartAction.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ProcessStartAction.java?rev=1243252&view=auto
==============================================================================
--- axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ProcessStartAction.java (added)
+++ axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ProcessStartAction.java Sun Feb 12 13:32:12 2012
@@ -0,0 +1,31 @@
+/*
+ * 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.maven.server;
+
+import org.codehaus.plexus.logging.Logger;
+
+/**
+ * Action to be executed after a given process has been started. This is typically used to configure
+ * the server process, e.g. to deploy services.
+ * 
+ * @author Andreas Veithen
+ */
+public interface ProcessStartAction {
+    void execute(Logger logger, Process process) throws Exception;
+}

Propchange: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ProcessStartAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ProcessStopAction.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ProcessStopAction.java?rev=1243252&view=auto
==============================================================================
--- axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ProcessStopAction.java (added)
+++ axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ProcessStopAction.java Sun Feb 12 13:32:12 2012
@@ -0,0 +1,42 @@
+/*
+ * 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.maven.server;
+
+import org.codehaus.plexus.logging.Logger;
+
+/**
+ * Action to be executed when a process is stopped. Typically (but not necessarily) this involves
+ * sending a request to initiate a clean shutdown of the process.
+ * 
+ * @author Andreas Veithen
+ */
+public interface ProcessStopAction {
+    /**
+     * Indicates that the process is expected to be still running after the action is completed.
+     */
+    int RUNNING = 1;
+
+    /**
+     * Indicates that the action has sent a request to the process to initiate a clean shutdown,
+     * i.e. that the process is expected to be stopping (but not necessarily to be stopped yet).
+     */
+    int STOPPING = 2;
+    
+    int execute(Logger logger) throws Exception;
+}

Propchange: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ProcessStopAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ServerManager.java
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ServerManager.java?rev=1243252&r1=1243251&r2=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ServerManager.java (original)
+++ axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/ServerManager.java Sun Feb 12 13:32:12 2012
@@ -22,5 +22,5 @@ import java.io.File;
 
 public interface ServerManager {
     void startServer(String jvm, String[] classpath, int port, String[] vmArgs, File workDir, File[] deployments, File[] undeployments, File[] jwsDirs, int timeout) throws Exception;
-    void stopServer(int port) throws Exception;
+    void stopAll() throws Exception;
 }

Copied: axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/StopAllMojo.java (from r1243216, axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/StopServerMojo.java)
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/StopAllMojo.java?p2=axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/StopAllMojo.java&p1=axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/StopServerMojo.java&r1=1243216&r2=1243252&rev=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/StopServerMojo.java (original)
+++ axis/axis1/java/trunk/maven/maven-axis-server-plugin/src/main/java/org/apache/axis/maven/server/StopAllMojo.java Sun Feb 12 13:32:12 2012
@@ -22,17 +22,17 @@ import org.apache.maven.plugin.MojoExecu
 import org.apache.maven.plugin.MojoFailureException;
 
 /**
- * Stop a {@link org.apache.axis.server.standalone.StandaloneAxisServer} instance.
+ * Stop all processes created by {@link StartServerMojo}.
  * 
- * @goal stop-server
+ * @goal stop-all
  * @phase post-integration-test
  */
-public class StopServerMojo extends AbstractServerMojo {
+public class StopAllMojo extends AbstractServerMojo {
     public void execute() throws MojoExecutionException, MojoFailureException {
         try {
-            getServerManager().stopServer(getPort());
+            getServerManager().stopAll();
         } catch (Exception ex) {
-            throw new MojoFailureException("Failed to stop server", ex);
+            throw new MojoFailureException("Errors occurred while attempting to stop processes", ex);
         }
     }
 }

Modified: axis/axis1/java/trunk/samples/attachments-sample/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/attachments-sample/pom.xml?rev=1243252&r1=1243251&r2=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/samples/attachments-sample/pom.xml (original)
+++ axis/axis1/java/trunk/samples/attachments-sample/pom.xml Sun Feb 12 13:32:12 2012
@@ -81,7 +81,7 @@
                     <execution>
                         <id>stop-server</id>
                         <goals>
-                            <goal>stop-server</goal>
+                            <goal>stop-all</goal>
                         </goals>
                     </execution>
                 </executions>

Modified: axis/axis1/java/trunk/samples/bidbuy-sample/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/bidbuy-sample/pom.xml?rev=1243252&r1=1243251&r2=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/samples/bidbuy-sample/pom.xml (original)
+++ axis/axis1/java/trunk/samples/bidbuy-sample/pom.xml Sun Feb 12 13:32:12 2012
@@ -81,7 +81,7 @@
                     <execution>
                         <id>stop-server</id>
                         <goals>
-                            <goal>stop-server</goal>
+                            <goal>stop-all</goal>
                         </goals>
                     </execution>
                 </executions>

Modified: axis/axis1/java/trunk/samples/encoding-sample/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/encoding-sample/pom.xml?rev=1243252&r1=1243251&r2=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/samples/encoding-sample/pom.xml (original)
+++ axis/axis1/java/trunk/samples/encoding-sample/pom.xml Sun Feb 12 13:32:12 2012
@@ -81,7 +81,7 @@
                     <execution>
                         <id>stop-server</id>
                         <goals>
-                            <goal>stop-server</goal>
+                            <goal>stop-all</goal>
                         </goals>
                     </execution>
                 </executions>

Modified: axis/axis1/java/trunk/samples/faults-sample/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/faults-sample/pom.xml?rev=1243252&r1=1243251&r2=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/samples/faults-sample/pom.xml (original)
+++ axis/axis1/java/trunk/samples/faults-sample/pom.xml Sun Feb 12 13:32:12 2012
@@ -81,7 +81,7 @@
                     <execution>
                         <id>stop-server</id>
                         <goals>
-                            <goal>stop-server</goal>
+                            <goal>stop-all</goal>
                         </goals>
                     </execution>
                 </executions>

Modified: axis/axis1/java/trunk/samples/handler-sample/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/handler-sample/pom.xml?rev=1243252&r1=1243251&r2=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/samples/handler-sample/pom.xml (original)
+++ axis/axis1/java/trunk/samples/handler-sample/pom.xml Sun Feb 12 13:32:12 2012
@@ -81,7 +81,7 @@
                     <execution>
                         <id>stop-server</id>
                         <goals>
-                            <goal>stop-server</goal>
+                            <goal>stop-all</goal>
                         </goals>
                     </execution>
                 </executions>

Modified: axis/axis1/java/trunk/samples/message-sample/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/message-sample/pom.xml?rev=1243252&r1=1243251&r2=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/samples/message-sample/pom.xml (original)
+++ axis/axis1/java/trunk/samples/message-sample/pom.xml Sun Feb 12 13:32:12 2012
@@ -81,7 +81,7 @@
                     <execution>
                         <id>stop-server</id>
                         <goals>
-                            <goal>stop-server</goal>
+                            <goal>stop-all</goal>
                         </goals>
                     </execution>
                 </executions>

Modified: axis/axis1/java/trunk/samples/misc-sample/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/misc-sample/pom.xml?rev=1243252&r1=1243251&r2=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/samples/misc-sample/pom.xml (original)
+++ axis/axis1/java/trunk/samples/misc-sample/pom.xml Sun Feb 12 13:32:12 2012
@@ -81,7 +81,7 @@
                     <execution>
                         <id>stop-server</id>
                         <goals>
-                            <goal>stop-server</goal>
+                            <goal>stop-all</goal>
                         </goals>
                     </execution>
                 </executions>

Modified: axis/axis1/java/trunk/samples/proxy-sample/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/proxy-sample/pom.xml?rev=1243252&r1=1243251&r2=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/samples/proxy-sample/pom.xml (original)
+++ axis/axis1/java/trunk/samples/proxy-sample/pom.xml Sun Feb 12 13:32:12 2012
@@ -92,7 +92,7 @@
                     <execution>
                         <id>stop-server</id>
                         <goals>
-                            <goal>stop-server</goal>
+                            <goal>stop-all</goal>
                         </goals>
                     </execution>
                 </executions>

Modified: axis/axis1/java/trunk/samples/stock-sample/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis1/java/trunk/samples/stock-sample/pom.xml?rev=1243252&r1=1243251&r2=1243252&view=diff
==============================================================================
--- axis/axis1/java/trunk/samples/stock-sample/pom.xml (original)
+++ axis/axis1/java/trunk/samples/stock-sample/pom.xml Sun Feb 12 13:32:12 2012
@@ -89,7 +89,7 @@
                     <execution>
                         <id>stop-server</id>
                         <goals>
-                            <goal>stop-server</goal>
+                            <goal>stop-all</goal>
                         </goals>
                     </execution>
                 </executions>