Class SiteStageMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.site.AbstractSiteMojo
org.apache.maven.plugins.site.deploy.AbstractDeployMojo
org.apache.maven.plugins.site.deploy.AbstractStagingMojo
org.apache.maven.plugins.site.deploy.SiteStageMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="stage",
requiresDependencyResolution=TEST)
public class SiteStageMojo
extends AbstractStagingMojo
Deploys the generated site to a local staging or mock directory based on the site URL
specified in the
<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.
- Since:
- 2.0
-
Field Summary
FieldsFields inherited from class org.apache.maven.plugins.site.deploy.AbstractStagingMojo
DEFAULT_STAGING_DIRECTORY, topSiteURLFields inherited from class org.apache.maven.plugins.site.deploy.AbstractDeployMojo
mavenSession, settingsDecrypterFields inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
i18n, project, siteTool, skipFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.apache.maven.model.Siteprivate FileFind the directory where staging will take place.voidexecute()protected FileFind the build directory of the execution root project in the reactor.protected booleanisDeploy()Detect if the mojo is staging or deploying.Methods inherited from class org.apache.maven.plugins.site.deploy.AbstractStagingMojo
determineTopDistributionManagementSiteUrlMethods inherited from class org.apache.maven.plugins.site.deploy.AbstractDeployMojo
appendSlash, getAuthenticationInfo, getDeployModuleDirectory, getDeploySite, getSite, getTopDistributionManagementSiteUrl, getTopLevelProjectMethods inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
getLocalesMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
stagingDirectory
Staging directory location. This needs to be an absolute path, likeC:\stagingArea\myProject\on Windows or/stagingArea/myProject/on Unix. If this is not specified, the site will be staged in ${project.build.directory}/staging.- Since:
- 2.3
-
-
Constructor Details
-
SiteStageMojo
public SiteStageMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionExceptionDescription copied from class:AbstractDeployMojo- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Overrides:
executein classAbstractDeployMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
isDeploy
protected boolean isDeploy()Description copied from class:AbstractDeployMojoDetect if the mojo is staging or deploying.- Specified by:
isDeployin classAbstractDeployMojo- Returns:
trueif the mojo is for deploy and not staging (local or deploy)
-
determineDeploySite
protected org.apache.maven.model.Site determineDeploySite() throws org.apache.maven.plugin.MojoExecutionException- Specified by:
determineDeploySitein classAbstractDeployMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
determineStagingDirectory
Find the directory where staging will take place.- Returns:
- the directory for staging
-
getExecutionRootBuildDirectory
Find the build directory of the execution root project in the reactor. If no execution root project is found, the build directory of the current project is returned.- Returns:
- the build directory of the execution root project.
-