无法下载dynamodb本地依赖项

yhqotfr8  于 2021-07-13  发布在  Java
关注(0)|答案(1)|浏览(465)
testImplementation 'com.amazonaws:DynamoDBLocal:1.11.477'

我们无法下载此依赖项
https://s3-us-west-2.amazonaws.com/dynamodb-local/release/com/amazonaws/dynamodblocal/1.15.0

<Error>
         <Code>NoSuchKey</Code>
        <Message>The specified key does not exist.</Message>
        <Key>release/com/amazonaws/DynamoDBLocal/1.15.0</Key>
        <RequestId>YXQZXNMTZN9W6YWS</RequestId>
        <HostId>ET+U1aEJdzn4DJkDvCrZu45NaP+ObdB/PETMiakVu3ywln8jGpRDSC6BwGbSmyBLao465SKgsWs=</HostId>
</Error>

https://mvnrepository.com/artifact/com.amazonaws/dynamodblocal
所有版本都不起作用。

ne5o7dgx

ne5o7dgx1#

您可以试试这个(更新到v1.15.0):

maven {
        url 'https://s3-us-west-2.amazonaws.com/dynamodb-local/release/'
    }

configurations {
        dynamodb
    }

dependencies {
    testImplementation group: 'com.amazonaws', name: 'DynamoDBLocal', version: '1.15.0'
    dynamodb fileTree (dir: 'lib', include: ["*.dylib", "*.so", "*.dll"])
    dynamodb 'com.amazonaws:DynamoDBLocal:1.15.0'
}

task copyNativeDeps(type: Copy) {
    from configurations.dynamodb
    into "$project.buildDir/libs/"
}

test.dependsOn copyNativeDeps
test.doFirst {
    systemProperty "java.library.path", 'build/libs'
}

裁判:https://stackoverflow.com/a/55281942/1471293

相关问题