1 22 package org.objectweb.petals.tools.jbiplugin; 23 24 import javax.jbi.management.LifeCycleMBean; 25 26 import org.apache.maven.plugin.MojoExecutionException; 27 28 36 public class ShutdownServiceAssemblyMojo extends JMXServiceAssemblyAbstractMojo { 37 38 41 public void execute() throws MojoExecutionException { 42 try { 43 if (LifeCycleMBean.STOPPED.equals(this.getState(project 44 .getArtifactId()))) { 45 this.performAction(JMXServiceAssemblyAbstractMojo.SHUTDOWN, project.getArtifactId()); 46 } else { 47 System.out 48 .println("The goal is skip because the service assembly is not in the state \"" + LifeCycleMBean.STOPPED + "\"."); 49 } 50 51 } catch (Exception e) { 52 e.printStackTrace(); 53 throw new MojoExecutionException(e.getLocalizedMessage(), e); 54 } 55 } 56 } 57 | Popular Tags |