1 7 package com.bull.eclipse.jonas; 8 9 15 16 import java.io.File ; 17 18 import org.eclipse.ant.core.AntRunner; 19 import org.eclipse.core.runtime.CoreException; 20 21 import com.bull.eclipse.jonas.utils.TemplateDirUtil; 22 23 public class CreateJonasBase { 24 25 public static void createJonasServer(String jonas_base) throws CoreException { 26 AntRunner antRunner = new AntRunner(); 27 String jonas_root = JonasLauncherPlugin.getDefault().getJonasDir(); 28 String buildFileLocation = TemplateDirUtil.getTemplateDir() + File.separator + "CreateJonasBase.xml"; 29 antRunner.setBuildFileLocation(buildFileLocation); 30 String [] arguments = {"-Djonas.root=" + jonas_root , "-Djonas.base=" + jonas_base }; 31 antRunner.setArguments(arguments); 32 String [] task = {"create_jonasbase"}; 33 antRunner.setExecutionTargets(task); 34 antRunner.run(); 35 } 36 } 37 | Popular Tags |