开发者

Maven: Downloading a jar with unconventional name

开发者 https://www.devze.com 2023-02-08 04:39 出处:网络
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 artifac

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>
0

精彩评论

暂无评论...
验证码 换一张
取 消