Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manual Download, and install Maven plugin

Tags:

plugins

maven

So I downloaded This plugin

http://mvnrepository.com/artifact/org.codehaus.mojo/cobertura-maven-plugin/2.5

How do I get it manually installed to maven ?

I've tried

maven -DartifactId=cobertura-maven-plugin -DgroupId=org.codehaus.mojo -Dversion=2.5 plugin:download

But get this error:

[WARNING] Cannot resolve plugin-mapping metadata for groupId: org.codehaus.mojo:
cobertura-maven-plugin:maven-plugin:2.5 - IGNORING.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Required goal not found: plugin:download in org.apache.maven.plugins:mave
n-plugin-plugin:2.4.3
like image 374
Andre Avatar asked Dec 20 '22 22:12

Andre


1 Answers

use this command to download plugins so it also download also all the required dependencies:

mvn org.apache.maven.plugins:maven-dependency-plugin:2.6:get -Dartifact=groupId:artifactId:version

manually downloading plugins is asking for troubles and a lot of going back and forth to recover all the dependencies.

If you do not have the option, and must do it manually, use the command :

mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file ...

to install them.

see this page for the attributes available: http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html

like image 73
Farid Avatar answered Dec 27 '22 02:12

Farid