Maven编译错误记录:Some Enforcer rules have failed
一、错误信息
添加httpclient与httpcore依赖后编译Maven报错。
错误信息如下:
Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:1.3.:enforce (enforce-banned-dependencies) on project manager:
Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed.
二、错误定位
根据错误信息,定位到pom.xml的enforce-banned-dependencies。可能发生的错误:Java编译版本问题、被禁止依赖冲突问题。排除Java编译版本问题,查看新添加依赖包maven文件,dependency内容如下:
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<scope>compile</scope>
</dependency>
由此,基本确定问题所在。
三、错误解决
在项目pom.xml文件新添加dependency元素节点中,添加子元素排除依赖冲突:
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
重新编译,错误解决。
Maven编译错误记录:Some Enforcer rules have failed的更多相关文章
- 菜鸟调错(八)—— Maven编译错误:不兼容的类型的解决方案
泛型在实际的工作中应用非常广泛,关于泛型就不在这里赘述了,感兴趣请戳<重新认识泛型>.项目中用到了如下的泛型: public <T> T query(String sql, R ...
- (转) Eclipse Maven 编译错误 Dynamic Web Module 3.1 requires Java 1.7 or newer 解决方案
场景:在导入Maven项目时候遇到如下错误. 1 问题描述及解决 Eclipse Maven 开发一个 jee 项目时,编译时遇到以下错误:Description Resource Path Loca ...
- Maven 编译错误 Dynamic Web Module 3.0 requires Java 1.6 or newer 解决方案
Eclipse Maven 开发一个 jee 项目时,编译时遇到以下错误:Description Resource Path Location TypeDynamic Web Module 3.0 r ...
- Eclipse Maven 编译错误 Dynamic Web Module 3.0 requires Java 1.6 or newer 解决方案
Eclipse Maven 开发一个 jee 项目时,编译时遇到以下错误:Description Resource Path Location TypeDynamic Web Module 3.0 r ...
- C++ 编译错误记录
C++ _ZSt28__throw_bad_array_new_lengthv1 编译错误 出现场景:类似代码 vector<vector<int>> grid = {{1, ...
- IDEA运行报错: Maven编译错误:不再支持源选项 5。请使用 6 或更高版本
这里 记录下 这个问题的解决方案: 1:修改maven settings.xml 中的数据 这里的版本要对应现在使用的jdk版本 2:检查idea 配置 图中2块区域要一致 检查这块地方对应了自己的j ...
- VeloView源码编译错误记录——VS manifest
编译环境 Win7 Visual Studio 2008 Win32 VeloView依赖关系 1)底层 Python Qt pcap boost eigen 2)中层 liblas: boost P ...
- maven编译错误maven-assembly-plugin:2.2-beta-5:assembly (default-cli) on project
maven对项目编译时报错 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2-beta ...
- Unity 编译错误记录
1. 相关代码: NetworkView.RPC ("ReceiveMessage", RPCMode.All, message); 编译输出: Assets/cs/ClientC ...
随机推荐
- Gym - 101806Q:QueryreuQ(回文树)
A string is palindrome, if the string reads the same backward and forward. For example, strings like ...
- ps教程
http://www.16xx8.com/photoshop/xinshoujiaocheng/
- Python开发指南规范
分号 不要在行尾加分号, 也不要用分号将两条命令放在同一行. 行长度 每行不超过80个字符 例外: 长的导入模块语句 注释里的URL 不要使用反斜杠连接行. Python会将 圆括号, 中括号和花括号 ...
- Go Example--通道非阻塞
package main import ( "fmt" ) func main() { messages := make(chan string) signals := make( ...
- react 简书开发笔记
详见文章<React简书开发实战课程笔记>
- getpwnam,getgrnam,getpwent,crypt等函数
[root@bogon code]# cat a.c #include<stdio.h> #include<pwd.h> int main() { struct passwd ...
- 使用apache cxf实现webservice服务
1.在idea中使用maven新建web工程并引入spring mvc,具体可以参考https://www.cnblogs.com/laoxia/p/9311442.html; 2.在工程POM文件中 ...
- node inspector
- Spring技术内幕总结 - AOP概述
AOP是Aspect-Oriented Programming(面向方面/切面编程)的简称.Aspect是一种新的模块化机制,用来描述分散在对象.类或函数中的横切关注点.分离关注点使解决特定领域问题的 ...
- 在vue-cli 2.x 项目中,引入stylus的全局CSS变量
出处:https://blog.csdn.net/weixin_39378610/article/details/81140358