gpt4 book ai didi

java - 为什么我的 Maven 找不到 stripe 库?

转载 作者:行者123 更新时间:2023-11-30 04:29:50 25 4
gpt4 key购买 nike

使用 intellij 我可以在外部库中看到该包,但是当我使用 maven 构建时,出现以下问题:

运行时:

mvn clean package

我收到此错误:

Failure to find com.stripe:stripe-java:jar:${stripe-version} in http://repo1.maven.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

版本在哪里:

<stripe-version>1.1.16</stripe-version>

我也尝试了 1.1.13 和 1.1.14,但得到了同样的错误。

当使用 -e 开关运行时,我得到:

Failure to find com.stripe:stripe-java:jar:${stripe-version} in http://repo1.maven.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
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:170)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:171)
... 22 more
Caused by: org.sonatype.aether.resolution.DependencyResolutionException: Failure to find com.stripe:stripe-java:jar:${stripe-version} in http://repo1.maven.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
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:412)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:164)
... 23 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Failure to find com.stripe:stripe-java:jar:${stripe-version} in http://repo1.maven.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
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:541)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:220)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:395)
... 24 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Failure to find com.stripe:stripe-java:jar:${stripe-version} in http://repo1.maven.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
at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:190)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:430)
... 26 more

我可以在这里看到版本:http://search.maven.org/#browse%7C788949441

最佳答案

依赖项下载得很好:

<dependency>
<groupId>com.stripe</groupId>
<artifactId>stripe-java</artifactId>
<version>1.1.16</version>
</dependency>

似乎您在定义/使用 strip 版本属性时遇到问题:

<properties>
<stripe.version>1.1.16</stripe.version>
</properties>

<!--- ... -->
<version>${stripe.version}</version>

关于java - 为什么我的 Maven 找不到 stripe 库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14906783/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com