Maven打包时控制台出现警告:The artifact...has been relocated to...

问题描述

Maven打包时控制台出现警告:The artifact...has been relocated to...

[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2

原因分析:

1.3.2之后的版本groupId换成了commons-io。所以我们在导入依赖的时候是因为这个原因才给出警告,那解决方式很简单,我们只需要更换commons-io依赖的groupId就好了


解决方案:

原maven依赖:

<dependency>  
     <groupId>org.apache.commons</groupId>  
     <artifactId>commons-io</artifactId>  
     <version>1.3.2</version>  
</dependency>  

更改groupId后

<dependency>  
     <groupId>commons-io</groupId>  
     <artifactId>commons-io</artifactId>  
     <version>1.3.2</version>  
</dependency>  

猜你喜欢

转载自blog.csdn.net/u011974797/article/details/131413087