I\'m currently using:
mvn install:install-file -Dfile={path/to/my/legacy.jar} -DgroupId=horrible -DartifactId=legacy.jar -Dversion=1.2.3 -Dpackaging=jar
Okay, answering my own question :P. You can do this by defining properties, I originally assumed the groupId etc were auto exported as properties but they are not.
4.0.0
com.whatever
Stuff
1.2.3
Description of why this horrible jar exists.
${project.groupId}
${project.artifactId}
${project.version}
${project.packaging}
mylegacy.jar
org.apache.maven.plugins
maven-install-plugin
install
install-file
You can now install files using:
mvn install
and this pom.xml. I have tested this with maven 3 and not 2.
For multiple files also see Maven POM file for installing multiple 3rd party commercial libraries