logo Apache Maven Install Plugin

Copies the project artifacts to the user's local repository.

homepage: maven.apache.org/plugins
fresh index:
last release: 3 years ago, first release: 2 decades ago
packaging: maven-plugin
get this artifact from: central
see this artifact on: search.maven.org


Display vulnerabilities (snyk): Vulnerability check

This chart shows how much is this artifact used as a dependency in other Maven artifacts in Central repository and GitHub:


select version:

Add this snippet into pom.xml inside tag <project><build><plugins>:




Switch to artifact.
goals:
install:help

Display help information on maven-install-plugin. Call mvn install:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

install:install (phase: install)

Installs the project's main artifact, and any other artifacts attached by other plugins in the lifecycle, to the local repository.

install:install-file

Installs a file in the local repository.

Often used code snippets:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-install-plugin</artifactId>
  <configuration>
    <skip>true</skip>
  </configuration>
</plugin>
<plugin>
  <artifactId>maven-install-plugin</artifactId>
  <executions>
    <execution>
      <phase>verify</phase>
      <goals>
        <goal>install</goal>
      </goals>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-install-plugin</artifactId>
  <version>2.3</version>
  <configuration>
    <createChecksum>true</createChecksum>
  </configuration>
  <executions>
    <execution>
      <phase>install</phase>
      <goals>
        <goal>install-file</goal>
      </goals>
      <configuration>
        <groupId>${project.groupId}</groupId>
        <artifactId>${project.artifactId}</artifactId>
        <version>${project.version}</version>
        <classifier>${platform.name}</classifier>
        <packaging>jar</packaging>
        <file>${project.build.directory}/${project.artifactId}-${platform.name}.jar</file>
      </configuration>
    </execution>
  </executions>
</plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-install-plugin</artifactId>
  <version>2.3.1</version>
  <configuration>
    <createChecksum>true</createChecksum>
  </configuration>
</plugin>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-install-plugin</artifactId>
  <version>2.3</version>
  <configuration>
    <createChecksum>true</createChecksum>
  </configuration>
</plugin>

© Jiri Pinkas 2015 - 2022. All rights reserved! Admin login To submit bugs / feature requests please use this github page
related: JavaVids | Top Java Blogs | Java školení
Apache and Apache Maven are trademarks of the Apache Software Foundation. The Central Repository is a service mark of Sonatype, Inc.