org.apache.maven.plugin.install

## Class InstallFileMojo

- java.lang.Object
- - org.apache.maven.plugin.AbstractMojo
  - - org.apache.maven.plugin.install.AbstractInstallMojo
    - - org.apache.maven.plugin.install.InstallFileMojo

- All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

      @Mojo(name="install-file",
            requiresProject=false,
            aggregator=true,
            threadSafe=true)
      public class InstallFileMojo
      extends AbstractInstallMojo

  Installs a file in the local repository.
  Version:
    $Id: InstallFileMojo.java 1617120 2014-08-10 15:15:48Z khmarbaise $
  Author:
    Brett Porter

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `artifactId` ArtifactId of the artifact to be installed.
    `protected String` | `classifier` Classifier type of the artifact to be installed.
    `protected String` | `groupId` GroupId of the artifact to be installed.
    `protected String` | `packaging` Packaging type of the artifact to be installed.
    `protected String` | `version` Version of the artifact to be installed.

    - ### Fields inherited from class org.apache.maven.plugin.install.AbstractInstallMojo

      `artifactFactory, createChecksum, digester, installer, localRepository, updateReleaseInfo`

    - ### Fields inherited from interface org.apache.maven.plugin.Mojo

      `ROLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InstallFileMojo()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `execute()`
    `File` | `getLocalRepositoryPath()`
    `void` | `setLocalRepositoryPath(File theLocalRepositoryPath)`

    - ### Methods inherited from class org.apache.maven.plugin.install.AbstractInstallMojo

      `addMetaDataFilesForArtifact, getLocalRepoFile, getLocalRepoFile, installChecksums, installChecksums`

    - ### Methods inherited from class org.apache.maven.plugin.AbstractMojo

      `getLog, getPluginContext, setLog, setPluginContext`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### groupId

          @Parameter(property="groupId")
          protected String groupId

      GroupId of the artifact to be installed. Retrieved from POM file if one is specified or extracted from `pom.xml` in jar if available.

    - #### artifactId

          @Parameter(property="artifactId")
          protected String artifactId

      ArtifactId of the artifact to be installed. Retrieved from POM file if one is specified or extracted from `pom.xml` in jar if available.

    - #### version

          @Parameter(property="version")
          protected String version

      Version of the artifact to be installed. Retrieved from POM file if one is specified or extracted from `pom.xml` in jar if available.

    - #### packaging

          @Parameter(property="packaging")
          protected String packaging

      Packaging type of the artifact to be installed. Retrieved from POM file if one is specified or extracted from `pom.xml` in jar if available.

    - #### classifier

          @Parameter(property="classifier")
          protected String classifier

      Classifier type of the artifact to be installed. For example, "sources" or "javadoc". Defaults to none which means this is the project's main artifact.
      Since:
        2.2

  - ### Constructor Detail

    - #### InstallFileMojo

          public InstallFileMojo()

  - ### Method Detail

    - #### execute

          public void execute()
                       throws org.apache.maven.plugin.MojoExecutionException,
                              org.apache.maven.plugin.MojoFailureException

      Throws:
        `org.apache.maven.plugin.MojoExecutionException`
        `org.apache.maven.plugin.MojoFailureException`
      See Also:
        `Mojo.execute()`

    - #### getLocalRepositoryPath

          public File getLocalRepositoryPath()

      Returns:
        the localRepositoryPath

    - #### setLocalRepositoryPath

          public void setLocalRepositoryPath(File theLocalRepositoryPath)

      Parameters:
        `theLocalRepositoryPath` - the localRepositoryPath to set

Copyright © 2004–2015. All rights reserved.