public class JettyRunForkedMojo
extends org.apache.maven.plugin.AbstractMojo
This goal is used to assemble your webapp into a war and automatically deploy it to Jetty in a forked JVM.
You need to define a jetty.xml file to configure connectors etc and a context xml file that sets up anything special about your webapp. This plugin will fill in the:
There is a reference guide to the configuration parameters for this plugin, and more detailed information with examples in the Configuration Guide.
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 |
String |
PORT_SYSPROPERTY |
protected String |
stopKey
Key to provide when stopping jetty on executing java -DSTOP.KEY=<stopKey>
-DSTOP.PORT=<stopPort> -jar start.jar --stop
|
protected int |
stopPort
Port to listen to stop jetty on executing -DSTOP.PORT=<stopPort>
-DSTOP.KEY=<stopKey> -jar start.jar --stop
|
protected File |
target
The target directory
|
protected File |
tempDirectory
The temporary directory to use for the webapp.
|
protected boolean |
useProvidedScope
Whether or not to include dependencies on the plugin's classpath with <scope>provided</scope>
Use WITH CAUTION as you may wind up with duplicate jars/classes.
|
Constructor and Description |
---|
JettyRunForkedMojo() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
static String |
fileSeparators(String path) |
String |
getClassPath() |
List<String> |
getProvidedJars() |
boolean |
isPluginArtifact(org.apache.maven.artifact.Artifact artifact) |
static String |
pathSeparators(String path) |
File |
prepareConfiguration() |
void |
startJettyRunner() |
public static final String DEFAULT_WEBAPP_SRC
public static final String FAKE_WEBAPP
public String PORT_SYSPROPERTY
protected boolean useProvidedScope
protected File target
protected File tempDirectory
protected int stopPort
protected String stopKey
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
Mojo.execute()
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)
artifact
- public void startJettyRunner() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
Copyright © 1995-2014 Mort Bay Consulting. All Rights Reserved.