public abstract class AbstractDeployMojo extends AbstractSiteMojo implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
SiteStageMojo
and SiteStageDeployMojo
.Modifier and Type | Field and Description |
---|---|
protected static String |
DEFAULT_STAGING_DIRECTORY
The String "staging/".
|
protected org.apache.maven.execution.MavenSession |
mavenSession |
i18n, locales, localRepository, project, reactorProjects, siteDirectory, siteTool
Constructor and Description |
---|
AbstractDeployMojo() |
Modifier and Type | Method and Description |
---|---|
protected static String |
appendSlash(String url)
Make sure the given url ends with a slash.
|
void |
contextualize(org.codehaus.plexus.context.Context context) |
void |
execute() |
protected String |
getDeployModuleDirectory()
Find the relative path between the distribution URLs of the top parent and the current project.
|
protected abstract String |
getDeployRepositoryID()
Specifies the id to look up credential settings.
|
protected abstract String |
getDeployRepositoryURL()
Specifies the target URL for the deploy.
|
static org.apache.maven.wagon.proxy.ProxyInfo |
getProxyInfo(org.apache.maven.wagon.repository.Repository repository,
org.apache.maven.artifact.manager.WagonManager wagonManager)
Get the
ProxyInfo of the proxy associated with the host
and the protocol of the given repository . |
protected org.apache.maven.model.Site |
getRootSite(org.apache.maven.project.MavenProject project)
Extract the distributionManagement site of the top level parent of the given MavenProject.
|
protected static org.apache.maven.model.Site |
getSite(org.apache.maven.project.MavenProject project)
Extract the distributionManagement site from the given MavenProject.
|
protected File |
getTopLevelBuildDirectory()
Find the build directory of the top level project in the reactor.
|
protected boolean |
isDeploy()
Detect if the mojo is staging or deploying.
|
getInputEncoding, getMavenVersion, getOutputEncoding, isMaven3OrMore
@Component protected org.apache.maven.execution.MavenSession mavenSession
protected static final String DEFAULT_STAGING_DIRECTORY
public void execute() throws org.apache.maven.plugin.MojoExecutionException
execute
in interface org.apache.maven.plugin.Mojo
org.apache.maven.plugin.MojoExecutionException
protected static String appendSlash(String url)
url
- a String.protected abstract String getDeployRepositoryID() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
- if the ID cannot be determinedprotected abstract String getDeployRepositoryURL() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
- if the URL cannot be constructedprotected String getDeployModuleDirectory() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected File getTopLevelBuildDirectory()
public static org.apache.maven.wagon.proxy.ProxyInfo getProxyInfo(org.apache.maven.wagon.repository.Repository repository, org.apache.maven.artifact.manager.WagonManager wagonManager)
Get the ProxyInfo
of the proxy associated with the host
and the protocol
of the given repository
.
Extract from J2SE Doc : Networking Properties - nonProxyHosts : "The value can be a list of hosts, each separated by a |, and in addition a wildcard character (*) can be used for matching"
Defensively support for comma (",") and semi colon (";") in addition to pipe ("|") as separator.
repository
- the Repository to extract the ProxyInfo from.wagonManager
- the WagonManager used to connect to the Repository.null
if no matching proxy is foundpublic void contextualize(org.codehaus.plexus.context.Context context) throws org.codehaus.plexus.context.ContextException
contextualize
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
org.codehaus.plexus.context.ContextException
protected static org.apache.maven.model.Site getSite(org.apache.maven.project.MavenProject project) throws org.apache.maven.plugin.MojoExecutionException
project
- the MavenProject. Not null.org.apache.maven.plugin.MojoExecutionException
- if any of the site info is missing.protected org.apache.maven.model.Site getRootSite(org.apache.maven.project.MavenProject project) throws org.apache.maven.plugin.MojoExecutionException
getSite(org.apache.maven.project.MavenProject)
returns a site.project
- the MavenProject. Not null.org.apache.maven.plugin.MojoExecutionException
- if no site info is found in the tree.protected boolean isDeploy()
Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.