|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.site.AbstractSiteMojo
org.apache.maven.plugins.site.AbstractDeployMojo
public abstract class AbstractDeployMojo
Abstract base class for deploy mojos.
Since 2.3 this includes SiteStageMojo and SiteStageDeployMojo.
| Field Summary | |
|---|---|
protected org.apache.maven.execution.MavenSession |
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 | |
|---|---|
AbstractDeployMojo()
|
|
| Method Summary | |
|---|---|
protected static String |
appendSlash(String url)
Make sure the given url ends with a slash. |
void |
contextualize(org.codehaus.plexus.context.Context context)
|
protected abstract org.apache.maven.model.Site |
determineDeploySite()
|
protected abstract String |
determineTopDistributionManagementSiteUrl()
|
void |
execute()
|
protected String |
getDeployModuleDirectory()
Find the relative path between the distribution URLs of the top site and the current project. |
protected org.apache.maven.model.Site |
getDeploySite()
Get the site used for deployment, with its id to look up credential settings and 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 static org.apache.maven.model.Site |
getSite(org.apache.maven.project.MavenProject project)
Extract the distributionManagement site from the given MavenProject. |
protected String |
getTopDistributionManagementSiteUrl()
Get the top distribution management site url, used for module relative path calculations. |
protected org.apache.maven.project.MavenProject |
getTopLevelProject(org.apache.maven.project.MavenProject project)
Extract the distributionManagement site of the top level parent of the given MavenProject. |
protected abstract boolean |
isDeploy()
Detect if the mojo is staging or deploying. |
| 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 |
| Field Detail |
|---|
@Component protected org.apache.maven.execution.MavenSession mavenSession
| Constructor Detail |
|---|
public AbstractDeployMojo()
| Method Detail |
|---|
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
execute in interface org.apache.maven.plugin.Mojoorg.apache.maven.plugin.MojoExecutionExceptionprotected static String appendSlash(String url)
url - a String.
protected abstract boolean isDeploy()
true if the mojo is for deploy and not staging (local or deploy)
protected String getTopDistributionManagementSiteUrl()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptiondetermineTopDistributionManagementSiteUrl()
protected abstract String determineTopDistributionManagementSiteUrl()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected org.apache.maven.model.Site getDeploySite()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptiondetermineDeploySite()
protected abstract org.apache.maven.model.Site determineDeploySite()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected String getDeployModuleDirectory()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
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 found
public void contextualize(org.codehaus.plexus.context.Context context)
throws org.codehaus.plexus.context.ContextException
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizableorg.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.project.MavenProject getTopLevelProject(org.apache.maven.project.MavenProject project)
throws org.apache.maven.plugin.MojoExecutionException
getSite(org.apache.maven.project.MavenProject) returns a site that resides in the
same site. Notice that it doesn't take into account if the parent is in the reactor or not.
project - the MavenProject. Not null.
null.
Also site.getUrl() and site.getId() are guaranteed to be not null.
org.apache.maven.plugin.MojoExecutionException - if no site info is found in the tree.URIPathDescriptor.sameSite(java.net.URI)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||