Package org.apache.maven.plugin.deploy
Class DeployMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugin.deploy.AbstractDeployMojo
-
- org.apache.maven.plugin.deploy.DeployMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="deploy", defaultPhase=DEPLOY, threadSafe=true) public class DeployMojo extends AbstractDeployMojo
Deploys an artifact to remote repository.- Version:
- $Id: DeployMojo.java 1620080 2014-08-23 21:34:57Z khmarbaise $
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.regex.Pattern
ALT_REPO_SYNTAX_PATTERN
private java.lang.String
altDeploymentRepository
Specifies an alternative repository to which the project artifacts should be deployed ( other than those specified in <distributionManagement> ).private java.lang.String
altReleaseDeploymentRepository
The alternative repository to use when the project has a final version.private java.lang.String
altSnapshotDeploymentRepository
The alternative repository to use when the project has a snapshot version.private org.apache.maven.artifact.Artifact
artifact
Deprecated.either use project.getArtifact() or reactorProjects.get(i).getArtifact()private java.util.List
attachedArtifacts
Deprecated.either use project.getAttachedArtifacts() or reactorProjects.get(i).getAttachedArtifacts()private boolean
deployAtEnd
Whether every project should be deployed during its own deploy-phase or at the end of the multimodule build.private static java.util.List<DeployRequest>
deployRequests
private java.lang.String
packaging
Deprecated.either use project.getPackaging() or reactorProjects.get(i).getPackaging()private java.io.File
pomFile
Deprecated.either use project.getFile() or reactorProjects.get(i).getFile()private org.apache.maven.project.MavenProject
project
private java.util.List<org.apache.maven.project.MavenProject>
reactorProjects
private static java.util.concurrent.atomic.AtomicInteger
readyProjectsCounter
When building with multiple threads, reaching the last project doesn't have to mean that all projects are ready to be deployedprivate boolean
skip
Set this to 'true' to bypass artifact deploy-
Fields inherited from class org.apache.maven.plugin.deploy.AbstractDeployMojo
artifactFactory, repositoryFactory, updateReleaseInfo
-
-
Constructor Summary
Constructors Constructor Description DeployMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
deployProject(DeployRequest request)
void
execute()
(package private) org.apache.maven.artifact.repository.ArtifactRepository
getDeploymentRepository(org.apache.maven.project.MavenProject project, java.lang.String altDeploymentRepository, java.lang.String altReleaseDeploymentRepository, java.lang.String altSnapshotDeploymentRepository)
-
Methods inherited from class org.apache.maven.plugin.deploy.AbstractDeployMojo
deploy, failIfOffline, getDeployer, getLayout, getLocalRepository, getRetryFailedDeploymentCount, isUpdateReleaseInfo, setDeployer, setLocalRepository
-
-
-
-
Field Detail
-
ALT_REPO_SYNTAX_PATTERN
private static final java.util.regex.Pattern ALT_REPO_SYNTAX_PATTERN
-
readyProjectsCounter
private static final java.util.concurrent.atomic.AtomicInteger readyProjectsCounter
When building with multiple threads, reaching the last project doesn't have to mean that all projects are ready to be deployed
-
deployRequests
private static final java.util.List<DeployRequest> deployRequests
-
project
@Parameter(defaultValue="${project}", readonly=true, required=true) private org.apache.maven.project.MavenProject project
-
reactorProjects
@Parameter(defaultValue="${reactorProjects}", required=true, readonly=true) private java.util.List<org.apache.maven.project.MavenProject> reactorProjects
-
deployAtEnd
@Parameter(defaultValue="false", property="deployAtEnd") private boolean deployAtEnd
Whether every project should be deployed during its own deploy-phase or at the end of the multimodule build. If set totrue
and the build fails, none of the reactor projects is deployed. (experimental)- Since:
- 2.8
-
artifact
@Parameter(defaultValue="${project.artifact}", required=true, readonly=true) private org.apache.maven.artifact.Artifact artifact
Deprecated.either use project.getArtifact() or reactorProjects.get(i).getArtifact()
-
packaging
@Parameter(defaultValue="${project.packaging}", required=true, readonly=true) private java.lang.String packaging
Deprecated.either use project.getPackaging() or reactorProjects.get(i).getPackaging()
-
pomFile
@Parameter(defaultValue="${project.file}", required=true, readonly=true) private java.io.File pomFile
Deprecated.either use project.getFile() or reactorProjects.get(i).getFile()
-
altDeploymentRepository
@Parameter(property="altDeploymentRepository") private java.lang.String altDeploymentRepository
Specifies an alternative repository to which the project artifacts should be deployed ( other than those specified in <distributionManagement> ).
Format: id::layout::url- id
- The id can be used to pick up the correct credentials from the settings.xml
- layout
- Either
default
for the Maven2 layout orlegacy
for the Maven1 layout. Maven3 also uses thedefault
layout. - url
- The location of the repository
-
altSnapshotDeploymentRepository
@Parameter(property="altSnapshotDeploymentRepository") private java.lang.String altSnapshotDeploymentRepository
The alternative repository to use when the project has a snapshot version.- Since:
- 2.8
- See Also:
altDeploymentRepository
-
altReleaseDeploymentRepository
@Parameter(property="altReleaseDeploymentRepository") private java.lang.String altReleaseDeploymentRepository
The alternative repository to use when the project has a final version.- Since:
- 2.8
- See Also:
altDeploymentRepository
-
attachedArtifacts
@Parameter(defaultValue="${project.attachedArtifacts}", required=true, readonly=true) private java.util.List attachedArtifacts
Deprecated.either use project.getAttachedArtifacts() or reactorProjects.get(i).getAttachedArtifacts()
-
skip
@Parameter(property="maven.deploy.skip", defaultValue="false") private boolean skip
Set this to 'true' to bypass artifact deploy- Since:
- 2.4
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
deployProject
private void deployProject(DeployRequest request) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
getDeploymentRepository
org.apache.maven.artifact.repository.ArtifactRepository getDeploymentRepository(org.apache.maven.project.MavenProject project, java.lang.String altDeploymentRepository, java.lang.String altReleaseDeploymentRepository, java.lang.String altSnapshotDeploymentRepository) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
-