无法使用 Maven 导入 json-simple



我正在尝试使用 maven 导入 json-simple:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>JSONtest</groupId>
<artifactId>JSONtest</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>

我试图使用图书馆,但在我看来它没有。(应该有一个名为 JSON 的包(

导入图片

然后我发现我收到此错误:无法读取com.googlecode.json-simple:json-simple:jar:1.1.1的工件描述符

我对 maven 很陌生,我缺少什么吗?

mvn install:install-file -dfile=jarlocation/json-simple.1.1.1.jar -DgroupId=com.googlecode.json-simple -DartifactId=json-simple -Dversion=1.1.1 -Dpackaging=jar

在命令提示符(cmd(中运行此命令,然后它将在您的本地maven存储库中可用。

最新更新