mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \
    -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
 
 
If there's a pom-file as well, you can install it with the following command:
 
 
mvn install:install-file -Dfile=<path-to-file> -DpomFile=<path-to-pomfile>
 
 
With version 2.5 of the maven-install-plugin it gets even better. If the JAR was built by Apache Maven, it'll contain a pom.xml in a subfolder of the META-INF directory, which will be read by default. In that case, all you need to do is:
 
 
mvn install:install-file -Dfile=<path-to-file>