Problem
I'm not sure if this is intentional or not, so this could be either a bug or a documentation task.
The JarJar Abrams plugin has a string heuristic that remaps strings that look like class names. coursier.repositories resembles a class name, so it gets remapped from coursier.repositories to coursierapi.shaded.coursier.repositories due to this shade rule.
The COURSIER_REPOSITORIES env var remains unchanged, of course.
I've been working on updating some of the builds at my place of work and this really threw me for a loop.
I think it would make sense to put forward some effort to retain the original coursier.repositories system property, for a few reasons.
- The relocation is undocumented
- coursier.repositories is easier to set/manage at runtime (like in SBT) than COURSIER_REPOSITORIES. Env vars cannot be set at runtime without some relaxing of newer JVM security constraints, and different platforms require different setup for this (see how
sbt-dotenv does it for example). We can of course always just set "coursierapi.shaded.coursier.repositories" as well, it just seems a bit reundant.
- Users can reasonably derive most coursier repositories from sbt repository definitions, then set them as coursier.repositores, which would resolve weirdness around multiple different places using coursier's apis slightly differently.
Fix
If not intentional, this could be fixed with another rule that precedes the coursier.** rule.
A rename rule from "coursier.repositories" to "coursier.repositories" should resolve this for now.
I'm considering if it's worth the effort of making an upstream contribution to JarJar Abrams to provide a ban-list of exact strings that the shader should ignore.
Problem
I'm not sure if this is intentional or not, so this could be either a bug or a documentation task.
The JarJar Abrams plugin has a string heuristic that remaps strings that look like class names.
coursier.repositoriesresembles a class name, so it gets remapped fromcoursier.repositoriestocoursierapi.shaded.coursier.repositoriesdue to this shade rule.The
COURSIER_REPOSITORIESenv var remains unchanged, of course.I've been working on updating some of the builds at my place of work and this really threw me for a loop.
I think it would make sense to put forward some effort to retain the original
coursier.repositoriessystem property, for a few reasons.sbt-dotenvdoes it for example). We can of course always just set "coursierapi.shaded.coursier.repositories" as well, it just seems a bit reundant.Fix
If not intentional, this could be fixed with another rule that precedes the
coursier.**rule.A
renamerule from "coursier.repositories" to "coursier.repositories" should resolve this for now.I'm considering if it's worth the effort of making an upstream contribution to JarJar Abrams to provide a ban-list of exact strings that the shader should ignore.