1 22 package org.objectweb.petals.tools.jbiplugin; 23 24 import java.io.File ; 25 26 import javax.jbi.management.LifeCycleMBean; 27 28 import org.apache.maven.plugin.MojoExecutionException; 29 30 38 public class DeployServiceAssemblyMojo extends JMXServiceAssemblyAbstractMojo { 39 40 43 public void execute() throws MojoExecutionException { 44 try { 45 46 if (LifeCycleMBean.UNKNOWN.equals(this.getState(project 47 .getArtifactId()))) { 48 String saURL = "file:///" 49 + new File (outputDirectory + File.separator + jbiName 50 + ".zip").getAbsolutePath(); 51 performAction(JMXServiceAssemblyAbstractMojo.DEPLOY, saURL); 52 53 } else { 54 System.out 55 .println("The goal is skip because the service assembly is already deployed."); 56 } 57 58 } catch (Exception e) { 59 e.printStackTrace(); 60 throw new MojoExecutionException(e.getLocalizedMessage(), e); 61 } 62 } 63 } 64 | Popular Tags |