MAVEN uses notes to load json-lib issues

Source: Internet
Author: User

A description of the problem (IDEA):

1, CONFIGURED in Pom.xml

<Dependency>          <groupId>Net.sf.json-lib</groupId>          <Artifactid>Json-lib</Artifactid>          <version>2.4</version></Dependency>

2, the project code inside is not import Json-lib class

Second, reason analysis
1, the jar must not be downloaded successfully;
2, suspicion of a central warehouse problem.

Third, solve the problem:
1, change the central warehouse to: http://repo1.maven.org/maven2/
2, right-click on Pom.xml, select Maven>>reimport, re-download jar (preferably delete JSON-related directories in the local jar directory)
3, found 2.4 of the directory, there is no jar
4, then opened http://repo1.maven.org/maven2/net/sf/json-lib/json-lib/2.4/, found that there is no json-lib-2.4.jar, only
Json-lib-2.4-jdk15.jar      
5, then modify dependency, add classifier node:
        <Dependency>            <groupId>Net.sf.json-lib</groupId>            <Artifactid>Json-lib</Artifactid>            <version>2.4</version>            <classifier>Jdk15</classifier>        </Dependency>

6, continue reimport, successfully download Json-lib-2.4-jdk15.jar.

Iv. Other

1, restore the central warehouse to https://maven.alfresco.com/nexus/content/groups/public/, also can reimport to jar package;

2, so from the above, is mainly dependency configuration problems, if the next occurrence of similar problems, directly to the central warehouse to view the corresponding jar format;

3, open the address of two central warehouse, personal feeling http://repo1.maven.org/maven2/resources to a whole




MAVEN uses notes to load json-lib issues

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.