你好,我是 Maven 项目的新手,我一直在尝试使用 JSON 库。 我目前正在使用 eclipse,用 java 编码。 问题是,eclipse 没有检测到包 org.json
我已将 jar 添加到构建路径中。
我已经更改了 pom.xml 中的依赖项
但 Eclipse 一直告诉我 pom.xml 中有错误:
missing artifact org.json:json-java:jar:20230618
我也尝试过更改版本号; 1.0 或 20230618
我不知道如何继续,我应该在 pom.xml 中写入在哪里可以找到 jar 吗? 这是我在 pom.xml 中编写的依赖项
<dependency>
<groupId>org.json</groupId>
<artifactId>json-java</artifactId>
<version>20230618</version>
<type>jar</type>
</dependency>
该 jar 名为 json-java.jar
感谢您的宝贵时间
我已遵循嚎叫者的建议; 删除 type 行,将 json-java 更改为 json 很好。