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 Details

    • readyProjectsCounter

      private static final 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 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 List<org.apache.maven.project.MavenProject> reactorProjects
    • installAtEnd

      @Parameter(defaultValue="false", property="installAtEnd") private boolean installAtEnd
      Whether every project should be installed during its own install-phase or at the end of the multimodule build. If set to true and 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 packaging
      Deprecated.
      either use project.getPackaging() or reactorProjects.get(i).getPackaging()
    • pomFile

      @Parameter(defaultValue="${project.file}", required=true, readonly=true) private File pomFile
      Deprecated.
      either use project.getFile() or reactorProjects.get(i).getFile()
    • skip

      @Parameter(property="maven.install.skip", defaultValue="false") private boolean skip
      Set this to true to 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 artifact
      Deprecated.
      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> attachedArtifacts
      Deprecated.
      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)