## org.apache.maven.plugins.site
Class SiteStageMojo

    java.lang.Object
      org.apache.maven.plugin.AbstractMojo
          org.apache.maven.plugins.site.AbstractSiteMojo
              org.apache.maven.plugins.site.AbstractSiteRenderingMojo
                  org.apache.maven.plugins.site.SiteMojo
                      org.apache.maven.plugins.site.SiteStageMojo

All Implemented Interfaces:
  org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

Direct Known Subclasses:
  SiteStageDeployMojo

    public class SiteStageMojo

extends SiteMojo

Generates a site in 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 works.

Version:
  $Id: SiteStageMojo.java 751418 2009-03-08 13:27:17Z dennisl $
Author:
  Vincent Siveton

Field Summary
`protected static java.lang.String` `DEFAULT_STAGING_DIRECTORY`
`protected java.io.File` `stagingDirectory` Staging directory location.

Fields inherited from class org.apache.maven.plugins.site.SiteMojo
`outputDirectory`

Fields inherited from class org.apache.maven.plugins.site.AbstractSiteRenderingMojo
`artifactFactory, artifactResolver, assembler, attributes, generatedSiteDirectory, moduleExcludes, reports, repositories, siteRenderer`

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
`void` `execute()` Generate the project site throws MojoExecutionException if any
`protected java.io.File` `getStagingDirectory(org.apache.maven.project.MavenProject currentProject, java.util.List reactorProjects, java.io.File usersStagingDirectory)` Find the directory where staging will take place.
`protected static java.lang.String` `getStructure(org.apache.maven.project.MavenProject project, boolean ignoreMissingSiteUrl)` Generates the site structure using the project hiearchy (project and its modules) or using the distributionManagement elements from the pom.xml.
`protected org.apache.maven.project.MavenProject` `getTopLevelProject(java.util.List reactorProjects)` Find the top level parent in the reactor, i.e.

Methods inherited from class org.apache.maven.plugins.site.AbstractSiteRenderingMojo
`categoriseReports, createSiteRenderingContext, filterReports, locateDocuments, locateReports`

Methods inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
`getInputEncoding, getOutputEncoding, populateReportItems, toRelative`

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`

Field Detail

### DEFAULT_STAGING_DIRECTORY

    protected static final java.lang.String DEFAULT_STAGING_DIRECTORY

See Also:
  Constant Field Values

### stagingDirectory

    protected java.io.File stagingDirectory

  Staging directory location. This needs to be an absolute path, like `C:\stagingArea\myProject\` on Windows or `/stagingArea/myProject/` on Unix.

Constructor Detail

### SiteStageMojo

    public SiteStageMojo()

Method Detail

### execute

    public void execute()
                 throws org.apache.maven.plugin.MojoExecutionException,
                        org.apache.maven.plugin.MojoFailureException

  Description copied from class: `SiteMojo`
  Generate the project site

  throws MojoExecutionException if any

  Specified by:
    `execute` in interface `org.apache.maven.plugin.Mojo`
  Overrides:
    `execute` in class `SiteMojo`
  Throws:
    `org.apache.maven.plugin.MojoExecutionException`
    `org.apache.maven.plugin.MojoFailureException`
  See Also:
    `Mojo.execute()`

### getStagingDirectory

    protected java.io.File getStagingDirectory(org.apache.maven.project.MavenProject currentProject,
                                               java.util.List reactorProjects,
                                               java.io.File usersStagingDirectory)

  Find the directory where staging will take place.

  Parameters:
    `currentProject` - The currently executing project
    `reactorProjects` - The projects in the reactor
    `usersStagingDirectory` - The staging directory as suggested by the user's configuration
  Returns:
    the directory for staging

### getTopLevelProject

    protected org.apache.maven.project.MavenProject getTopLevelProject(java.util.List reactorProjects)

  Find the top level parent in the reactor, i.e. the execution root.

  Parameters:
    `reactorProjects` - The projects in the reactor
  Returns:
    The top level project in the reactor, or `null` if none can be found

### getStructure

    protected static java.lang.String getStructure(org.apache.maven.project.MavenProject project,
                                                   boolean ignoreMissingSiteUrl)
                                            throws org.apache.maven.plugin.MojoFailureException

  Generates the site structure using the project hiearchy (project and its modules) or using the distributionManagement elements from the pom.xml.

  Parameters:
    `project` -
    `ignoreMissingSiteUrl` -
  Returns:
    the structure relative path
  Throws:
    `org.apache.maven.plugin.MojoFailureException` - if any

Copyright © 2011. All Rights Reserved.