KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > bull > eclipse > jonas > actions > ear > DeployEarActionDelegate


1 package com.bull.eclipse.jonas.actions.ear;
2
3 /*
4  * (c) Copyright Bull SA 2003.
5  * All Rights Reserved.
6  */

7
8 import org.eclipse.core.runtime.CoreException;
9
10 import com.bull.eclipse.jonas.JonasLauncherPlugin;
11 import com.bull.eclipse.jonas.JonasProject;
12 import com.bull.eclipse.jonas.actions.JonasProjectAbstractActionDelegate;
13
14 public class DeployEarActionDelegate extends JonasProjectAbstractActionDelegate {
15
16     public boolean doActionOn(JonasProject prj) throws Exception JavaDoc {
17         String JavaDoc earFile = prj.getProject().getName() + ".ear";
18         deploy(earFile);
19         return false;
20     }
21
22     static public void deploy(String JavaDoc earName) throws CoreException {
23         JonasLauncherPlugin.log("earFile = " + earName);
24         String JavaDoc[] options = {"-a", earName};
25         JonasLauncherPlugin.getDefault().getJonasBootstrap().admin(options);
26     }
27
28 }
29
30
Popular Tags