Class JettyRunForkedMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.jetty.maven.plugin.AbstractJettyMojo
-
- org.eclipse.jetty.maven.plugin.JettyRunMojo
-
- org.eclipse.jetty.maven.plugin.JettyRunForkedMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="run-forked", requiresDependencyResolution=TEST) @Execute(phase=TEST_COMPILE) public class JettyRunForkedMojo extends JettyRunMojoThis 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.
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 https://jetty.org/docs/ for more information on this and other jetty plugins. Runs Jetty in forked JVM on an unassembled webapp
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classJettyRunForkedMojo.ShutdownThreadShutdownThread
-
Field Summary
Fields Modifier and Type Field Description protected java.io.FileforkWebXmlThe file into which to generate the quickstart web xml for the forked process to useprotected java.io.FiletargetThe target directory-
Fields inherited from class org.eclipse.jetty.maven.plugin.JettyRunMojo
classesDirectory, DEFAULT_WEBAPP_SRC, FAKE_WEBAPP, originalBaseResource, scanClassesPattern, scanTargetPatterns, scanTargets, scanTestClassesPattern, testClassesDirectory, useTestScope, warArtifacts, warPluginInfo, webAppSourceDirectory, webXml
-
Fields inherited from class org.eclipse.jetty.maven.plugin.AbstractJettyMojo
consoleScanner, 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 Summary
Constructors Constructor Description JettyRunForkedMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()java.lang.StringgetContainerClassPath()java.util.List<java.lang.String>getProvidedJars()booleanisPluginArtifact(org.apache.maven.artifact.Artifact artifact)static java.lang.StringpathSeparators(java.lang.String path)java.io.FileprepareConfiguration()voidstartJetty()-
Methods inherited from class org.eclipse.jetty.maven.plugin.JettyRunMojo
checkPomConfiguration, configureScanner, configureWebApplication, fileSeparators, finishConfigurationBeforeStart, gatherScannables, getArtifactForOverlay, getJavaBin, restartWebApp, unpackOverlay, unpackOverlays
-
Methods inherited from class org.eclipse.jetty.maven.plugin.AbstractJettyMojo
applyJettyXml, checkPackagingConfiguration, configureMonitor, configurePluginClasspath, findJettyWebXmlFile, getJettyXmlFiles, getSkipMessage, isConfigurationSupported, isExcluded, isScanningEnabled, printSystemProperties, setSystemProperties, setSystemPropertiesFile, startConsoleScanner, startScanner, stopScanner
-
-
-
-
Field Detail
-
target
@Parameter(defaultValue="${project.build.directory}", readonly=true, required=true) protected java.io.File targetThe target directory
-
forkWebXml
@Parameter(defaultValue="${project.build.directory}/fork-web.xml") protected java.io.File forkWebXmlThe file into which to generate the quickstart web xml for the forked process to use
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Overrides:
executein classJettyRunMojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException- See Also:
Mojo.execute()
-
startJetty
public void startJetty() throws org.apache.maven.plugin.MojoExecutionException- Overrides:
startJettyin classAbstractJettyMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getProvidedJars
public java.util.List<java.lang.String> getProvidedJars() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
prepareConfiguration
public java.io.File prepareConfiguration() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
isPluginArtifact
public boolean isPluginArtifact(org.apache.maven.artifact.Artifact artifact)
- Overrides:
isPluginArtifactin classAbstractJettyMojo
-
getContainerClassPath
public java.lang.String getContainerClassPath() throws java.lang.Exception- Throws:
java.lang.Exception
-
pathSeparators
public static java.lang.String pathSeparators(java.lang.String path)
-
-