duplicate declaration of version (?) @ line 30, column 21 'parent.relativePath' of POM com.jty:ms-author-manage:1.0-SNAPSHOT


問題: 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.jty:ms-system-base:jar -> duplicate declaration of version (?) @ line 30, column 21
'parent.relativePath' of POM com.jty:ms-author-manage:1.0-SNAPSHOT (D:\Projects\ms-springcloud-learn\ms-system-service\ms-author-manage\pom.xml) points at com.jty:ms-system-service instead of com.jty:ms-springcloud-learn, please verify your project structure @ line 5, column 13

兩個問題

在子工程pom.xml
1.添依賴其他工程的版本號

  ...
<!--添加自定義依賴-->
        <dependency>
            <groupId>com.jty</groupId>
            <artifactId>ms-system-base</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>
  ...
  1. 添加父工程依賴路徑
    <parent>
      ...
       <relativePath>../../pom.xml</relativePath>
        <version>1.0-SNAPSHOT</version>
    </parent>


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM