Maven
    Maven - Overview
    Maven - Assembly
    Maven - Install
    Maven - Load POM Properties in Java
    Maven - Multiple SLF4J Bindings Error
    Maven - How to Export POM Project Version to Property File
    Maven - How To Set Source/Target Level In Maven

Maven - Install

Updated: 2021-11-19

Maven keeps a local repository in ~/.m2.

To install is to put the jar inside the local repository.

Install From Source Code

$ mvn install

This will compile the code based on the settings in pom.xml, and copy the jar to ~/.m2

Install A Jar

If the jar is already built, we need to manually specify the groupId, artifactId, version etc

$ mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \
    -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>