środa, 26 stycznia 2011

Downloading JAR from Maven repository to local repo

AFAIR there is no way to specify classifier (e.g. sources) and you'd better give the full plugin name as version 2.0 does not have that functionality, But quite useful sometimes to quickly have the dependency installed locally:

mvn org.apache.maven.plugins:maven-dependency-plugin:2.1:get -Dartifact=junit:junit:3.8.1 -DrepoUrl=http://download.java.net/maven/2

czwartek, 13 stycznia 2011

Installing JAR in a local Maven repo

They say

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \

-DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>

so...

mvn install:install-file -Dfile=junit-4.9b1.jar -DgroupId=junit \

-DartifactId=junit -Dversion=4.9b1 -Dpackaging=jar