@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, webXml
consoleScanner, 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, unpackOverlays
applyJettyXml, checkPackagingConfiguration, configureMonitor, configurePluginClasspath, findJettyWebXmlFile, getJettyXmlFiles, getSkipMessage, isConfigurationSupported, isExcluded, isPluginArtifact, isScanningEnabled, printSystemProperties, setSystemProperties, setSystemPropertiesFile, startConsoleScanner
public 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.Mojo
execute
in class JettyRunMojo
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
JettyRunMojo.execute()
public void startJetty() throws org.apache.maven.plugin.MojoExecutionException
startJetty
in class AbstractJettyMojo
org.apache.maven.plugin.MojoExecutionException
AbstractJettyMojo.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
AbstractJettyMojo
startScanner
in class AbstractJettyMojo
java.lang.Exception
- if unable to start scannerAbstractJettyMojo.startScanner()
public void stopScanner() throws java.lang.Exception
stopScanner
in class AbstractJettyMojo
java.lang.Exception
AbstractJettyMojo.stopScanner()
public void restartWebApp(boolean reconfigureScanner) throws java.lang.Exception
restartWebApp
in class JettyRunMojo
java.lang.Exception
AbstractJettyMojo.restartWebApp(boolean)
public void configureScanner() throws org.apache.maven.plugin.MojoExecutionException
configureScanner
in class JettyRunMojo
org.apache.maven.plugin.MojoExecutionException
AbstractJettyMojo.configureScanner()
Copyright © 1995–2023 Webtide. All rights reserved.