Maven joins Json-lib.jar error Missing artifact Net.sf.json-lib:json-lib:jar:2.4:compile

Source: Internet
Author: User
Tags joins

Pom.xml content:

[HTML]View Plaincopy
  1. <dependency>
  2. <groupId>net.sf.json-lib</groupId>
  3. <artifactid>json-lib</artifactid>
  4. <version>2.4</version>
  5. </Dependency>


Reported error: Missing artifact Net.sf.json-lib:json-lib:jar:2.4:compile

Cause: Json-lib is required to differentiate the JDK version, the configuration in pom.xml should be labeled classifier the specified JDK version, as in jdk15

Modified to:

[HTML]View Plaincopy
  1. <dependency>
  2. <groupId>net.sf.json-lib</groupId>
  3. <artifactid>json-lib</artifactid>
  4. <version>2.4</version>
  5. <classifier>jdk15</classifier><!--specify JDK version ---
  6. T;/dependency>


Similar problems:

Maven Javax.transaction:jta:jar:1.0.1b:compile Error Tip:

Workaround:

<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 caused by missing artifact Javax JMS JMS Jar 1.1 issue:

Workaround: The reason is that log4j has replaced the protocol in 1.2.15 and above, with the JMS conflict, so use the log4j 1.2.14 version is OK

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

Maven joins Json-lib.jar error Missing artifact Net.sf.json-lib:json-lib:jar:2.4:compile

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.