Pom.xml content:
[HTML]View Plaincopy
- <dependency>
- <groupId>net.sf.json-lib</groupId>
- <artifactid>json-lib</artifactid>
- <version>2.4</version>
- </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
- <dependency>
- <groupId>net.sf.json-lib</groupId>
- <artifactid>json-lib</artifactid>
- <version>2.4</version>
- <classifier>jdk15</classifier><!--specify JDK version ---
- 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