Maven:缺少net.sf.json-lib [英] Maven: missing net.sf.json-lib

查看:99
本文介绍了Maven:缺少net.sf.json-lib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在中央存储库中找到了net.sf.json-lib /a>.复制粘贴的依赖项(2.3版),然后在构建时出现此错误:

I found net.sf.json-lib in the central repository. Copy-pasted the dependency (with version 2.3), and then when I build I get this error:

[INFO] Unable to find resource 'net.sf.json-lib:json-lib:jar:2.2.3' in repository central (http://repo1.maven.org/maven2)

[ERROR] BUILD ERROR
[INFO] ---------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) net.sf.json-lib:json-lib:jar:2.3

  Try downloading the file manually from the project website.

我尝试使用2.2.3版,但是遇到了同样的错误.为什么会出现此错误?我可以通过在本地安装它来覆盖它,但是我想了解问题出在哪里.

I tried using version 2.2.3, but I'm getting the same error. Why am I getting this error? I can override it by installing it locally, but I want to understand what the problem is.

编辑-我从本地存储库中删除了该程序包,然后重试,这一次出现校验和错误.我想我应该向json-lib提交错误报告.

Edit - I deleted the package from my local repository, and tried again, this time getting a checksum error. I guess I should file a bug report with json-lib.

[WARNING] *** CHECKSUM FAILED - Error retrieving checksum file for net/sf/json-lib/json-lib/2.3/json
-lib-2.3.pom - IGNORING

推荐答案

查看maven-central存储库:

Looking at the maven-central repo:

http://repo1.maven.org/maven2/net/sf/json-lib/json-lib/2.4/

您需要为此依赖性指定一个分类器:jdk13或jdk15,如下所示:

you need to specify a classifier for this depependency: either jdk13 or jdk15, like this:

    <dependency>
        <groupId>net.sf.json-lib</groupId>
        <artifactId>json-lib</artifactId>
        <version>2.4</version>
        <classifier>jdk15</classifier>
    </dependency>

这篇关于Maven:缺少net.sf.json-lib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆