maven 加入json-lib.jar 报错 Missing artifact net.sf.json-lib:json-lib:jar:2.4:compile
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版本-->
- t;/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>
- <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版本-->
- t;/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>