Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why can't maven find a plugin?

If I type the command:

mvn dependency:list

The docs suggest that I'll get a list of my project's dependencies. Instead though, I get this:

[INFO] Searching repository for plugin with prefix: 'dependency'.
[INFO] -----------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] -----------------------------------------------------------
[INFO] Required goal not found: dependency:list

Call me a hopeful naive, but I had hoped maven would download any plugins it didn't have. Does anyone know what might be leading to this error? Does anyone know where maven stores information about what plugins it has installed, and where they're stored in the maven repository?

like image 795
izb Avatar asked Mar 02 '23 04:03

izb


1 Answers

Have you tried mvn -cpu dependency:list (or: mvn --check-plugin-updates dependency:list)? Probably, you have older version of dependency plugin which does not have goal list

If this does not help, try upgrading Maven. Since 2.0.9 default versions are provided by the Super POM for most important plugins (dependency plug-in included), so 2.0 version will be downloaded (which has list goal).

Or you can try removing the cached version of the plug-in from the repository (~/.m2/repository/org/apache/maven/plugins/maven-dependency-plugin/, where ~ is the user home directory).

like image 108
Ivan Dubrov Avatar answered Mar 12 '23 23:03

Ivan Dubrov