More Java posts
March 07, 2007
json-lib, maven2 and java 5
At work I'm replacing our use of org.json with json-lib. The org.json isn't available from a maven repository while json-lib is, and json-lib appears better written. However, json-lib comes in java 1.3 and java 5 (1.5) versions so the jar files in the repository have names like json-lib-1.0.1-jdk15.jar. How do you write a dependency entry for that? Well, you have to use the classifier element.
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>1.0.1</version>
<classifier>jdk15</classifier>
</dependency>
Posted by Alex at March 07, 2007 11:19 PMComments
Post a comment