Class DeployMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.deploy.AbstractDeployMojo
org.apache.maven.plugins.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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Patternprivate static final Patternprivate StringSpecifies an alternative repository to which the project artifacts should be deployed (other than those specified in <distributionManagement>).private StringThe alternative repository to use when the project has a final version.private StringThe alternative repository to use when the project has a snapshot version.private booleanWhether every project should be deployed during its own deploy-phase or at the end of the multimodule build.private static final List<org.apache.maven.shared.transfer.project.deploy.ProjectDeployerRequest> private org.apache.maven.project.MavenProjectprivate org.apache.maven.shared.transfer.project.deploy.ProjectDeployerComponent used to deploy project.private List<org.apache.maven.project.MavenProject> private static final AtomicIntegerWhen building with multiple threads, reaching the last project doesn't have to mean that all projects are ready to be deployedprivate StringSet this to 'true' to bypass artifact deploy Since since 3.0.0-M2 it's not anymore a real boolean as it can have more than 2 values:true: will skip as usualreleases: will skip if current version of the project is a releasesnapshots: will skip if current version of the project is a snapshot any other values will be considered asfalseFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voiddeployProject(org.apache.maven.project.ProjectBuildingRequest pbr, org.apache.maven.shared.transfer.project.deploy.ProjectDeployerRequest pir, org.apache.maven.artifact.repository.ArtifactRepository repo) voidexecute()(package private) org.apache.maven.artifact.repository.ArtifactRepositorygetDeploymentRepository(org.apache.maven.shared.transfer.project.deploy.ProjectDeployerRequest pdr) Methods inherited from class AbstractDeployMojo
createDeploymentArtifactRepository, failIfOffline, getRetryFailedDeploymentCount, getSession, warnIfAffectedPackagingAndMavenMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
ALT_LEGACY_REPO_SYNTAX_PATTERN
-
ALT_REPO_SYNTAX_PATTERN
-
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 List<org.apache.maven.shared.transfer.project.deploy.ProjectDeployerRequest> 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 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
-
altDeploymentRepository
Specifies an alternative repository to which the project artifacts should be deployed (other than those specified in <distributionManagement>).
Format:id::url- id
- The id can be used to pick up the correct credentials from the settings.xml
- url
- The location of the repository
id::layout::urlwherelayoutcould bedefault(ie. Maven 2) orlegacy(ie. Maven 1), but since 3.0.0 the layout part has been removed because Maven 3 only supports Maven 2 repository layout. -
altSnapshotDeploymentRepository
@Parameter(property="altSnapshotDeploymentRepository") private String altSnapshotDeploymentRepositoryThe alternative repository to use when the project has a snapshot version. Note: In version 2.x, the format wasid::layout::urlwherelayoutcould bedefault(ie. Maven 2) orlegacy(ie. Maven 1), but since 3.0.0 the layout part has been removed because Maven 3 only supports Maven 2 repository layout.- Since:
- 2.8
- See Also:
-
altReleaseDeploymentRepository
The alternative repository to use when the project has a final version. Note: In version 2.x, the format wasid::layout::urlwherelayoutcould bedefault(ie. Maven 2) orlegacy(ie. Maven 1), but since 3.0.0 the layout part has been removed because Maven 3 only supports Maven 2 repository layout.- Since:
- 2.8
- See Also:
-
skip
Set this to 'true' to bypass artifact deploy Since since 3.0.0-M2 it's not anymore a real boolean as it can have more than 2 values:true: will skip as usualreleases: will skip if current version of the project is a releasesnapshots: will skip if current version of the project is a snapshot- any other values will be considered as
false
- Since:
- 2.4
-
projectDeployer
@Component private org.apache.maven.shared.transfer.project.deploy.ProjectDeployer projectDeployerComponent used to deploy project.
-
-
Constructor Details
-
DeployMojo
public DeployMojo()
-
-
Method Details
-
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
-