Is it possible to have pants force coursier to use...
# general
r
Is it possible to have pants force coursier to use a proxy? I can't seem to find a way to get past this error:
Copy code
Exception in thread "main" java.lang.Exception: Error while getting <https://github.com/coursier/jvm-index/raw/master/index.json>: download error: Caught java.net.ConnectException (Connection timed out) while downloading <https://github.com/coursier/jvm-index/raw/master/index.json>
I've tried setting
coursier-url-template
but it only seems to work for the initial coursier binary download, and the advice here doesn't seem to work when coursier is being run by pants https://get-coursier.io/docs/other-proxy.
h
You can use this option to point coursier to custom repos: https://www.pantsbuild.org/docs/reference-coursier#repos
r
This value is already set to use our internal artifactory, so if it were looking for something there and not finding it, I assume the url in the error message would be our artifactory instead of github.
I thought it might be because I'm setting these values in
pants.toml
Copy code
tool_jdk = "zulu:8.0.372"
jdk = "zulu:8.0.372"
But removing them didn't change anything.
h
Ah, right, that index is where coursier looks for JVMs, not for maven packages.
r
Would it be reasonable to add the ability to pass this
jvm-index
argument to coursier from pants? https://get-coursier.io/docs/cli-java#jvm-index I think if I could have coursier use our own index file then I could do what I want to do without worrying about being blocked by our proxy.
h
Yes, I think that is necessary!
It should be pretty straightforward if you want to take a crack at it
r
Great, yeah I would like to try. Should I make an issue first?
h
That would be great!