alexarchambault on gh-pages
Update website (compare)
alexarchambault on master
Merge page cli-setup.md into cl… (compare)
alexarchambault on gh-pages
Update website (compare)
alexarchambault on master
Update cli-installation.md (no … Add scala-cli to default app li… Merge pull request #2415 from a… (compare)
COURSIER_REPOSITORIES="https://mycompany.com/nexus/content/groups/public" COURSIER_CACHE=/tmp/yo/ coursier fetch scalafmt
Exception in thread "main" coursier.install.AppArtifacts$ScalaDependenciesNotFound: Can't find a scala version suffix for org.scalameta::scalafmt-cli:latest.release (likely a non existing module or version)
I'm getting this exception when I'm trying coursier fetch
with a private repository. Anyone has any idea what might be going on?
mirrors.properties
to point central.to correctly my local maven proxy. On top of that, I'm passing -r https://maven.company.com/nexus/content/groups/public --no-default
to coursier. Even then... it's trying to connect to repo1.maven.org
. I don't understand why.
coursier/cache-action
, we're seeing warnings like reserveCache failed
. Is it OK? Or is something going wrong? /cc @mijicdpath/to/bootstrap!coursier/bootstrap/launcher/jars/___.jar
instead of the typical file:/path/to/__main__.py
or jar:/path/to/___.jar
Hi, I'm trying to use a local maven repo. When I do coursier fetch scalafmt
it fails with Caused by: coursier.install.AppArtifacts$ScalaDependenciesNotFound: Can't find a scala version suffix for org.scalameta::scalafmt-cli:latest.release (likely a non existing module or version)
However when I write the exact version number (after consulting the internet on whatever the latest version, couriser succeeds):
[siddhant@localhost ~] coursier fetch org.scalameta:scalafmt-cli_2.13:2.7.5
Does anyone have ideas as to what might be going on or how do I debug this?
coursier fetch org.scalameta::scalafmt-cli:2.7.5
but that doesn't work either (notice the ::
)
brew install coursier/formulas/coursier
and brew tap coursier/formulas
. Each time, I get these errors:Error: Invalid formula: /usr/local/Homebrew/Library/Taps/coursier/homebrew-formulas/coursier.rb
coursier: Unsupported special dependency :java
Error: Cannot tap coursier/formulas: invalid syntax in tap!
Hi @lolgab
Does coursier need special treatment to update GraalVM to 21.0.0 ? If so, is it tracked somewhere?
Coursier uses a JSON file with an index of JVMs from Jabba project. Version 21.0 of GraalVM was only recently added there. For some reason Coursier doesn't pick this up automatically, but if you pass an additional option, the new GraalVM can be used. The option is
--jvm-index https://raw.githubusercontent.com/shyiko/jabba/master/index.json
sbt test:coursierDependencyTree
but it is not working the same forCan anyone see why this might be giving me the below errors?
./coursier --help --no-default -r "https://repo.corp.com/repository/maven-public/"
It appears to be ignoring the command line args?
Error while downloading https://repo1.maven.org/maven2/com/github/alexarchambault/case-app_2.12/2.0.0-M9/case-app_2.12-2.0.0-M9.jar: Connection reset, ignoring it
Error while downloading https://repo1.maven.org/maven2/com/github/alexarchambault/argonaut-shapeless_6.2_2.12/1.2.0-M11/argonaut-shapeless_6.2_2.12-1.2.0-M11.jar: Connection reset, ignoring it
Error while downloading https://repo1.maven.org/maven2/com/github/alexarchambault/case-app-util_2.12/2.0.0-M9/case-app-util_2.12-2.0.0-M9.jar: Connection reset, ignoring it
Error while downloading https://repo1.maven.org/maven2/com/chuusai/shapeless_2.12/2.3.3/shapeless_2.12-2.3.3.jar: Connection reset, ignoring it
Error while downloading https://repo1.maven.org/maven2/com/github/alexarchambault/case-app-annotations_2.12/2.0.0-M9/case-app-annotations_2.12-2.0.0-M9.jar: Connection reset, ignoring it
/Users/jast/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/jetbrains/scala/scala-compiler-indices-protocol_2.13/1.0.13/scala-compiler-indices-protocol_2.13-1.0.13-javadoc.jar
and want the /Users/jast/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/
and org/jetbrains/scala/scala-compiler-indices-protocol_2.13/1.0.13/scala-compiler-indices-protocol_2.13-1.0.13-javadoc.jar
portions separately?
Hi, seems like Coursier cannot resolve the latest version of the netty-transport-native-epoll library for Mac and Linux:
When I add "io.netty" % "netty-transport-native-epoll" % "4.1.60.Final”
dependency to the build, Coursier fails retrieveing the artifact with the following error:
Caused by: lmcoursier.internal.shaded.coursier.cache.ArtifactError$NotFound: not found: https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.60.Final/netty-transport-native-epoll-4.1.60.Final-linux-aarch64.jar
[error] at lmcoursier.internal.shaded.coursier.cache.FileCache.$anonfun$download$12(FileCache.scala:244)
[error] at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659)
[error] at scala.util.Success.$anonfun$map$1(Try.scala:255)
[error] at scala.util.Success.map(Try.scala:213)
[error] at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
[error] at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
[error] at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
[error] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] at java.base/java.lang.Thread.run(Thread.java:834)
[error] (update) lmcoursier.internal.shaded.coursier.error.FetchError$DownloadingArtifacts: Error fetching artifacts:
[error] https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.60.Final/netty-transport-native-epoll-4.1.60.Final-linux-aarch64.jar: not found: https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.60.Final/netty-transport-native-epoll-4.1.60.Final-linux-aarch64.jar
Cause: coursier tries to download the artifact with linux-aarch64
prefix, while the actual prefix is linux-aarch_64
Is there any way to configure the correct prefix for transitive dependency?
Hi there. I want to implement an --offline
mode for my application where I constrain coursier to not look up anything on the network, but only locally. For example, in Versions
and Resolve
. If I print the default repositories, I get
IvyRepository(Pattern(List(Const(file:/home/hhrutz/.ivy2/local/), Var(organisation), Const(/), Var(module), Const(/), Opt(List(Const(scala_), Var(scalaVersion), Const(/))), Opt(List(Const(sbt_), Var(sbtVersion), Const(/))), Var(revision), Const(/), Var(type), Const(s/), Var(artifact), Opt(List(Const(-), Var(classifier))), Const(.), Var(ext))), None, None, true, true, true, true, None, true)
MavenRepository(https://repo1.maven.org/maven2, None, None, true, true)
and if I add withRepositories(Nil)
, coursier no longer includes Maven Central, but unfortunately the local location is also wiped. Is there a shortcut, for getting that location? Like (hypothetically)
withRespositories(Repositories.local :: Nil)
?
val repos = if (offline) LocalRepositories.ivy2Local :: Nil else Resolve.defaultRepositories
not found: value sbtCoursierVersion
error mentioned here occurs. I didn't bother to try to instruct IntelliJ to use different ./sbt
, but adding something like def sbtCoursierVersion = "1.2.3"
to build.sbt
made the problem go away apparently. Might be worth looking into fixing for "standard sbt".
Here is a solution for obtaining the pom file that works with maven repositories - I basically peeked into MavenRepository
:
val cacheArt = cache.FileCache[Task](cfg.artDir)
val appDepPOM = appDep.withTransitive(false)
val resolvePOM = Resolve(cacheResolve).addDependencies(appDepPOM).withRepositories(repos)
resolvePOM.future().foreach { resolution =>
println("---- RESOLVED ARTIFACTS ----")
resolution.artifacts().foreach { a =>
println(s"url = ${a.url}") // ; extra = ${a.extra}")
}
println("----")
val artifacts = Artifacts(cacheArt).withResolution(resolution).addTransformArtifacts { sq =>
sq.map { case (dependency, _ /*pub*/, art0) =>
// cf. MavenRepository - metadataArtifact
val metadataPub = Publication(dependency.module.name.value, Type.pom, Extension.pom, Classifier.empty)
val metadataURL = {
val u = art0.url
assert (u.endsWith(".jar"))
s"${u.substring(0, u.length - 4)}.${metadataPub.ext.value}"
}
val metadataArtifact =
Artifact(
metadataURL,
Map.empty,
Map.empty,
changing = false, // XXX TODO what is this?,
optional = true,
authentication = art0.authentication
).withDefaultChecksums.withDefaultSignature
(dependency, metadataPub, metadataArtifact)
}
}
val fetch = new Fetch(resolvePOM, artifacts, None)
fetch.futureResult().foreach { res =>
println("---- FETCHED ARTIFACTS ----")
res.artifacts.foreach { case (_, f) =>
println(f)
}
println("----")
}
}
---- RESOLVED ARTIFACTS ----
url = https://repo1.maven.org/maven2/de/sciss/mellite-app_2.13/2.48.0/mellite-app_2.13-2.48.0.jar
----
---- FETCHED ARTIFACTS ----
/home/hhrutz/.local/share/mellite/default/cs/https/repo1.maven.org/maven2/de/sciss/mellite-app_2.13/2.48.0/mellite-app_2.13-2.48.0.pom
----
is there a public API to achieve this? Also, this fails for local ivy repository, because the .pom
is in a different directory. How do I get the Repository
belonging to each artifact in a Resolution
?
cs
tool to setup my Scala dev env (JDK, SBT, etc.), but I found an issue when installing SBT this way. I have a situation where SBT gets executed with the -batch
flag; this flag is correctly recognized by SBT installed via Homebrew, but not by SBT installed via Coursier.sbt
command installed by cs
is actually from coursier/sbt-runner
while the one installed by Homebrew probably comes from sbt/sbt-launcher-package
; does that sound right?cs launch scala3-compiler:3.0.0-RC1
cs launch
from code, capturing stdout and stderr?
cs complete -r sonatype:snapshots org.scalameta:metals_2.12:
https://oss.sonatype.org/content/repositories/snapshots/org/scalameta/metals_2.12/maven-metadata.xml