一、错误信息

添加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的更多相关文章

  1. 菜鸟调错(八)—— Maven编译错误:不兼容的类型的解决方案

    泛型在实际的工作中应用非常广泛,关于泛型就不在这里赘述了,感兴趣请戳<重新认识泛型>.项目中用到了如下的泛型: public <T> T query(String sql, R ...

  2. (转) Eclipse Maven 编译错误 Dynamic Web Module 3.1 requires Java 1.7 or newer 解决方案

    场景:在导入Maven项目时候遇到如下错误. 1 问题描述及解决 Eclipse Maven 开发一个 jee 项目时,编译时遇到以下错误:Description Resource Path Loca ...

  3. 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 ...

  4. 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 ...

  5. C++ 编译错误记录

    C++ _ZSt28__throw_bad_array_new_lengthv1 编译错误 出现场景:类似代码 vector<vector<int>> grid = {{1, ...

  6. IDEA运行报错: Maven编译错误:不再支持源选项 5。请使用 6 或更高版本

    这里 记录下 这个问题的解决方案: 1:修改maven settings.xml 中的数据 这里的版本要对应现在使用的jdk版本 2:检查idea 配置 图中2块区域要一致 检查这块地方对应了自己的j ...

  7. VeloView源码编译错误记录——VS manifest

    编译环境 Win7 Visual Studio 2008 Win32 VeloView依赖关系 1)底层 Python Qt pcap boost eigen 2)中层 liblas: boost P ...

  8. 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 ...

  9. Unity 编译错误记录

    1. 相关代码: NetworkView.RPC ("ReceiveMessage", RPCMode.All, message); 编译输出: Assets/cs/ClientC ...

随机推荐

  1. Python算法——递归思想

    编程语言在构建程序时的基本操作有:内置数据类型操作.选择.循环.函数调用等,递归实际属于函数调用的一种特殊情况(函数调用自身),其数学基础是数学归纳法.递归在计算机程序设计中非常重要,是许多高级算法实 ...

  2. webapi core2.1 Identity.EntityFramework Core进行配置和操作数据 (一)没什么用

    https://docs.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-2.1&am ...

  3. 线程---同步(synchronized)

    实现线程同步的一种方式介绍: 思路: 首先,需要被协调的类,先实现线程,并重写run方法 然后,在被协调的类中私有化控制器,控制器实例化,由构造器带入. 其次,由控制器对象具体负责调用. 举例:循环输 ...

  4. 【java编程】String拼接效率探究

    转载:https://maimai.cn/article/detail?fid=1139790318&efid=0-ey6pWIySdmkx82QO-OSw 字符串,是Java中最常用的一个数 ...

  5. GoLand tool tips

    goland format code (on save ) preference -> tool -> file watcher  then ,select go fmt 2, highl ...

  6. golang fatal error: concurrent map read and map write

    调试程序的时候,为了打印map中的内容 ,直接 使用seelog 的方法打印 map中的内容到日志,结果出现 “concurrent map read and map write”的错误,导致程序异常 ...

  7. setjmp与longjmp非局部跳转函数的使用

    [root@bogon code]# cat c.c #include<stdio.h> #include<setjmp.h> static jmp_buf env;//定义全 ...

  8. pghoard 面向云存储的pg 备份&&恢复工具

    pghoard 面向云存储的pg 备份&&恢复工具 包含的特性 自动定期basebackup 自动事务日志(WAL / Xlog软件)备份(使用pg_receivexlog, arch ...

  9. cocos2d-x游戏开发 跑酷(三) 人物跑动

    原创.转载请注明出处:http://blog.csdn.net/dawn_moon/article/details/21245881 好吧.最终要跑起来了. 要实现跑酷须要用到帧动画,什么是帧动画,不 ...

  10. C# to IL 3 Selection and Repetition(选择和重复)

    In IL, a label is a name followed by the colon sign i.e ":". It gives us the ability to ju ...