Package org.eclipse.jetty.maven.plugin
Class JettyRunWarMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.eclipse.jetty.maven.plugin.AbstractWebAppMojo
org.eclipse.jetty.maven.plugin.JettyRunWarMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="run-war",
requiresDependencyResolution=COMPILE_PLUS_RUNTIME)
@Execute(phase=PACKAGE)
public class JettyRunWarMojo
extends AbstractWebAppMojo
This goal is used to assemble your webapp into a war and automatically deploy it to Jetty.
Once invoked, the plugin runs continuously and can be configured to scan for changes in the project and to the war file and automatically perform a hot redeploy when necessary.
You may also specify the location of a jetty.xml file whose contents will be applied before any plugin configuration.
You can configure this goal to run your webapp either in-process with maven, or forked into a new process, or deployed into a jetty distribution.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.jetty.maven.plugin.AbstractWebAppMojo
AbstractWebAppMojo.DeploymentMode -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected JettyEmbedderprotected JettyForkerprotected JettyHomeForkerprotected intThe interval in seconds to pause before checking if changes have occurred and re-deploying as necessary.protected ScannerScanner to check for files changes to cause redeployprotected PathFields inherited from class org.eclipse.jetty.maven.plugin.AbstractWebAppMojo
contextHandlers, contextXml, deployMode, env, excludedGoals, execution, FAKE_WEBAPP, forkWebXml, httpConnector, JETTY_HOME_ARTIFACTID, JETTY_HOME_GROUPID, jettyBase, jettyHome, jettyOptions, jettyProperties, jettyXmls, jvmArgs, loginServices, mavenProjectHelper, maxChildStartCheckMs, maxChildStartChecks, mergedSystemProperties, modules, originalBaseResource, plugin, pluginArtifacts, project, projectArtifacts, providedJars, reactorProjects, requestLog, scanTargetPatterns, server, skip, stopKey, stopPort, supportedPackagings, systemProperties, systemPropertiesFile, target, useProvidedScope, useTestScope, warArtifacts, webAppFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidEnsure there is a webapp, and that some basic defaults are applied if the user has not supplied them.voidrestartWebApp(boolean reconfigure) voidStart a jetty instance in process to run the built war.voidFork a jetty instance to run the built war.voidDeploy the built war to a jetty distro.voidMethods inherited from class org.eclipse.jetty.maven.plugin.AbstractWebAppMojo
augmentPluginClasspath, configureScanTargetPatterns, configureSystemProperties, execute, findJettyWebXmlFile, getContainerClassPath, getJettyOutputFile, getProjectName, getProvidedJars, isExcludedGoal, isPackagingSupported, isPluginArtifact, mergeSystemProperties, newJettyEmbedder, newJettyForker, newJettyHomeForker, startJetty, verifyPomConfigurationMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
scan
@Parameter(defaultValue="0", property="jetty.scan", required=true) protected int scanThe interval in seconds to pause before checking if changes have occurred and re-deploying as necessary. A value of 0 indicates no re-deployment will be done. In that case, you can force redeployment by typing a linefeed character at the command line. -
scanner
Scanner to check for files changes to cause redeploy -
embedder
-
forker
-
homeForker
-
war
-
-
Constructor Details
-
JettyRunWarMojo
public JettyRunWarMojo()
-
-
Method Details
-
configureWebApp
Description copied from class:AbstractWebAppMojoEnsure there is a webapp, and that some basic defaults are applied if the user has not supplied them.- Overrides:
configureWebAppin classAbstractWebAppMojo- Throws:
Exception
-
startJettyEmbedded
public void startJettyEmbedded() throws org.apache.maven.plugin.MojoExecutionExceptionStart a jetty instance in process to run the built war.- Specified by:
startJettyEmbeddedin classAbstractWebAppMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
startJettyForked
public void startJettyForked() throws org.apache.maven.plugin.MojoExecutionExceptionFork a jetty instance to run the built war.- Specified by:
startJettyForkedin classAbstractWebAppMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
startJettyHome
public void startJettyHome() throws org.apache.maven.plugin.MojoExecutionExceptionDeploy the built war to a jetty distro.- Specified by:
startJettyHomein classAbstractWebAppMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
startScanner
- Throws:
Exception
-
configureScanner
public void configureScanner() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
restartWebApp
- Throws:
Exception
-