com.google.gdata - Maven 依赖项

问题描述 投票:0回答:1

我是 Maven 新手。我的 Maven 项目有以下依赖项 -

<dependency>
            <groupId>com.google.gdata</groupId>
            <artifactId>gdata-analytics</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.google.gdata</groupId>
            <artifactId>gdata-analytics-meta</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.google.gdata</groupId>
            <artifactId>gdata-client</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.google.gdata</groupId>
            <artifactId>gdata-client-meta</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.google.gdata</groupId>
            <artifactId>gdata-core-cpha</artifactId>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.google.collect</groupId>
            <artifactId>google-collect</artifactId>
            <scope>compile</scope>
        </dependency>

当我运行 mvn clean install 命令时,出现以下错误 -

 Failed to execute goal on project cpha-service: Could not resolve dependencies for project cpha-common:cpha-service:jar:3.4.5: The following artifacts could not be resolved: com.google.gdata:gdata-client:jar:1.0 (present, but unavailable), com.google.gdata:gdata-client-meta:jar:1.0 (present, but unavailable), com.google.gdata:gdata-core-cpha:jar:1.0 (present, but unavailable), com.google.collect:google-collect:jar:1.0-rc1 (present, but unavailable): Could not find artifact com.google.gdata:gdata-client:jar:1.0 in repo2 (https://repo1.maven.org/maven2/)

当我查看父级 maven pom.xml 中配置的存储库时,我看到以下内容,但遍历链接 - https://repo1.maven.org/maven2/com/google/gdata 不会产生这样的包。我该如何解决这个问题?似乎没有存储库有 com.google.gdata 包。

<repository>
            <id>repo2</id>
            <name>repo2</name>
            <url>https://repo1.maven.org/maven2/</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </snapshots>
        </repository>
java maven dependency-management
1个回答
0
投票

您发布的错误消息与 cpha-common:cpha-service 工件相关,而不是与 com.google.gdata 工件相关。后者可在官方 Maven 存储库中找到。所以我认为它与您的父项目有关。

© www.soinside.com 2019 - 2024. All rights reserved.