首页 > 代码库 > pom.xml里有红叉报错的解决办法

pom.xml里有红叉报错的解决办法

pom.xml里有红叉报错的解决办法一:

1.把鼠标点在报的错上发现pom.xml报如下错误:

Multiple annotations found at this line:

- Failure to transfer org.slf4j:slf4j-log4j12:jar:1.7.21 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be
reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.slf4j:slf4j-log4j12:jar:1.7.21 from/
to central (http://repo1.maven.org/maven2): ConnectException

2.将pom.xml中的这个jar包删掉

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.21</version>
</dependency>

解决办法二:

项目右键,properties,java build path,找到meaven依赖里有红叉的jar包,将pom.xml中的这个jar包删掉即可

 

pom.xml里有红叉报错的解决办法