简体   繁体   English

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

[英]What is the Maven dependency for Directory API Client Library for Java?

My maven project uses Directory API Client Library for Java and i needed to include it as a dependency. 我的maven项目使用Directory API Client Library for Java,我需要将它作为依赖项包含在内。 But in Directory API Client Library for Java page, under the Add Library to Your Project title when i select maven as my build environment it always showed, 但是在Directory API Client Library for Java页面中,当我选择maven作为我的构建环境时,在Add Library to Your Project标题下,它总是显示,

"Add the following to your pom.xml file: “将以下内容添加到pom.xml文件中:

This library is in the process of uploading to the central Maven repository. 该库正在上传到中央Maven存储库。 Please check back in a few hours." 请几个小时后再回来看看。“

for last couple of weeks. 过去几周。

Since i have used google drive dependency in another project as follows, 由于我在另一个项目中使用了谷歌驱动器依赖,如下所示,

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

I tried to so the same by including, 我试着这样做,包括,

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

but it didn't worked. 但它没有奏效。

And for the recode my pom having following repository as well, 而对于重新编码,我的pom也有以下存储库,

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

What is the correct maven dependency to use Directory API Client Library for Java. 使用Directory API Client Library for Java的正确maven依赖是什么。

At the bottom of the page, there is a link as follows, 在页面底部,有如下链接,

See all versions available on the Maven Central Repository. 查看Maven Central Repository上提供的所有版本。

I have went through that page and found a previous version of Directory API Client Library for Java. 我浏览了该页面,找到了以前版本的Directory API Client Library for Java。 By looking at it's pom i have tried following dependency and it worked. 通过查看它的pom我尝试了依赖它并且它起作用了。

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

Then I tried to update the version to latest as follows and also worked. 然后我尝试将版本更新为最新版本如下并且也有效。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM