@Mojo(name="stage-deploy", requiresDependencyResolution=TEST) public class SiteStageDeployMojo extends AbstractStagingMojo
<distributionManagement>
section of the
POM, using wagon supported protocolsModifier and Type | Field and Description |
---|---|
private java.lang.String |
stagingRepositoryId
The identifier of the repository where the staging site will be deployed.
|
private java.lang.String |
stagingSiteURL
The staged site will be deployed to this URL.
|
DEFAULT_STAGING_DIRECTORY, topSiteURL
mavenSession
i18n, localRepository, project, reactorProjects, siteTool, skip
Constructor and Description |
---|
SiteStageDeployMojo() |
Modifier and Type | Method and Description |
---|---|
protected org.apache.maven.model.Site |
determineDeploySite() |
private java.lang.String |
determineStageDeploySiteURL()
Find the URL where staging will take place.
|
protected java.lang.String |
determineTopDistributionManagementSiteUrl()
If
stagingSiteURL is configured, top most parent with same staging site url
will be used. |
private java.lang.String |
getStagingSiteURL(org.apache.maven.project.MavenProject project)
Extract the value of the stagingSiteURL configuration parameter of
maven-site-plugin for the given project.
|
private org.apache.maven.project.MavenProject |
getTopMostParentWithSameStagingSiteURL()
Extract the distributionManagement.site of the top most project in the
hierarchy that specifies a stagingSiteURL, starting at the actual MavenProject.
|
protected boolean |
isDeploy()
Detect if the mojo is staging or deploying.
|
private java.lang.String |
stagingRepoId() |
appendSlash, contextualize, execute, getDeployModuleDirectory, getDeploySite, getProxyInfo, getSite, getTopDistributionManagementSiteUrl, getTopLevelProject
getLocales, getMavenVersion, isMaven3OrMore
@Parameter(property="stagingSiteURL") private java.lang.String stagingSiteURL
Note that even if you specify this plugin parameter, you still need to indicate ${project.distributionManagement.site.url} at least in your top level project in order for relative links between modules to be resolved correctly.
@Parameter(property="stagingRepositoryId") private java.lang.String stagingRepositoryId
<server>
entry from the settings.xml
. If a matching
<server>
entry is found, its configured credentials will be used for authentication.
If this is not specified, then the corresponding value of distributionManagement.site.id
will be taken as default, unless this is not defined either then the String
"stagingSite"
is used. (Note:
until v. 2.3 and 3.0-beta-3 the String "stagingSite"
is always used.)protected boolean isDeploy()
AbstractDeployMojo
isDeploy
in class AbstractDeployMojo
true
if the mojo is for deploy and not staging (local or deploy)protected java.lang.String determineTopDistributionManagementSiteUrl() throws org.apache.maven.plugin.MojoExecutionException
stagingSiteURL
is configured, top most parent with same staging site url
will be used.determineTopDistributionManagementSiteUrl
in class AbstractStagingMojo
org.apache.maven.plugin.MojoExecutionException
protected org.apache.maven.model.Site determineDeploySite() throws org.apache.maven.plugin.MojoExecutionException
determineDeploySite
in class AbstractDeployMojo
org.apache.maven.plugin.MojoExecutionException
private org.apache.maven.project.MavenProject getTopMostParentWithSameStagingSiteURL()
getStagingSiteURL(org.apache.maven.project.MavenProject)
returns
same URL as actual.private java.lang.String getStagingSiteURL(org.apache.maven.project.MavenProject project)
project
- The MavenProject, not nullprivate java.lang.String determineStageDeploySiteURL() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private java.lang.String stagingRepoId()