Maven Failure to find com.alibaba:fastjson:pom:1.2.49


Failure to find com.alibaba:fastjson:pom:1.2.49 in https://pkgs.abc.com/maven was cached in the local repository, 
resolution will not be reattempted until the update interval of central has elapsed or updates are forced
雖然我在pom.xml指定了1.2.70版本,仍然報錯:找不到fastjson 1.2.49版本
原因是某些包里依賴了舊版本的fastjson,可以采用逐個注釋的方法,找到哪個包依賴了舊版本,並
用exclusion排除導入對fastjson的依賴:
<!-- 指定新版本的fastjson: -->
<dependency>
  <groupId>com.alibaba</groupId>
  <artifactId>fastjson</artifactId>
  <version>1.2.70</version>
</dependency>

<!-- 排除導入fastjson依賴: -->
<dependency>
   <groupId>com.weibo</groupId>
   <artifactId>motan-core</artifactId>
   <version>${motan.version}</version>
   <exclusions>
      <exclusion>
         <groupId>com.alibaba</groupId>
         <artifactId>fastjson</artifactId>
      </exclusion>
   </exclusions>
</dependency>


免責聲明!

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



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