I'm trying to complie a bazle project, Twitter Heron. There is a maven_server I can't access in the terminal in my country :
ERROR: /home/xxx/heron/heron/healthmgr/src/java/BUILD:56:1: no such package '@org_apache_thrift_libthrift//jar': Failed to fetch Maven dependency: Could not transfer artifact org.apache.thrift:libthrift:jar:0.5.0-1 from/to org_apache_thrift_libthrift (http://maven.twttr.com): Connect to maven.twttr.com:80 timed out and referenced by '//heron/healthmgr/src/java:healthmgr-unshaded'. ERROR: Analysis of target '//scripts/packages:binpkgs' failed; build aborted. INFO: Elapsed time: 10.867s
So I download the jar needed manually from the site, put it in my local maven repository, and change the maven_server in WORKSPACE to central maven repository. But then it try to find the jar, which only available in the specific remote repository, from central maven repository. I get this:
ERROR: /home/xxx/heron/heron/healthmgr/src/java/BUILD:56:1: no such package '@org_apache_thrift_libthrift//jar': Failed to fetch Maven dependency: Could not find artifact org.apache.thrift:libthrift:jar:0.5.0-1 in org_apache_thrift_libthrift (http://central.maven.org/maven2) and referenced by '//heron/healthmgr/src/java:healthmgr-unshaded'. ERROR: Analysis of target '//scripts/packages:binpkgs' failed; build aborted. INFO: Elapsed time: 1.083s
Can bazel find dependencies in my local maven repository? Or I put the jar in a wrong path? Or is there any other thing wrong?
ls ~/.m2/repository/org/apache/thrift/libthrift/0.5.0-1
libthrift-0.5.0-1.jar libthrift-0.5.0-1.pom libthrift-0.5.0-1-sources.jar