【问题标题】:Spring Social Google - maven dependency not foundSpring Social Google - 未找到 Maven 依赖项
【发布时间】:2015-12-08 20:38:39
【问题描述】:

我找不到 spring-social-google (https://github.com/GabiAxel/spring-social-google) 的 maven 依赖项。 根据文档,依赖项是这样定义的:

<dependency>
  <groupId>org.springframework.social</groupId>
  <artifactId>spring-social-google</artifactId>
  <version>${org.springframework.social-google-version}</version>
</dependency>

但是它不存在于 Maven 存储库中。 谁能确认一下?

【问题讨论】:

  • 出于好奇,您的 POM 中是否定义了 org.springframework.social-google-version 属性?如果是,为哪个值?
  • 当然是。多么愚蠢的错误......版本号前面有一个额外的“>”符号:(我没有正确阅读maven错误,我只是认为在maven存储库中查找工件有问题......

标签: maven spring-social spring-social-google


【解决方案1】:

根据Maven仓库,spring-social-google的latest版本是1.0.0.RELEASE,如下:

<dependency>
   <groupId>org.springframework.social</groupId>
   <artifactId>spring-social-google</artifactId>
   <version>1.0.0.RELEASE</version>
</dependency>

将它添加到您的 POM 就足够了。在您的情况下,您使用的是版本的占位符,${org.springframework.social-google-version}

因此,在您的 POM 中,您应该有以下内容:

<properties>
   <org.springframework.social-google-version>1.0.0.RELEASE</org.springframework.social-google-version>
</properties>

Maven 将替换你的依赖声明中的属性值并解决它。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-09-18
    • 2021-07-24
    • 2020-10-08
    • 1970-01-01
    • 2017-06-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多