Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coursier is unable to determine Scala version when cut off from the public Internet #2838

Open
grepwood opened this issue Sep 8, 2023 · 0 comments

Comments

@grepwood
Copy link

grepwood commented Sep 8, 2023

Hello,

I'm trying to run Coursier in a network where there is no gateway out of here. Except, we have one machine blessed with heavily moderated Internet access, that does all the gatekeeping and moderation. It acts as a mirror for a lot of things. We can access let's say, pretty much every pre-defined Maven resolver, as long as we specify the mirror address for each.

I have the following settings in my ~/.config/coursier/mirror.properties:

central.from=https://repo1.maven.org/maven2
central.to=https://mirror.organization/maven2
apache.from=https://repo.maven.apache.org/maven2
apache.to=https://mirror.organization/apache-maven2
sonatype.from=https://oss.sonatype.org/control/repositories/public
sonatype.to=https://mirror.organization/sonatype
typesafe.from=https://repo.typesafe.com/typesafe/releases
typesafe.to=https://mirror.organization/typesafe
ivy-releases.from=https://repo.typesafe.com/typesafe/ivy-releases
ivy-releases.to=https://mirror.organization/ivy-releases
sbt-plugins.from=https://repo.scala-sbt.org/scalasbt/sby-plugin-releases
sbt-plugins.to=https://mirror.organization/sbt-plugins
bintray.from=https://dl.bintray.com
bintray.to=https://mirror.organization/bintray
jcenter.from=https://jcenter.bintray.com
jcenter.to=https://mirror.organization/jcenter

I'm not sure if I got it right, but that's what I imagines the list should look like in my scenario, following the hints from https://scalameta.org/metals/docs/troubleshooting/proxy/#mirrors-still-do-not-work-for-all-dependencies and https://www.scala-sbt.org/1.x/docs/Resolvers.html#Predefined+resolvers

Then I try running:

coursier setup

and I get

Exception in thread "main" java.lang.Exception: coursier.install.AppArtifactScalaDependenciesNotFound: Can't find a scala version suffix for com.lihaoyi::ammonite:latest.release (likely a non existing module or version)

That is completely untrue. I can get Ammonite for Scala 2.13.1 through my organization's mirror.

By the way, don't you think all the *.from directives are a little, you know, redundant since we kinda expect Java/Scala/Coursier et al to know these addresses already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant