Apache Maven has a two level strategy to resolve and distribute files, which we call artifacts. The first level is called the local repository, which is the artifact cache on your system, by default located at ${user.home}/.m2/repository. When executing Maven, it'll first look in this local cache for artifacts. If the artifact cannot be found here, Maven will access the remote repositories to find the artifact. Once found it will be stored into the local repository, so it's be available for current and future usage.
With the maven-install-plugin you can put your artifacts in the local repository. To upload artifacts to a remote repository, you need to use the maven-deploy-plugin.
In most cases, install:install goal doesn't need any configuration, it needs the project's POM and the artifact file to be installed during the install phase of the default build lifecycle.
mvn install
The install:install-file goal is used primarily for installing artifacts to the local repository which were not built by Maven. The project's development team may or may not provide a POM for the artifact. Here's a list of some of the available parameters for the install-file goal:
mvn install:install-file -Dfile=your-artifact-1.0.jar \ [-DpomFile=your-pom.xml] \ [-Dsources=src.jar] \ [-Djavadoc=apidocs.jar] \ [-DgroupId=org.some.group] \ [-DartifactId=your-artifact] \ [-Dversion=1.0] \ [-Dpackaging=jar] \ [-Dclassifier=sources] \ [-DgeneratePom=true] \ [-DcreateChecksum=true]