Gradle不会下载fabric-sdk-java的依赖项

时间:2019-08-19 12:23:30

标签: dependencies build.gradle hyperledger-fabric hyperledger-fabric-sdk-java

我是Gradle的新手,他试图在超分类帐结构上集成并运行我的Java应用程序。

我添加了此代码以下载依赖项。

repositories {

    mavenLocal()
    mavenCentral()
    maven {
            url "https://nexus.hyperledger.org/content/repositories/snapshots/"}


dependencies {

     implementation  'org.hyperledger.fabric-sdk-java:fabric-sdk-java:1.4.4'
     implementation group:  'org.hyperledger.fabric-chaincode-java', name: 
                           'fabric-chaincode-shim', version: '1.4.2'
     implementation group:  'org.json', name: 'json', version: '20180813'

     testImplementation  'org.junit.jupiter:junit-jupiter:5.4.2'
     testImplementation  'org.assertj:assertj-core:3.11.1'
     testImplementation  'org.mockito:mockito-core:2.+'
}

刷新build.gradle文件成功执行,但未下载任何内容。请让我知道什么是解决方案。谢谢

1 个答案:

答案 0 :(得分:1)

我在build.gradle中使用了这些

repositories {
    mavenCentral()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.12'
    // https://mvnrepository.com/artifact/org.hyperledger.fabric-sdk-java/fabric-sdk-java
    compile group: 'org.hyperledger.fabric-sdk-java', name: 'fabric-sdk-java', version: '1.4.7'
    // https://mvnrepository.com/artifact/org.hyperledger.fabric-chaincode-java/fabric-chaincode-shim
    compile group: 'org.hyperledger.fabric-chaincode-java', name: 'fabric-chaincode-shim', version: '1.4.3'
    // https://mvnrepository.com/artifact/com.owlike/genson
    compile group: 'com.owlike', name: 'genson', version: '0.93'
}