Package org.apache.maven.plugin.install
Class InstallMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugin.install.AbstractInstallMojo
-
- org.apache.maven.plugin.install.InstallMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="install", defaultPhase=INSTALL, threadSafe=true) public class InstallMojo extends AbstractInstallMojoInstalls the project's main artifact, and any other artifacts attached by other plugins in the lifecycle, to the local repository.- Version:
- $Id: InstallMojo.java 1617120 2014-08-10 15:15:48Z khmarbaise $
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.maven.artifact.ArtifactartifactDeprecated.either use project.getArtifact() or reactorProjects.get(i).getArtifact()private java.util.List<org.apache.maven.artifact.Artifact>attachedArtifactsDeprecated.either use project.getAttachedArtifacts() or reactorProjects.get(i).getAttachedArtifacts()private booleaninstallAtEndWhether every project should be installed during its own install-phase or at the end of the multimodule build.private static java.util.List<InstallRequest>installRequestsprotected 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 installedprivate booleanskipSet this totrueto bypass artifact installation.-
Fields inherited from class org.apache.maven.plugin.install.AbstractInstallMojo
artifactFactory, createChecksum, digester, installer, localRepository, updateReleaseInfo
-
-
Constructor Summary
Constructors Constructor Description InstallMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()private voidinstallProject(InstallRequest request)voidsetSkip(boolean skip)-
Methods inherited from class org.apache.maven.plugin.install.AbstractInstallMojo
addMetaDataFilesForArtifact, getLocalRepoFile, getLocalRepoFile, installChecksums, installChecksums
-
-
-
-
Field Detail
-
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 installed
-
installRequests
private static final java.util.List<InstallRequest> installRequests
-
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
-
installAtEnd
@Parameter(defaultValue="false", property="installAtEnd") private boolean installAtEndWhether every project should be installed during its own install-phase or at the end of the multimodule build. If set totrueand the build fails, none of the reactor projects is installed. (experimental)- Since:
- 2.5
-
packaging
@Parameter(defaultValue="${project.packaging}", required=true, readonly=true) protected 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()
-
skip
@Parameter(property="maven.install.skip", defaultValue="false") private boolean skipSet this totrueto bypass artifact installation. Use this for artifacts that does not need to be installed in the local repository.- Since:
- 2.4
-
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()
-
attachedArtifacts
@Parameter(defaultValue="${project.attachedArtifacts}", required=true, readonly=true) private java.util.List<org.apache.maven.artifact.Artifact> attachedArtifactsDeprecated.either use project.getAttachedArtifacts() or reactorProjects.get(i).getAttachedArtifacts()
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
installProject
private void installProject(InstallRequest request) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
setSkip
public void setSkip(boolean skip)
-
-