org.apache.cactus.eclipse.webapp.internal
Class WarBuilder

java.lang.Object
  extended by org.apache.cactus.eclipse.webapp.internal.WarBuilder

public class WarBuilder
extends java.lang.Object

Helper class for creating War files.

Version:
$Id: WarBuilder.java 238816 2004-02-29 16:36:46Z vmassol $

Field Summary
static java.lang.String LIB
          Name of the lib directory
static java.lang.String WEBINF
          Name of the WEB-INF directory
static java.lang.String WEBXML
          Name of the web.xml file
 
Constructor Summary
WarBuilder(org.eclipse.jdt.core.IJavaProject theJavaProject)
           
 
Method Summary
 java.io.File createWar(org.eclipse.core.runtime.IProgressMonitor thePM)
          Creates the war file.
static void delete(java.io.File theFile)
          Removes the specified file or directory, and all subdirectories
static java.io.File getWebXML(java.io.File theWebFilesDir)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

WEBINF

public static final java.lang.String WEBINF
Name of the WEB-INF directory

See Also:
Constant Field Values

LIB

public static final java.lang.String LIB
Name of the lib directory

See Also:
Constant Field Values

WEBXML

public static final java.lang.String WEBXML
Name of the web.xml file

See Also:
Constant Field Values
Constructor Detail

WarBuilder

public WarBuilder(org.eclipse.jdt.core.IJavaProject theJavaProject)
           throws org.eclipse.jdt.core.JavaModelException
Parameters:
theJavaProject - the Java project for which the webapp will be created
Throws:
org.eclipse.jdt.core.JavaModelException - if we can't get the output location
Method Detail

getWebXML

public static java.io.File getWebXML(java.io.File theWebFilesDir)
Parameters:
theWebFilesDir - webapp directory to get the web.xml from
Returns:
the web.xml file in the given webapp directory, or null if none

createWar

public final java.io.File createWar(org.eclipse.core.runtime.IProgressMonitor thePM)
                             throws org.eclipse.core.runtime.CoreException
Creates the war file.

Parameters:
thePM - a monitor that reflects the overall progress, or null if none is to be used.
Returns:
File the location where the war file was created
Throws:
org.eclipse.core.runtime.CoreException - if we can't create the file

delete

public static final void delete(java.io.File theFile)
Removes the specified file or directory, and all subdirectories

Parameters:
theFile - the file or directory to delete


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.