‘dependencies.dependency.(groupId:artifactId:type:classifier)’ must be unique: org.apache.poi:poi:jar -> duplicate declaration of version ${poi.version} @ line 203, column 15
对maven项目进行clean时,我的报错是:
[INFO] Scanning for projects…
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.zle:uav:jar:1.0.0-SNAPSHOT
[WARNING] ‘dependencies.dependency.(groupId:artifactId:type:classifier)’ must be unique: org.apache.poi:poi:jar -> duplicate declaration of version ${poi.version} @ line 203, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
我们可以看到dependencies.dependency.(groupId:artifactId表示提示地点在pom文件的dependencies中的dependency里,groupId:artifactId:type:classifier必须是唯一的:后面提示org.apache.poi:poi:jar,则我们全局搜索org.apache.poi,我在我的pom文件中搜索到了两个org.apache.poi
删除其中一个,就好了
再clean就不报错了