1. 程式人生 > >maven錯誤:is duplicated in the reactor

maven錯誤:is duplicated in the reactor

 code-instrument-java git:(masterv2-2.2.2-solr) ✗ mvn clean package -Dmaven.test.skip=true
[INFO] Scanning for projects...
[ERROR] [ERROR] Project 'com.cloudwise.javaagent:cloudwise-javacode-plugin-solr:2.2.0' is duplicated in the reactor @ 
[ERROR] Project 'com.cloudwise.javaagent:cloudwise-javacode-plugin-solr:2.2.0'
is duplicated in the reactor -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DuplicateProjectException

來自網路:https://blog.csdn.net/DPnice/article/details/81317720
父輩中定義了多個子module,在父的module的pom.xml中定義了這個關係,子module的pom.xml中將子module的同級或者父輩作為自己的子module,出現了衝突,刪掉相應的依賴即可。
這個依賴只需要在子module或者父module中定義一次。

我自己的錯誤,是父輩中有多個子module,子module B pom.xml直接複製了子module A pom.xml導致子moduleAde依賴重複出現。