【问题标题】:Maven dependency for GSON 2.8.0 in IntelliJ IDEAIntelliJ IDEA 中 GSON 2.8.0 的 Maven 依赖项
【发布时间】:2017-03-03 20:38:32
【问题描述】:

我的 pom.xml 中有依赖项:

   <dependency>
       <groupId>com.google.code.gson</groupId>
       <artifactId>gson</artifactId>
       <version>2.8.0</version>
   </dependency>

但 IDEA 告诉我看不到 2.8.0 版,只能看到 2.2.4 版。 但是我可以在https://mvnrepository.com/artifact/com.google.code.gson/gson/2.8.0看到新版本

也许我只是不知道如何设置存储库?

【问题讨论】:

  • 请参阅this answer,了解 Maven 集成中常见问题的一般诊断。
  • 致 CrazyCoder,谢谢,我做了一切,但没有任何帮助。
  • 第一步是始终验证项目的命令行构建是否正常工作。

标签: maven intellij-idea


【解决方案1】:

我只是这样使用它:

    <dependency>
       <groupId>com.google.code.gson</groupId>
       <artifactId>gson</artifactId>
       <version>2.8.1</version>
   </dependency>

对我来说效果很好。

【讨论】:

    猜你喜欢
    • 2012-07-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-10-31
    • 2015-07-15
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多