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 AbstractInstallMojo
Installs 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
FieldsModifier and TypeFieldDescriptionprivate org.apache.maven.artifact.ArtifactDeprecated.either use project.getArtifact() or reactorProjects.get(i).getArtifact()private List<org.apache.maven.artifact.Artifact> Deprecated.either use project.getAttachedArtifacts() or reactorProjects.get(i).getAttachedArtifacts()private booleanWhether every project should be installed during its own install-phase or at the end of the multimodule build.private static final List<InstallRequest> protected StringDeprecated.either use project.getPackaging() or reactorProjects.get(i).getPackaging()private FileDeprecated.either use project.getFile() or reactorProjects.get(i).getFile()private org.apache.maven.project.MavenProjectprivate 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 installedprivate booleanSet this totrueto bypass artifact installation.Fields inherited from class org.apache.maven.plugin.install.AbstractInstallMojo
artifactFactory, createChecksum, digester, installer, localRepository, updateReleaseInfoFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()private voidinstallProject(InstallRequest request) voidsetSkip(boolean skip) Methods inherited from class org.apache.maven.plugin.install.AbstractInstallMojo
addMetaDataFilesForArtifact, getLocalRepoFile, getLocalRepoFile, installChecksums, installChecksumsMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
readyProjectsCounter
When building with multiple threads, reaching the last project doesn't have to mean that all projects are ready to be installed -
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 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 String packagingDeprecated.either use project.getPackaging() or reactorProjects.get(i).getPackaging() -
pomFile
Deprecated.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 List<org.apache.maven.artifact.Artifact> attachedArtifactsDeprecated.either use project.getAttachedArtifacts() or reactorProjects.get(i).getAttachedArtifacts()
-
-
Constructor Details
-
InstallMojo
public InstallMojo()
-
-
Method Details
-
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)
-