Maven: Downloading a jar with unconventional name
I am trying to download http://mvnrepository.com/artifact/net.sf.jso开发者_JS百科n-lib/json-lib/2.1 in my POM. However, the actual jar is named json-lib-2.1-jdk15.jar. Maven is looking for the artifact name + version, hence json-lib-2.1.jar. So, it's not being found. How can I fix this?
Do something like this:
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.2.2</version>
<classifier>jdk15</classifier>
<type>jar</type>
</dependency>
精彩评论