To install a 3rd party jar with maven;
Command : mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging> -DgeneratePom=true
(Refer –> http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html for more info)
Errorful example:
mvn install:install-file -Dfile=D:\AWorkspace\maven-multidex-sample -DgroupId=com.android.support -DartifactId=multidex -Dversion=20 -Dpackaging=jar -DgeneratePom=true
Correct example:
mvn install:install-file -Dfile=D:\AWorkspace\maven-multidex-sample\multidex.jar -DgroupId=com.android.support -DartifactId=multidex -Dversion=20 -Dpackaging=jar -DgeneratePom=true
Problem was with -Dfile=<path-to-file>. The path-to-file needed to specify the jar as well not just the location.
Cheers! 🙂