@Mojo(name="run") @Execute(phase=COMPILE) public class RunMojo extends AbstractJettyMojo
This only needs the source files to be compiled, so run in the compile phase.
To specify the HTTP port, use -Djetty.port=PORT
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.maven.artifact.factory.ArtifactFactory |
artifactFactory |
protected org.apache.maven.artifact.metadata.ArtifactMetadataSource |
artifactMetadataSource |
protected org.apache.maven.artifact.resolver.ArtifactResolver |
artifactResolver |
protected boolean |
consoleForceReload
If true, the context will be restarted after a line feed on
the input console.
|
protected String |
contextPath
Deprecated.
Use <webApp><contextPath> instead.
|
protected int |
defaultPort
Specifies the HTTP port number.
|
protected String |
dependencyResolution
Decides the level of dependency resolution.
|
protected String |
jenkinsCoreId
Optional string that represents "groupId:artifactId" of Jenkins core jar.
|
protected String |
jenkinsWarId
Optional string that represents "groupId:artifactId" of Jenkins war.
|
protected org.apache.maven.artifact.repository.ArtifactRepository |
localRepository |
protected String |
maskClasses
[ws|tab|CR|LF]+ separated list of package prefixes that your plugin doesn't want to see
from the core.
|
protected boolean |
pluginFirstClassLoader |
protected org.apache.maven.project.MavenProjectBuilder |
projectBuilder |
protected List<org.apache.maven.artifact.repository.ArtifactRepository> |
remoteRepos |
protected File |
warSourceDirectory
Single directory for extra files to include in the WAR.
|
consoleScanner, contextHandlers, contextXml, dumpOnStart, excludedGoals, execution, httpConnector, jettyXml, loginServices, nonblocking, pluginArtifacts, PORT_SYSPROPERTY, project, projectArtifacts, reload, requestLog, scanIntervalSeconds, scanList, scanner, scannerListeners, server, skip, stopKey, stopPort, systemPropertiesFile, useProvidedScope, webApp| Constructor and Description |
|---|
RunMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkPomConfiguration() |
void |
configureScanner() |
void |
configureWebApplication()
Subclasses should invoke this to setup basic info
on the webapp
|
void |
execute() |
void |
finishConfigurationBeforeStart() |
protected org.apache.maven.artifact.Artifact |
getJenkinsWarArtifact() |
protected org.apache.maven.project.MavenProject |
getProject() |
Set<MavenArtifact> |
getProjectArtifacts() |
org.eclipse.jetty.webapp.WebAppContext |
getWebAppConfig() |
protected Set<org.apache.maven.artifact.Artifact> |
resolveDependencies(String scope)
Performs the equivalent of "@requireDependencyResolution" mojo attribute,
so that we can choose the scope at runtime.
|
void |
restartWebApp(boolean reconfigureScanner) |
protected void |
startConsoleScanner()
Run a thread that monitors the console input to detect ENTER hits.
|
void |
startJetty() |
protected MavenArtifact |
wrap(org.apache.maven.artifact.Artifact a) |
applyJettyXml, configureMonitor, configurePluginClasspath, findJettyWebXmlFile, getJettyXmlFiles, isExcluded, isPluginArtifact, printSystemProperties, setSystemProperties, setSystemPropertiesFile@Parameter(defaultValue="test") protected String dependencyResolution
@Parameter(defaultValue="${basedir}/src/main/webapp")
protected File warSourceDirectory
@Component protected org.apache.maven.artifact.resolver.ArtifactResolver artifactResolver
@Component protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
@Parameter(defaultValue="${project.remoteArtifactRepositories}",
readonly=true,
required=true)
protected List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepos
@Parameter(defaultValue="${localRepository}")
protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
@Component protected org.apache.maven.artifact.metadata.ArtifactMetadataSource artifactMetadataSource
@Parameter(property="port") protected int defaultPort
@Parameter(property="jetty.consoleForceReload",
defaultValue="true")
protected boolean consoleForceReload
@Component protected org.apache.maven.project.MavenProjectBuilder projectBuilder
@Parameter protected String jenkinsCoreId
@Parameter protected String jenkinsWarId
@Parameter protected String maskClasses
Tokens in this list is prefix-matched against the fully-qualified class name, so add "." to the end of each package name, like "com.foo. com.bar."
@Parameter protected boolean pluginFirstClassLoader
@Parameter(readonly=true,
required=true,
defaultValue="/${project.artifactId}")
protected String contextPath
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
execute in interface org.apache.maven.plugin.Mojoexecute in class AbstractJettyMojoorg.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionMojo.execute()public void configureWebApplication()
throws Exception
AbstractJettyMojoconfigureWebApplication in class AbstractJettyMojoorg.apache.maven.plugin.MojoExecutionExceptionExceptionpublic void configureScanner()
throws org.apache.maven.plugin.MojoExecutionException
configureScanner in class AbstractJettyMojoorg.apache.maven.plugin.MojoExecutionExceptionpublic void restartWebApp(boolean reconfigureScanner)
throws Exception
restartWebApp in class AbstractJettyMojoExceptionprotected void startConsoleScanner()
throws Exception
AbstractJettyMojostartConsoleScanner in class AbstractJettyMojoExceptionpublic void checkPomConfiguration()
throws org.apache.maven.plugin.MojoExecutionException
checkPomConfiguration in class AbstractJettyMojoorg.apache.maven.plugin.MojoExecutionExceptionpublic void finishConfigurationBeforeStart()
throws Exception
finishConfigurationBeforeStart in class AbstractJettyMojoExceptionpublic void startJetty()
throws org.apache.maven.plugin.MojoExecutionException
startJetty in class AbstractJettyMojoorg.apache.maven.plugin.MojoExecutionExceptionprotected Set<org.apache.maven.artifact.Artifact> resolveDependencies(String scope) throws org.apache.maven.plugin.MojoExecutionException
scope - org.apache.maven.plugin.MojoExecutionExceptionpublic Set<MavenArtifact> getProjectArtifacts()
protected MavenArtifact wrap(org.apache.maven.artifact.Artifact a)
protected org.apache.maven.artifact.Artifact getJenkinsWarArtifact()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected org.apache.maven.project.MavenProject getProject()
public org.eclipse.jetty.webapp.WebAppContext getWebAppConfig()
Copyright © 2004-2016. All Rights Reserved.