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 StopServiceAssemblyMojo extends JMXServiceAssemblyAbstractMojo { 37 38 41 public void execute() throws MojoExecutionException { 42 try { 43 if (LifeCycleMBean.STARTED.equals(this.getState(project 44 .getArtifactId()))) { 45 this.performAction(JMXServiceAssemblyAbstractMojo.STOP, project 46 .getArtifactId()); 47 } else { 48 System.out 49 .println("The goal is skip because the service assembly is not in the state \"" + LifeCycleMBean.STARTED + "\"."); 50 } 51 52 } catch (Exception e) { 53 e.printStackTrace(); 54 throw new MojoExecutionException(e.getLocalizedMessage(), e); 55 } 56 } 57 } 58 | Popular Tags |