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