代码之家  ›  专栏  ›  技术社区  ›  DarRay

Directory API Client Library for Java的Maven依赖关系是什么?

  •  5
  • DarRay  · 技术社区  · 11 年前

    我的maven项目使用DirectoryAPI Client Library for Java,我需要将其作为依赖项。但在 Directory API Client Library for Java 页面,当我选择maven作为我的构建环境时,它总是显示在AddLibrarytoYourProject标题下,

    “将以下内容添加到pom.xml文件中:

    这个库正在上传到中央Maven存储库。请在几个小时后再查看。"

    过去几周。

    由于我在另一个项目中使用了谷歌驱动依赖,如下所示,

        <dependency>
            <groupId>com.google.apis</groupId>
            <artifactId>google-api-services-drive</artifactId>
            <version>v2-rev60-1.13.2-beta</version>
        </dependency>
    

    我也试图这样做,

        <dependency>
            <groupId>com.google.apis</groupId>
            <artifactId>google-api-services-directory</artifactId>
            <version>v1-rev28-1.17.0-rc</version>
        </dependency>
    

    但它没有起作用。

    为了记录我的pom,还有以下存储库,

        <repository>
            <id>google-api-services</id>
            <url>http://google-api-client-libraries.appspot.com/mavenrepo</url>
        </repository>
    

    使用DirectoryAPI Client Library for Java的正确maven依赖关系是什么。

    1 回复  |  直到 11 年前
        1
  •  2
  •   DarRay    11 年前

    在页面底部有一个链接,

    看见 all versions available on the Maven Central Repository.

    我浏览了那个页面,发现了以前版本的DirectoryAPI Client Library for Java。通过查看它的pom,我尝试了遵循依赖关系,并成功了。

        <dependency>
            <groupId>com.google.apis</groupId>
            <artifactId>google-api-services-admin</artifactId>
            <version>directory_v1-rev22-1.16.0-rc</version>
        </dependency>
    

    然后,我尝试将版本更新为最新版本,如下所示,并且也成功了。

        <dependency>
            <groupId>com.google.apis</groupId>
            <artifactId>google-api-services-admin</artifactId>
            <version>directory_v1-rev28-1.17.0-rc</version>
        </dependency>