【问题标题】:Tests fail with unresolved dependencies error测试失败,出现未解决的依赖错误
【发布时间】:2020-12-25 17:03:21
【问题描述】:

当我运行 mvn clean test 时,我收到此错误:

[ERROR] Failed to execute goal on project prices-snapshot: Could not resolve dependencies for project com.me.cd:prices-snapshot:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: com.me.dp.te:te-client:jar:1.1.3.3, me-secure:me-secure:pom:1.1.2, com.me.as.logging:secure-logging:jar:0.6.1: Failure to find com.me.dp.te:te-client:jar:1.1.3.3 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

我的 pom 有以下 repo 配置:

<repository>
    <id>UnmanagedReleases</id>
        <url>https://nexus:8443/nexus/content/repositories/unmanaged_releases/</url>
    </repository>
<snapshotRepository>
    <!--    <id>Snapshots</id>-->
    <!--    <url>https://nexus:8443/nexus/content/repositories/snapshots/</url>-->
    <!--<uniqueVersion>false</uniqueVersion> -->
    <id>UnmanagedSnapshots</id>
    <url>https://nexus:8443/nexus/content/repositories/unmanaged_snapshots/</url>
</snapshotRepository>

罐子在回购中。我在https://repo.maven.apache.org/maven2 看不到他们。我不确定出了什么问题。是否有可能当我运行该命令时,它会在错误的仓库中查找,或者当我运行该命令时可能存在权限问题?

【问题讨论】:

  • 也许你的 settings.xml 被覆盖了?

标签: maven maven-2 nexus


【解决方案1】:

我没有特定依赖项的权限。一旦我被授予他们,我就可以运行我的测试。

【讨论】:

    猜你喜欢
    • 2023-03-16
    • 2021-09-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-04
    • 2022-12-14
    • 2021-11-27
    相关资源
    最近更新 更多