public class JettyRunForkedMojo extends JettyRunMojo
This goal is used to deploy your unassembled webapp into a forked JVM.
You need to define a jetty.xml file to configure connectors etc. You can use the normal setters of o.e.j.webapp.WebAppContext on the webApp configuration element for this plugin. You may also need context xml file for any particularly complex webapp setup. about your webapp.
Unlike the other jetty goals, this does NOT support the scanIntervalSeconds parameter: the webapp will be deployed only once.
The stopKey, stopPort configuration elements can be used to control the stopping of the forked process. By default, this plugin will launch the forked jetty instance and wait for it to complete (in which case it acts much like the jetty:run goal, and you will need to Cntrl-C to stop). By setting the configuration element waitForChild to false, the plugin will terminate after having forked the jetty process. In this case you can use the jetty:stop goal to terminate the process.
See http://www.eclipse.org/jetty/documentation for more information on this and other jetty plugins.
Modifier and Type | Class and Description |
---|---|
class |
JettyRunForkedMojo.ShutdownThread
ShutdownThread
|
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_WEBAPP_SRC |
static String |
FAKE_WEBAPP |
protected File |
forkWebXml
The file into which to generate the quickstart web xml for the forked process to use
|
String |
PORT_SYSPROPERTY |
protected File |
target
The target directory
|
classesDirectory, extraScanTargets, scanTargetPatterns, scanTargets, testClassesDirectory, useTestScope, warArtifacts, warPluginInfo, webAppSourceDirectory, webXml
consoleScanner, contextHandlers, contextXml, dumpOnStart, excludedGoals, execution, httpConnector, jettyXml, loginServices, nonblocking, project, projectArtifacts, reload, requestLog, scanIntervalSeconds, scanList, scanner, scannerListeners, server, skip, stopKey, stopPort, systemProperties, systemPropertiesFile, useProvidedScope, webApp
Constructor and Description |
---|
JettyRunForkedMojo() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
static String |
fileSeparators(String path) |
String |
getContainerClassPath() |
List<String> |
getProvidedJars() |
boolean |
isPluginArtifact(org.apache.maven.artifact.Artifact artifact) |
static String |
pathSeparators(String path) |
File |
prepareConfiguration() |
void |
startJetty() |
checkPomConfiguration, configureScanner, configureWebApplication, finishConfigurationBeforeStart, getArtifactForOverlay, restartWebApp
applyJettyXml, configureMonitor, configurePluginClasspath, findJettyWebXmlFile, getJettyXmlFiles, isExcluded, printSystemProperties, setSystemProperties, setSystemPropertiesFile, startConsoleScanner
public static final String DEFAULT_WEBAPP_SRC
public static final String FAKE_WEBAPP
public String PORT_SYSPROPERTY
protected File target
protected File forkWebXml
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
execute
in interface org.apache.maven.plugin.Mojo
execute
in class JettyRunMojo
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
Mojo.execute()
public void startJetty() throws org.apache.maven.plugin.MojoExecutionException
startJetty
in class AbstractJettyMojo
org.apache.maven.plugin.MojoExecutionException
public List<String> getProvidedJars() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public File prepareConfiguration() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public boolean isPluginArtifact(org.apache.maven.artifact.Artifact artifact)
isPluginArtifact
in class AbstractJettyMojo
artifact
- public String getContainerClassPath() throws Exception
Exception
Copyright © 1995-2015 Webtide. All Rights Reserved.