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 StopComponentMojo extends JMXComponentAbstractMojo { 37 38 41 public void execute() throws MojoExecutionException { 42 try { 43 44 if (LifeCycleMBean.STARTED.equals(this.getState(project 45 .getArtifactId()))) { 46 this.performComponentAction(JMXComponentAbstractMojo.STOP, project.getArtifactId()); 47 } else { 48 System.out 49 .println("The goal is skip because the component 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 |