1

我正在尝试从http://search.maven.org/#artifactdetails%7Corg.apache.kafka%7Ckafka_2.9.2%7C0.8.0-beta1%7CN%2FA中包含 apache-kafka

但是当我将它包含在我的 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 对“依赖项”被使用两次并不满意。任何帮助,将不胜感激。

4

1 回答 1

0

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

于 2013-07-15T06:32:30.597 回答