@Mojo(name="run-forked",
requiresDependencyResolution=TEST)
@Execute(phase=TEST_COMPILE)
public class JettyRunForkedMojo
extends JettyRunMojo
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.
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. Runs Jetty in forked JVM on an unassembled webapp
| Modifier and Type | Class and Description |
|---|---|
class |
JettyRunForkedMojo.ShutdownThread
ShutdownThread
|
| Modifier and Type | Field and Description |
|---|---|
protected java.io.File |
forkWebXml
The file into which to generate the quickstart web xml for the forked process to use
|
protected java.io.File |
target
The target directory
|
classesDirectory, DEFAULT_WEBAPP_SRC, FAKE_WEBAPP, originalBaseResource, scanClassesPattern, scanTargetPatterns, scanTargets, scanTestClassesPattern, testClassesDirectory, useTestScope, warArtifacts, warPluginInfo, webAppSourceDirectory, webXmlconsoleScanner, contextHandlers, contextXml, dumpOnStart, excludedGoals, execution, httpConnector, jettyXml, loginServices, nonBlocking, project, projectArtifacts, reload, requestLog, scanIntervalSeconds, scanner, server, serverSupport, skip, stopKey, stopPort, supportedPackagings, systemProperties, systemPropertiesFile, useProvidedScope, webApp| Constructor and Description |
|---|
JettyRunForkedMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute() |
java.lang.String |
getContainerClassPath() |
java.util.List<java.lang.String> |
getProvidedJars() |
boolean |
isPluginArtifact(org.apache.maven.artifact.Artifact artifact) |
static java.lang.String |
pathSeparators(java.lang.String path) |
java.io.File |
prepareConfiguration() |
void |
startJetty() |
checkPomConfiguration, configureScanner, configureWebApplication, fileSeparators, finishConfigurationBeforeStart, gatherScannables, getArtifactForOverlay, getJavaBin, getProjectReference, restartWebApp, unpackOverlay, unpackOverlaysapplyJettyXml, checkPackagingConfiguration, configureMonitor, configurePluginClasspath, findJettyWebXmlFile, getJettyXmlFiles, getSkipMessage, isConfigurationSupported, isExcluded, isScanningEnabled, printSystemProperties, setSystemProperties, setSystemPropertiesFile, startConsoleScanner, startScanner, stopScanner@Parameter(defaultValue="${project.build.directory}",
readonly=true,
required=true)
protected java.io.File target
@Parameter(defaultValue="${project.build.directory}/fork-web.xml")
protected java.io.File forkWebXml
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
execute in interface org.apache.maven.plugin.Mojoexecute in class JettyRunMojoorg.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionMojo.execute()public void startJetty()
throws org.apache.maven.plugin.MojoExecutionException
startJetty in class AbstractJettyMojoorg.apache.maven.plugin.MojoExecutionExceptionpublic java.util.List<java.lang.String> getProvidedJars()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic java.io.File prepareConfiguration()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionpublic boolean isPluginArtifact(org.apache.maven.artifact.Artifact artifact)
isPluginArtifact in class AbstractJettyMojopublic java.lang.String getContainerClassPath()
throws java.lang.Exception
java.lang.Exceptionpublic static java.lang.String pathSeparators(java.lang.String path)
Copyright © 1995–2023 Webtide. All rights reserved.