Build failed with an exception. Error resolving plugin com.google.protobuf


(Melwin Dmello) #1

Hello,

I am executing hyper-ledger example given in the below link:

My environment is on the office network:
VirtualBox having ubuntu-16.04.3-desktop-amd64 on Windows 7 Professional.

I am currently stuck at the part where I need to do the gradle clean build (See “Build the Java shim client JAR” in the link)

When I execute the command >> gradle -b build.gradle clean
I get the below FAILURE exceptions:

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘/home/melwin/mychaincode/src/github.com/hyperledger/fabric/core/chaincode/shim/java/build.gradle’ line: 30

  • What went wrong:
    Error resolving plugin [id: ‘com.google.protobuf’, version: ‘0.7.6’]

Could not resolve all dependencies for configuration ‘detachedConfiguration1’.
Could not determine artifacts for com.google.protobuf:com.google.protobuf.gradle.plugin:0.7.6
Could not get resource ‘https://plugins.gradle.org/m2/com/google/protobuf/com.google.protobuf.gradle.plugin/0.7.6/com.google.protobuf.gradle.plugin-0.7.6.jar’.
Could not HEAD ‘https://plugins.gradle.org/m2/com/google/protobuf/com.google.protobuf.gradle.plugin/0.7.6/com.google.protobuf.gradle.plugin-0.7.6.jar’.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

  • 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

BUILD FAILED in 3s

What I’ve tried till now:

But the error still exists.
Can someone pls suggest?

Thanks,
Melwin.


(Melwin Dmello) #2

After some searching, if found this useful link:

I could resolve my issue by settings this on the terminal:
export http_proxy=http://:@<PROXY_ADDRESS>:
export https_proxy=http://:@<PROXY_ADDRESS>: