【发布时间】:2017-01-08 23:51:52
【问题描述】:
我试图在我的 pom.xml 中包含 GSON,但 IntelliJ 告诉我找不到依赖项“com.google.code.gson:gson:2.8.0”。我曾尝试调用 Maven 存储库,但它仍然无法正常工作。也忽略注释掉的行。
这是我的 pom 文件的副本。
<?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>TagChooser</groupId>
<artifactId>TagChooser 1.7.10</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<!-- Gson: Java to Json conversion -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.0</version>
<scope>compile</scope>
</dependency>
<!--<dependency>-->
<!--<groupId>mkremins</groupId>-->
<!--<artifactId>fanciful</artifactId>-->
<!--<version>0.4.0-SNAPSHOT</version>-->
<!--</dependency>-->
</dependencies>
<repositories>
<repository>
<id>central</id>
<name>Maven repository</name>
<url>http://repo1.maven.org/maven2</url>
</repository>
<!--<repository>-->
<!--<id>stealthyone-repo</id>-->
<!--<url>http://repo.stealthyone.com/content/groups/public</url>-->
<!--</repository>-->
</repositories>
【问题讨论】:
标签: java maven intellij-idea gson