KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > bull > eclipse > jonas > actions > war > ExportWarActionDelegate


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

7  
8
9 import com.bull.eclipse.jonas.JonasLauncherPlugin;
10 import com.bull.eclipse.jonas.JonasProject;
11 import com.bull.eclipse.jonas.actions.JonasActionException;
12 import com.bull.eclipse.jonas.actions.JonasProjectAbstractActionDelegate;
13 import com.bull.eclipse.jonas.utils.AntUtils;
14 import com.bull.eclipse.jonas.utils.UpdatePropsFile;
15
16 public class ExportWarActionDelegate extends JonasProjectAbstractActionDelegate {
17     
18     public boolean doActionOn(JonasProject prj) throws Exception JavaDoc {
19         if(!prj.getWarLocation().equals("")) {
20             // Update build.properties with JONAS_ROOT
21
UpdatePropsFile.updatePropsProject(prj);
22
23             String JavaDoc buildFile = prj.getWebDirFolder().getFullPath().append("/build.xml").toOSString();
24             JonasLauncherPlugin.log("Directory = " + buildFile);
25             AntUtils.runAnt(buildFile);
26             //TODO Deploy
27
//DeployWarActionDelegate.deploy(prj.getWebContext() + ".war");
28
} else {
29             throw new JonasActionException(JonasLauncherPlugin.getResourceString("msg.action.exportWAR.failed"));
30         }
31         return false;
32     }
33
34 }
35
36
Popular Tags