org.apache.maven.plugins.site
Class SiteStageMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.apache.maven.plugins.site.AbstractSiteMojo
          extended by org.apache.maven.plugins.site.AbstractDeployMojo
              extended by org.apache.maven.plugins.site.AbstractStagingMojo
                  extended by org.apache.maven.plugins.site.SiteStageMojo
All Implemented Interfaces:
ContextEnabled, Mojo, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

@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.

Version:
$Id: SiteStageMojo.html 861484 2013-05-09 23:10:16Z hboutemy $
Author:
Vincent Siveton

Field Summary
 
Fields inherited from class org.apache.maven.plugins.site.AbstractStagingMojo
DEFAULT_STAGING_DIRECTORY, topSiteURL
 
Fields inherited from class org.apache.maven.plugins.site.AbstractDeployMojo
mavenSession
 
Fields inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
i18n, locales, localRepository, project, reactorProjects, siteDirectory, siteTool
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
SiteStageMojo()
           
 
Method Summary
protected  Site determineDeploySite()
           
 void execute()
          
protected  File getExecutionRootBuildDirectory()
          Find the build directory of the execution root project in the reactor.
protected  boolean isDeploy()
          Detect if the mojo is staging or deploying.
 
Methods inherited from class org.apache.maven.plugins.site.AbstractStagingMojo
determineTopDistributionManagementSiteUrl
 
Methods inherited from class org.apache.maven.plugins.site.AbstractDeployMojo
appendSlash, contextualize, getDeployModuleDirectory, getDeploySite, getProxyInfo, getSite, getTopDistributionManagementSiteUrl, getTopLevelProject
 
Methods inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
getInputEncoding, getMavenVersion, getOutputEncoding, isMaven3OrMore
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SiteStageMojo

public SiteStageMojo()
Method Detail

execute

public void execute()
             throws MojoExecutionException
Description copied from class: AbstractDeployMojo

Specified by:
execute in interface Mojo
Overrides:
execute in class AbstractDeployMojo
Throws:
MojoExecutionException

isDeploy

protected boolean isDeploy()
Description copied from class: AbstractDeployMojo
Detect if the mojo is staging or deploying.

Specified by:
isDeploy in class AbstractDeployMojo
Returns:
true if the mojo is for deploy and not staging (local or deploy)

determineDeploySite

protected Site determineDeploySite()
                            throws MojoExecutionException
Specified by:
determineDeploySite in class AbstractDeployMojo
Throws:
MojoExecutionException

getExecutionRootBuildDirectory

protected File 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.


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.