执行mvn depedency:tree
查看mave依赖树时,莫名收获如下错误提示:
No plugin found for prefix 'dependency' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo]
经过多方查找方得解决,在执行命令时添加plugin及相关版本信息即可
mvn org.apache.maven.plugins:maven-dependency-plugin:3.3.0:tree
如果觉得命令繁琐,也可以采用另外一种方式
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>