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
Modifier and TypeFieldDescriptionprotected JettyEmbedder
protected JettyForker
protected JettyHomeForker
protected File
Fields 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, webApp
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Ensure there is a webapp, and that some basic defaults are applied if the user has not supplied them.void
Start a jetty instance in process to run given war.void
Fork a jetty instance to run the given war.void
Fork a jetty distro to run the given war.protected void
Used 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, startJetty
Methods 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:AbstractWebAppMojo
Ensure there is a webapp, and that some basic defaults are applied if the user has not supplied them.- Overrides:
configureWebApp
in classAbstractWebAppMojo
- Throws:
Exception
-
startJettyEmbedded
public void startJettyEmbedded() throws org.apache.maven.plugin.MojoExecutionExceptionStart a jetty instance in process to run given war.- Specified by:
startJettyEmbedded
in 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:
startJettyForked
in 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:
startJettyHome
in classAbstractWebAppMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
verifyPomConfiguration
protected void verifyPomConfiguration() throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from class:AbstractWebAppMojo
Used by subclasses.- Overrides:
verifyPomConfiguration
in classAbstractWebAppMojo
- Throws:
org.apache.maven.plugin.MojoExecutionException
-