我正在尝试添加bcrypt依赖。我发现我应该这样添加它,但我应该粘贴在这里?从哪里可以访问存储库?
maven{
url ""
}
源代码
plugins {
id 'java'
}
group 'org.example'
version '1.0-SNAPSHOT'
repositories {
mavenCentral()
maven{
url ""
}
}
dependencies {
implementation 'org.mindrot:jbcrypt:0.4'
implementation 'at.favre.lib.crypto:bCrypt:0.4.1'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
}
test {
useJUnitPlatform()
}
我收到下面的消息:
> Execution failed for task ':compileJava'.
> > Could not resolve all files for configuration ':compileClasspath'.
> > Could not find at.favre.lib.crypto:bCrypt:0.4.1.
> Searched in the following locations:
> - https://repo.maven.apache.org/maven2/at/favre/lib/crypto/bCrypt/0.4.1/bCrypt-0.4.1.pom
> If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to
> adjust the 'metadataSources { ... }' of the repository declaration.
> Required by:
> project :
>
> Possible solution:
> - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
1条答案
按热度按时间x6yk4ghg1#
很明显是
at.favre.lib::bCrypt::0.4.1
,不是at.favre.lib.crypto
。当前版本为0。10.2; 0.4.1来自2018年,未使用。更一般地说,两者都有听起来不对。favre.lib和org.Mindrot的-你选择其中之一。