@Mojo(name="stage", requiresDependencyResolution=TEST) public class SiteStageMojo extends AbstractStagingMojo
<distributionManagement>
section of the
POM.
It can be used to test that links between module sites in a multi-module build work.
This goal requires the site to already have been generated using the site goal,
such as by calling mvn site
.
Modifier and Type | Field and Description |
---|---|
private java.io.File |
stagingDirectory
Staging directory location.
|
DEFAULT_STAGING_DIRECTORY, topSiteURL
mavenSession
i18n, localRepository, project, reactorProjects, siteTool, skip
Constructor and Description |
---|
SiteStageMojo() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.maven.model.Site |
determineDeploySite() |
private java.io.File |
determineStagingDirectory()
Find the directory where staging will take place.
|
void |
execute() |
protected java.io.File |
getExecutionRootBuildDirectory()
Find the build directory of the execution root project in the reactor.
|
private static org.apache.maven.project.MavenProject |
getExecutionRootProject(java.util.List<org.apache.maven.project.MavenProject> reactorProjects)
Find the execution root in the reactor.
|
protected boolean |
isDeploy()
Detect if the mojo is staging or deploying.
|
determineTopDistributionManagementSiteUrl
appendSlash, contextualize, getDeployModuleDirectory, getDeploySite, getProxyInfo, getSite, getTopDistributionManagementSiteUrl, getTopLevelProject
getLocales, getMavenVersion, isMaven3OrMore
@Parameter(property="stagingDirectory") private java.io.File stagingDirectory
C:\stagingArea\myProject\
on Windows or
/stagingArea/myProject/
on Unix.
If this is not specified, the site will be staged in ${project.build.directory}/staging.public void execute() throws org.apache.maven.plugin.MojoExecutionException
AbstractDeployMojo
execute
in interface org.apache.maven.plugin.Mojo
execute
in class AbstractDeployMojo
org.apache.maven.plugin.MojoExecutionException
protected boolean isDeploy()
AbstractDeployMojo
isDeploy
in class AbstractDeployMojo
true
if the mojo is for deploy and not staging (local or deploy)protected org.apache.maven.model.Site determineDeploySite() throws org.apache.maven.plugin.MojoExecutionException
determineDeploySite
in class AbstractDeployMojo
org.apache.maven.plugin.MojoExecutionException
private java.io.File determineStagingDirectory()
protected java.io.File getExecutionRootBuildDirectory()
private static org.apache.maven.project.MavenProject getExecutionRootProject(java.util.List<org.apache.maven.project.MavenProject> reactorProjects)
reactorProjects
- The projects in the reactor. May be null
in which case null
is
returned.null
if none can be found