maven重复标记“dependencies”错误

lhcgjxsq  于 2021-06-07  发布在  Kafka
关注(0)|答案(1)|浏览(671)

我想把Apache·Kafka也包括进来http://search.maven.org/#artifactdetails%7corg.apache.kafka%7ckafka\u 2.9.2%7c0.8.0-β1%7cn%2fa
但是,当我将其包含在pom.xml中并运行“mvn package”时,会出现以下错误:

[WARNING] The POM for org.apache.kafka:kafka_2.9.2:jar:0.8.0-beta1 is invalid, transitive
 dependencies (if any) will not be available: 1 problem was encountered while building the
 effective model 

[FATAL] Non-parseable POM
 /Users/vikasr/work/more/misc/maven/scalaProject/scalaMavenTest/repository/org/apache/kafka/kafka_2.9.2/ 0.8.0-beta1/kafka_2.9.2-0.8.0-beta1.pom: 
Duplicated tag: 'dependencies' 
(position: START_TAG seen ...</dependencies>\n    <dependencies>... @36:19)  @ line 36, column 19

我做错什么了吗?看起来maven对“依赖项”被使用两次并不满意。任何帮助都将不胜感激。

n6lpvg4x

n6lpvg4x1#

是的,控制台告诉你需要做什么。只需删除重复的标签 <dependencies> ,如果要添加更多依赖项,只需添加新标记即可 <dependency> 现有的 <dependencies> 标签!

相关问题