Re: Bazel not picking up proxy settings to download external dependencies

1,145 views
Skip to first unread message

Philipp Wollermann

unread,
Jul 27, 2016, 5:03:29 AM7/27/16
to Jaron Horowitz, bazel-discuss, kcho...@google.com
+Kristina Chodorow Similar report to the other one. Not sure if this was supposed to be fixed by https://github.com/bazelbuild/bazel/issues/587 or if it's a separate issue?

On Fri, Jul 22, 2016 at 4:00 PM Jaron Horowitz <mvn...@gmail.com> wrote:
Hi, I'm trying to use bazel's external dependencies system, but it looks like it's not picking up my proxy settings.


This is the version that I'm using:
Build label: 0.3.0
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Jun 10 11:38:23 2016 (1465558703)
Build timestamp: 1465558703
Build timestamp as int: 1465558703

My proxy settings seem to be set:
$ echo $http_proxy $https_proxy
http://squid-inet.ac.internal:3128 http://squid-inet.ac.internal:3128

And, this is in my WORKSPACE file:
maven_jar(
    name = "com_google_guava_guava",
    artifact = "com.google.guava:guava:18.0",
    sha1 = "cce0823396aa693798f8882e64213b1772032b09",
)

However, when I do a bazel build, I get an error that it couldn't connect to maven:

BUILD:18:1: no such package '@com_google_guava_guava//jar': Failed to fetch Maven dependency: Could not transfer artifact com.google.guava:guava:jar:18.0 from/to com_google_guava_guava (https://repo1.maven.org/maven2/): Connect to repo1.maven.org:443 timed out and referenced by

What could be the issue here?

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/454ffbab-6adb-48ba-afee-b8df94968b55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pem.s...@gmail.com

unread,
Jul 8, 2019, 7:02:07 PM7/8/19
to bazel-discuss
I also get "Failed to fetch Maven dependency" behind company proxy. I think it's a problem with telling bazel to use settings.xml for maven external dependency.

Jingwen Chen

unread,
Jul 9, 2019, 2:57:22 AM7/9/19
to pem.s...@gmail.com, bazel-discuss
As answered on the StackOverflow question, please use rules_jvm_external for managing your Maven artifacts (maven_jar is deprecated). It supports proxies as well.

On Tue, Jul 9, 2019 at 7:02 AM <pem.s...@gmail.com> wrote:
I also get "Failed to fetch Maven dependency" behind company proxy.  I think it's a problem with telling bazel to use settings.xml for maven external dependency.

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages