maven的pom.xml中出现Multiple annotations found at this line:错误
Posted earthchinagl
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了maven的pom.xml中出现Multiple annotations found at this line:错误相关的知识,希望对你有一定的参考价值。
一般这个错误出现在pom.xml的第一行,出错信息如下:
Multiple annotations found at this line:
- Missing artifact stax:stax-api:jar:1.0.1
- ArtifactTransferException: Failure to transfer stax:stax-api:jar:1.0.1 from http://dist.codehaus.org/ was cached in the local repository, resolution will
not be reattempted until the update interval of codehaus has elapsed or updates are forced. Original error: Could not transfer artifact stax:stax-api:jar:1.0.1
from/to codehaus (http://dist.codehaus.org/): No connector available to access repository codehaus (http://dist.codehaus.org/) of type legacy using the
available factories AsyncRepositoryConnectorFactory, WagonRepositoryConnectorFactory
- ArtifactTransferException: Failure to transfer stax:stax-api:jar:1.0.1 from http://maven.aliyun.com/nexus/content/groups/public/ was cached in the
local repository, resolution will not be reattempted until the update interval of aliMaven has elapsed or updates are forced. Original error: Could not transfer
artifact stax:stax-api:jar:1.0.1 from/to aliMaven (http://maven.aliyun.com/nexus/content/groups/public/): No response received after 60000
原因:缺少指定的依赖,并且pom.xml中还没有加入此依赖,
解决:
(1) 首先根据stax:stax-api:jar:1.0.1在pom.xml添加配置信息,如下所示:
(2) 如果本地有此依赖的路径,就删除此路径,然后重新 Maven4Myeclipse --> Update Project...即可
以上是关于maven的pom.xml中出现Multiple annotations found at this line:错误的主要内容,如果未能解决你的问题,请参考以下文章
Eclipse创建Maven工程总是出现pom.xml报错怎么办
Eclipse创建Maven工程总是出现pom.xml报错怎么办
创建maven项目pom.xml出现错误(依赖Missing)
maven中pom.xml出现ArtifactTransferException: Failure to transfer 错误