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 37 public class UninstallComponentMojo extends JMXComponentAbstractMojo { 38 39 42 public void execute() throws MojoExecutionException { 43 try { 44 45 if (LifeCycleMBean.SHUTDOWN.equals(this.getState(project 46 .getArtifactId()))) { 47 this.performInstallerComponentAction( 48 JMXComponentAbstractMojo.UNINSTALL, project 49 .getArtifactId()); 50 } else { 51 System.out 52 .println("The goal is skip because the component is not in the state \"" 53 + LifeCycleMBean.SHUTDOWN + "\"."); 54 } 55 56 } catch (Exception e) { 57 e.printStackTrace(); 58 throw new MojoExecutionException(e.getLocalizedMessage(), e); 59 } 60 } 61 } 62 | Popular Tags |