1 22 package org.objectweb.petals.tools.jbiplugin; 23 24 import java.io.File ; 25 26 import org.apache.maven.plugin.MojoExecutionException; 27 28 36 public class LoadComponentMojo extends JMXComponentAbstractMojo { 37 38 41 public void execute() throws MojoExecutionException { 42 try { 43 44 if ("Unknown".equals(this.getState(project.getArtifactId()))) { 45 String fileURL = "file:///" 46 + new File (outputDirectory + File.separator + jbiName 47 + ".zip").getAbsolutePath(); 48 this.performInstallationAction( 49 JMXComponentAbstractMojo.LOAD_NEW_INSTALLED, fileURL); 50 51 } else { 52 System.out 53 .println("The goal is skip because the service assembly is not in the state \"Unknown\"."); 54 } 55 56 } catch (Exception e) { 57 e.printStackTrace(); 58 throw new MojoExecutionException(e.getLocalizedMessage(), e); 59 } 60 } 61 } 62 | Popular Tags |