Class JettyStartWarMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
This goal is used to run Jetty with any pre-assembled war. This goal does not have to be used with a project of packaging type "war".
You can configure the "webApp" element with the location of either a war file or an unpacked war that you wish to deploy - in either case, the webapp must be fully compiled and assembled as this goal does not do anything other than start jetty with the given webapp. If you do not configure the "webApp" element, then the goal will default to using the war of the webapp project.
This goal is designed to be bound to a build phase, and NOT to be run at the command line. It will not block waiting for jetty to execute, but rather continue execution.
This goal is useful e.g. for launching a web app in Jetty as a target for unit-tested HTTP client components via binding to the test-integration build phase.
You can configure this goal to run the webapp either in-process with maven, or
forked into a new process, or deployed into a ${jetty.base} directory.
-
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 FileFields 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 TypeMethodDescriptionvoidEnsure there is a webapp, and that some basic defaults are applied if the user has not supplied them.voidStart a jetty instance in process to run given war.voidFork a jetty instance to run the given war.voidFork a jetty distro to run the given war.protected voidUsed by subclasses.Methods 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, startJettyMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
webAppSourceDirectory
-
embedder
-
forker
-
homeForker
-
-
Constructor Details
-
JettyStartWarMojo
public JettyStartWarMojo()
-
-
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 given 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 given war.- Specified by:
startJettyForkedin classAbstractWebAppMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
startJettyHome
public void startJettyHome() throws org.apache.maven.plugin.MojoExecutionExceptionFork a jetty distro to run the given war.- Specified by:
startJettyHomein classAbstractWebAppMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
verifyPomConfiguration
protected void verifyPomConfiguration() throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from class:AbstractWebAppMojoUsed by subclasses.- Overrides:
verifyPomConfigurationin classAbstractWebAppMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-