1 19 20 package org.apache.geronimo.mavenplugins.geronimo.server; 21 22 import org.apache.maven.plugin.MojoExecutionException; 23 24 import org.apache.geronimo.mavenplugins.geronimo.ServerProxy; 25 import org.apache.geronimo.mavenplugins.geronimo.reporting.ReportingMojoSupport; 26 27 34 public class StopServerMojo 35 extends ReportingMojoSupport 36 { 37 protected void doExecute() throws Exception { 38 ServerProxy server = new ServerProxy(hostname, port, username, password); 39 40 44 if (!server.isFullyStarted()) { 45 throw new MojoExecutionException("Server does not appear to be started"); 46 } 47 else { 48 log.info("Stopping Geronimo server..."); 49 50 server.shutdown(); 51 52 } 56 } 57 58 protected String getFullClassName() { 59 return this.getClass().getName(); 60 } 61 } 62 | Popular Tags |