Package org.apache.maven.plugin.deploy
Class AbstractDeployMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugin.deploy.AbstractDeployMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
DeployFileMojo,DeployMojo
public abstract class AbstractDeployMojo extends org.apache.maven.plugin.AbstractMojo- Version:
- $Id: AbstractDeployMojo.java 1531347 2013-10-11 16:38:02Z rfscholte $
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.maven.artifact.factory.ArtifactFactoryartifactFactoryComponent used to create an artifact.private org.apache.maven.artifact.deployer.ArtifactDeployerdeployerprivate org.apache.maven.artifact.repository.ArtifactRepositorylocalRepositoryprivate booleanofflineFlag whether Maven is currently in online/offline mode.(package private) org.apache.maven.artifact.repository.ArtifactRepositoryFactoryrepositoryFactoryComponent used to create a repository.private java.util.Map<java.lang.String,org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout>repositoryLayoutsMap that contains the layouts.private intretryFailedDeploymentCountParameter used to control how many times a failed deployment will be retried before giving up and failing.protected booleanupdateReleaseInfoParameter used to update the metadata to make the artifact as release.
-
Constructor Summary
Constructors Constructor Description AbstractDeployMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddeploy(java.io.File source, org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.repository.ArtifactRepository deploymentRepository, org.apache.maven.artifact.repository.ArtifactRepository localRepository, int retryFailedDeploymentCount)Deploy an artifact from a particular file.(package private) voidfailIfOffline()org.apache.maven.artifact.deployer.ArtifactDeployergetDeployer()(package private) org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayoutgetLayout(java.lang.String id)org.apache.maven.artifact.repository.ArtifactRepositorygetLocalRepository()(package private) intgetRetryFailedDeploymentCount()(package private) booleanisUpdateReleaseInfo()voidsetDeployer(org.apache.maven.artifact.deployer.ArtifactDeployer deployer)voidsetLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Field Detail
-
deployer
@Component private org.apache.maven.artifact.deployer.ArtifactDeployer deployer
-
artifactFactory
@Component protected org.apache.maven.artifact.factory.ArtifactFactory artifactFactory
Component used to create an artifact.
-
repositoryFactory
@Component org.apache.maven.artifact.repository.ArtifactRepositoryFactory repositoryFactory
Component used to create a repository.
-
repositoryLayouts
@Component(role=org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout.class) private java.util.Map<java.lang.String,org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout> repositoryLayouts
Map that contains the layouts.
-
localRepository
@Parameter(defaultValue="${localRepository}", required=true, readonly=true) private org.apache.maven.artifact.repository.ArtifactRepository localRepository
-
offline
@Parameter(defaultValue="${settings.offline}", readonly=true) private boolean offlineFlag whether Maven is currently in online/offline mode.
-
updateReleaseInfo
@Parameter(property="updateReleaseInfo", defaultValue="false") protected boolean updateReleaseInfoParameter used to update the metadata to make the artifact as release.
-
retryFailedDeploymentCount
@Parameter(property="retryFailedDeploymentCount", defaultValue="1") private int retryFailedDeploymentCountParameter used to control how many times a failed deployment will be retried before giving up and failing. If a value outside the range 1-10 is specified it will be pulled to the nearest value within the range 1-10.- Since:
- 2.7
-
-
Method Detail
-
getDeployer
public org.apache.maven.artifact.deployer.ArtifactDeployer getDeployer()
-
setDeployer
public void setDeployer(org.apache.maven.artifact.deployer.ArtifactDeployer deployer)
-
getLocalRepository
public org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
-
setLocalRepository
public void setLocalRepository(org.apache.maven.artifact.repository.ArtifactRepository localRepository)
-
failIfOffline
void failIfOffline() throws org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoFailureException
-
getLayout
org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout getLayout(java.lang.String id) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
isUpdateReleaseInfo
boolean isUpdateReleaseInfo()
-
getRetryFailedDeploymentCount
int getRetryFailedDeploymentCount()
-
deploy
protected void deploy(java.io.File source, org.apache.maven.artifact.Artifact artifact, org.apache.maven.artifact.repository.ArtifactRepository deploymentRepository, org.apache.maven.artifact.repository.ArtifactRepository localRepository, int retryFailedDeploymentCount) throws org.apache.maven.artifact.deployer.ArtifactDeploymentExceptionDeploy an artifact from a particular file.- Parameters:
source- the file to deployartifact- the artifact definitiondeploymentRepository- the repository to deploy tolocalRepository- the local repository to install intoretryFailedDeploymentCount- TODO- Throws:
org.apache.maven.artifact.deployer.ArtifactDeploymentException- if an error occurred deploying the artifact
-
-