Class JettyRunTask
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.eclipse.jetty.ant.JettyRunTask
- All Implemented Interfaces:
Cloneable
public class JettyRunTask
extends org.apache.tools.ant.Task
Ant task for running a Jetty server.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConnectorsList of server connectors.private ContextHandlersList of other contexts to deployprivate booleanprivate intPort Jetty will use for the default connectorprivate FileLocation of jetty.xml file.private LoginServicesList of login services.private RequestLogServer request logger object.private intprivate Stringprivate intprivate SystemPropertiesList of system properties to be set.private FileTemporary files directory.private List<AntWebAppContext> List of web applications to be deployed.Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapperFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddConnectors(Connectors connectors) Adds a new Ant's connector tag object if it have not been created yet.voidaddContextHandlers(ContextHandlers handlers) voidaddLoginServices(LoginServices services) voidaddSystemProperties(SystemProperties systemProperties) voidaddWebApp(AntWebAppContext webapp) Creates a newWebAppAnt object.voidexecute()Executes this Ant task.intintbooleanisDaemon()voidsetDaemon(boolean daemon) voidsetJettyPort(int jettyPort) Sets the port Jetty uses for the default connector.voidsetJettyXml(File jettyXml) voidsetRequestLog(String className) voidsetScanIntervalSeconds(int secs) voidsetStopKey(String stopKey) voidsetStopPort(int stopPort) private voidSets the system properties.voidsetTempDirectory(File tempDirectory) Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
-
Field Details
-
scanIntervalSeconds
private int scanIntervalSeconds -
tempDirectory
Temporary files directory. -
webapps
List of web applications to be deployed. -
jettyXml
Location of jetty.xml file. -
connectors
List of server connectors. -
requestLog
Server request logger object. -
loginServices
List of login services. -
systemProperties
List of system properties to be set. -
contextHandlers
List of other contexts to deploy -
jettyPort
private int jettyPortPort Jetty will use for the default connector -
stopPort
private int stopPort -
stopKey
-
daemon
private boolean daemon
-
-
Constructor Details
-
JettyRunTask
public JettyRunTask()
-
-
Method Details
-
addWebApp
Creates a newWebAppAnt object.- Parameters:
webapp- the webapp context
-
addConnectors
Adds a new Ant's connector tag object if it have not been created yet.- Parameters:
connectors- the connectors
-
addLoginServices
-
addSystemProperties
-
addContextHandlers
-
getTempDirectory
-
setTempDirectory
-
getJettyXml
-
setJettyXml
-
setRequestLog
-
getRequestLog
-
setJettyPort
public void setJettyPort(int jettyPort) Sets the port Jetty uses for the default connector.- Parameters:
jettyPort- The port Jetty will use for the default connector
-
execute
public void execute() throws org.apache.tools.ant.BuildExceptionExecutes this Ant task. The build flow is being stopped until Jetty server stops.- Overrides:
executein classorg.apache.tools.ant.Task- Throws:
org.apache.tools.ant.BuildException- if unable to build
-
getStopPort
public int getStopPort() -
setStopPort
public void setStopPort(int stopPort) -
getStopKey
-
setStopKey
-
isDaemon
public boolean isDaemon()- Returns:
- the daemon
-
setDaemon
public void setDaemon(boolean daemon) - Parameters:
daemon- the daemon to set
-
getScanIntervalSeconds
public int getScanIntervalSeconds() -
setScanIntervalSeconds
public void setScanIntervalSeconds(int secs) -
setSystemProperties
private void setSystemProperties()Sets the system properties.
-