如何在代理背后构建java链码

如何在代理背后构建java链码,java,hyperledger-fabric,hyperledger-chaincode,Java,Hyperledger Fabric,Hyperledger Chaincode,有人知道如何在代理背后构建java链码吗? 在实例化代理背后的java链码时,我得到了以下错误 Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build

有人知道如何在代理背后构建java链码吗? 在实例化代理背后的java链码时,我得到了以下错误

Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "Gradle build
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim:1.+.
  Required by:
      project :
   > Failed to list versions for org.hyperledger.fabric-chaincode-java:fabric-chaincode-shim.
      > Unable to load Maven meta-data from https://repo.maven.apache.org/maven2/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/maven-metadata.xml.
         > Could not get resource 'https://repo.maven.apache.org/maven2/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/maven-metadata.xml'.
            > Could not GET 'https://repo.maven.apache.org/maven2/org/hyperledger/fabric-chaincode-java/fabric-chaincode-shim/maven-metadata.xml'.
               > Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.196.215] failed: connect timed out

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

1 actionable task: 1 executed
BUILD FAILED in 37s
"

我正在使用示例链码(fabirc samples/chaincode/chaincode-example02/java)

我自己解决了这个问题。
解决方案是在实例化链码之前构建具有如下代理设置的映像

FROM hyperledger/fabric-javaenv

ENV JAVA_OPTS "-Dhttps.proxyPort=8080 -Dhttps.proxyHost=your.proxy.com - Dhttp.proxyPort=8080 -Dhttp.proxyHost=your.proxy.com"

您似乎对Maven本身存在基本的连接问题,而不是与链码本身相关的任何问题。你能访问吗?@roddyoffrozenpeas似乎我能访问repo.maven.apache.org`$curl-x repo.maven.apache.org索引of/Index of/hr>2016-01-19 14:00-
`可能相关:@Roddy of the freezed Peas谢谢!!我将尝试上面提到的解决方案。