@Mojo(name="run-distro",
requiresDependencyResolution=TEST)
@Execute(phase=TEST_COMPILE)
public class JettyRunDistro
extends JettyRunMojo
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
JETTY_HOME_ARTIFACTID |
static java.lang.String |
JETTY_HOME_GROUPID |
protected org.apache.maven.plugin.descriptor.PluginDescriptor |
plugin
This plugin
|
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, pluginArtifacts, project, projectArtifacts, reload, requestLog, scanIntervalSeconds, scanner, server, serverSupport, skip, stopKey, stopPort, supportedPackagings, systemProperties, systemPropertiesFile, useProvidedScope, webApp| Constructor and Description |
|---|
JettyRunDistro() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.ProcessBuilder |
configureCommand()
Make the command to spawn a process to
run jetty from a distro.
|
void |
configureJettyBase()
Create or configure a jetty base.
|
void |
configureJettyHome()
If jetty home does not exist, download it and
unpack to build dir.
|
void |
configureScanner() |
void |
createPropertiesFile(java.io.File file)
Convert webapp config to properties
|
void |
execute() |
org.apache.maven.artifact.Artifact |
resolveArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.lang.String extension)
Resolve an Artifact from remote repo if necessary.
|
void |
restartWebApp(boolean reconfigureScanner) |
void |
startJetty() |
void |
startScanner()
Run a scanner thread on the given list of files and directories, calling
stop/start on the given list of LifeCycle objects if any of the watched
files change.
|
void |
stopScanner() |
checkPomConfiguration, configureWebApplication, fileSeparators, finishConfigurationBeforeStart, gatherScannables, getArtifactForOverlay, getJavaBin, getProjectReference, unpackOverlay, unpackOverlaysapplyJettyXml, checkPackagingConfiguration, configureMonitor, configurePluginClasspath, findJettyWebXmlFile, getJettyXmlFiles, getSkipMessage, isConfigurationSupported, isExcluded, isPluginArtifact, isScanningEnabled, printSystemProperties, setSystemProperties, setSystemPropertiesFile, startConsoleScannerpublic static final java.lang.String JETTY_HOME_GROUPID
public static final java.lang.String JETTY_HOME_ARTIFACTID
@Parameter(defaultValue="${plugin}",
required=true,
readonly=true)
protected org.apache.maven.plugin.descriptor.PluginDescriptor plugin
@Parameter(defaultValue="${project.build.directory}",
readonly=true,
required=true)
protected java.io.File target
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.MojoFailureExceptionJettyRunMojo.execute()public void startJetty()
throws org.apache.maven.plugin.MojoExecutionException
startJetty in class AbstractJettyMojoorg.apache.maven.plugin.MojoExecutionExceptionAbstractJettyMojo.startJetty()public void configureJettyHome()
throws java.lang.Exception
java.lang.Exception - if jetty distribution cannot be found neither downloadedpublic org.apache.maven.artifact.Artifact resolveArtifact(java.lang.String groupId,
java.lang.String artifactId,
java.lang.String version,
java.lang.String extension)
throws org.apache.maven.shared.artifact.resolve.ArtifactResolverException
groupId - the groupid of the artifactartifactId - the artifactId of the artifactversion - the version of the artifactextension - the extension type of the artifact eg "zip", "jar"org.apache.maven.shared.artifact.resolve.ArtifactResolverException - in case of an error while resolving the artifactpublic void configureJettyBase()
throws java.lang.Exception
java.lang.Exception - if any error occurred while copying filespublic void createPropertiesFile(java.io.File file)
throws java.lang.Exception
file - the file to place the properties intojava.lang.Exception - if any I/O exception during generating the properties filepublic java.lang.ProcessBuilder configureCommand()
public void startScanner()
throws java.lang.Exception
AbstractJettyMojostartScanner in class AbstractJettyMojojava.lang.Exception - if unable to start scannerAbstractJettyMojo.startScanner()public void stopScanner()
throws java.lang.Exception
stopScanner in class AbstractJettyMojojava.lang.ExceptionAbstractJettyMojo.stopScanner()public void restartWebApp(boolean reconfigureScanner)
throws java.lang.Exception
restartWebApp in class JettyRunMojojava.lang.ExceptionAbstractJettyMojo.restartWebApp(boolean)public void configureScanner()
throws org.apache.maven.plugin.MojoExecutionException
configureScanner in class JettyRunMojoorg.apache.maven.plugin.MojoExecutionExceptionAbstractJettyMojo.configureScanner()Copyright © 1995–2022 Webtide. All rights reserved.