admin管理员组文章数量:1612098
使用mvn命令下载jar包的时候,有时候会报错:no plugin found for prefix 'dependency' in the current project and in the current project and in the plugin groups [org.apache.maven.plugins,org.codehaus.mojo] available from the repositories[local(E:\mavenlib)xxxxx]
原因是pom.xml里plugins没有添加copy-dependencies
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy</goal>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>
添加成功后,再次使用mvn命令即可。
顺便说下mvn copy 步骤
- 在pom.xml文件下配置上述代码中的plugin
- 打开pom.xml所在的文件夹
- 按住shift,右键 —> 在此处打开命令窗口
- 使用命令:
mvn dependency:copy-dependencies -DoutputDirectory=f:\lib -DincludeScope=compile
本文标签: 报错dependenciesCopyDependencymvn
版权声明:本文标题:mvn dependency:copy-dependencies下载jar报错:no plugin found for prefix 'dependency' in the current proje 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1728629119a1166876.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论