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 AbstractDeployMojoDeploys 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.PatternALT_REPO_SYNTAX_PATTERNprivate java.lang.StringaltDeploymentRepositorySpecifies an alternative repository to which the project artifacts should be deployed ( other than those specified in <distributionManagement> ).private java.lang.StringaltReleaseDeploymentRepositoryThe alternative repository to use when the project has a final version.private java.lang.StringaltSnapshotDeploymentRepositoryThe alternative repository to use when the project has a snapshot version.private org.apache.maven.artifact.ArtifactartifactDeprecated.either use project.getArtifact() or reactorProjects.get(i).getArtifact()private java.util.ListattachedArtifactsDeprecated.either use project.getAttachedArtifacts() or reactorProjects.get(i).getAttachedArtifacts()private booleandeployAtEndWhether every project should be deployed during its own deploy-phase or at the end of the multimodule build.private static java.util.List<DeployRequest>deployRequestsprivate java.lang.StringpackagingDeprecated.either use project.getPackaging() or reactorProjects.get(i).getPackaging()private java.io.FilepomFileDeprecated.either use project.getFile() or reactorProjects.get(i).getFile()private org.apache.maven.project.MavenProjectprojectprivate java.util.List<org.apache.maven.project.MavenProject>reactorProjectsprivate static java.util.concurrent.atomic.AtomicIntegerreadyProjectsCounterWhen building with multiple threads, reaching the last project doesn't have to mean that all projects are ready to be deployedprivate booleanskipSet 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 voiddeployProject(DeployRequest request)voidexecute()(package private) org.apache.maven.artifact.repository.ArtifactRepositorygetDeploymentRepository(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 deployAtEndWhether every project should be deployed during its own deploy-phase or at the end of the multimodule build. If set totrueand 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 artifactDeprecated.either use project.getArtifact() or reactorProjects.get(i).getArtifact()
-
packaging
@Parameter(defaultValue="${project.packaging}", required=true, readonly=true) private java.lang.String packagingDeprecated.either use project.getPackaging() or reactorProjects.get(i).getPackaging()
-
pomFile
@Parameter(defaultValue="${project.file}", required=true, readonly=true) private java.io.File pomFileDeprecated.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
defaultfor the Maven2 layout orlegacyfor the Maven1 layout. Maven3 also uses thedefaultlayout. - 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 attachedArtifactsDeprecated.either use project.getAttachedArtifacts() or reactorProjects.get(i).getAttachedArtifacts()
-
skip
@Parameter(property="maven.deploy.skip", defaultValue="false") private boolean skipSet 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.MojoExecutionExceptionorg.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.MojoExecutionExceptionorg.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.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
-