0

我是 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文件成功执行,但不下载任何内容。请让我知道什么是解决方案。谢谢

4

1 回答 1

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'
}
于 2019-11-17T12:55:54.160 回答