[英]Cannot import json-simple with Maven
I am trying to import json-simple with maven using : 我正在尝试使用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>
I tried to use the library, but it does not appear to me. 我尝试使用该库,但对我而言似乎没有。 (there should be a package called json) (应该有一个名为json的包)
Then I found out that I am getting this error : Failed to read artifact descriptor for com.googlecode.json-simple:json-simple:jar:1.1.1 然后我发现我遇到了这个错误:无法读取com.googlecode.json-simple:json-simple:jar:1.1.1的工件描述符
I am pretty new to maven, is there something I am missing ? 我对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 mvn install:安装文件-Dfile = jarlocation / json-simple.1.1.1.jar -DgroupId = com.googlecode.json-simple -DartifactId = json-simple -Dversion = 1.1.1 -Dpackaging = jar
Run this command in Command Prompt(cmd), then it will be available in you local maven repository. 在命令提示符(cmd)中运行此命令,然后它将在您本地的maven存储库中可用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.