maven 加入json-lib.jar 報錯 Missing artifact net.sf.json-lib:json-lib:jar:2.4:compile

來源:互聯網
上載者:User

標籤:end   false   pil   cti   enc   action   article   font   需要   

文章來源:17265061

pom.xml 內容:

 
<dependency>          <groupId>net.sf.json-lib</groupId>          <artifactId>json-lib</artifactId>          <version>2.4</version>      </dependency>  

 


報錯誤:Missing artifact net.sf.json-lib:json-lib:jar:2.4:compile

原因:json-lib是需要區分jdk版本的,pom.xml中的配置應加上標籤classifier指定jdk版本,如用jdk15

修改為:

 
<dependency>     <groupId>net.sf.json-lib</groupId>     <artifactId>json-lib</artifactId>     <version>2.4</version>     <classifier>jdk15</classifier><!--指定jdk版本-->  </dependency>  

 

類似問題:

maven javax.transaction:jta:jar:1.0.1B:compile錯誤提示:

  解決辦法:

   

<dependency>   <groupId>org.hibernate</groupId>   <artifactId>hibernate</artifactId>   <version>3.2.1.ga</version>   <optional>false</optional>   <exclusions>    <exclusion>     <artifactId>jta</artifactId>     <groupId>javax.transaction</groupId>    </exclusion>   </exclusions>  </dependency>

 

log4j.jar引起的missing artifact javax jms jms jar 1.1問題:

解決辦法:原因是log4j在1.2.15及以上版本更換了協議,與jms衝突,所以用log4j的1.2.14版本就可以啦

<dependency>   <groupId>log4j</groupId>   <artifactId>log4j</artifactId>   <version>1.2.14</version></dependency>

 

maven 加入json-lib.jar 報錯 Missing artifact net.sf.json-lib:json-lib:jar:2.4:compile

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.