解决jar包依赖冲突:Found Banned Dependency

编程入门 行业动态 更新时间:2024-10-23 05:35:59

解决jar包依赖<a href=https://www.elefans.com/category/jswz/34/1770789.html style=冲突:Found Banned Dependency"/>

解决jar包依赖冲突:Found Banned Dependency

使用eclipse的maven构建项目的时候出现了依赖冲突

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building zdttb-core 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ zdttb-core ---
[INFO] Deleting D:\workspace-asiabao\zdttb-core\target
[INFO] 
[INFO] --- debug-plugin:1.0-SNAPSHOT:clean-local (default) @ zdttb-core ---
[INFO] ${clean.local.disabled}为true,跳过clean-local Mojo。
[INFO] 
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-banned-dependencies) @ zdttb-core ---
[WARNING] Rule 2: org.apache.maven.plugins.enforcer.BannedDependencies failed with message:
Found Banned Dependency: commons-logging:commons-logging:jar:1.2
Use 'mvn dependency:tree' to locate the source of the banned dependencies.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.875 s
[INFO] Finished at: 2019-03-26T10:18:56+08:00
[INFO] Final Memory: 21M/220M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce (enforce-banned-dependencies) on project zdttb-core: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]  

各种mvn clean, update项目都不好使,最主要的是前两天还正常使用,突然就好不使了

根据错误提示,首先找到该项目的目录:

进行命令:

mvn dependency:tree 查看项目依赖树:

根据项目中的提示

Found Banned Dependency: commons-logging:commons-logging:jar:1.2

查找到

是在这个包下 org.jxls:jxls-poi:jar:1.0.11

或者根据命令查找: mvn dependency:tree -Dverbose -Dincludes=“xxx”

找到以后,在项目中去除该包,再重新mvn clean install

更多推荐

解决jar包依赖冲突:Found Banned Dependency

本文发布于:2024-02-07 05:49:50,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1753528.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:冲突   jar   Dependency   Banned

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!