mavennpmsbtwebjarsmaven-central

Unresolved Webjars dependency even though it seems to be in Maven Central


I am trying to use React Bootstrap -library having this in my build.sbt

"org.webjars.npm" % "react-bootstrap" % "0.27.2"

This has worked before, but some version dependency must have recently changed, as trying to compile the project now gives following error.

 [warn]     ::::::::::::::::::::::::::::::::::::::::::::::
 [warn]     ::          UNRESOLVED DEPENDENCIES         ::
 [warn]     ::::::::::::::::::::::::::::::::::::::::::::::
 [warn]     :: org.webjars.npm#js-tokens;[3.0.0,4),[4.0.0,5): not found
 [warn]     ::::::::::::::::::::::::::::::::::::::::::::::
 [warn]
 [warn]     Note: Unresolved dependencies path:
 [warn]         org.webjars.npm:js-tokens:[3.0.0,4),[4.0.0,5)
 [warn]           +- org.webjars.npm:loose-envify:[1.0.0,2)
 [warn]           +- org.webjars.npm:warning:[2.0.0,3)
 [warn]           +- org.webjars.npm:react-prop-types:[0.3.0,0.4)
 [warn]           +- org.webjars.npm:react-bootstrap:0.27.2     

Trying to add it in Webjars-page says that all versions (4.0.0, 3.0.2, 3.0.1, 3.0.0) have already been added to Maven Central.

Starting Deploy
Got package info for org.webjars.npm js-tokens 4.0.0
Determining dependency graph
No dependencies.
WebJar org.webjars.npm js-tokens 4.0.0 has already been deployed    

So my questions are

  1. What does the version syntax js-tokens;[3.0.0,4),[4.0.0,5) mean?
  2. How can I add the required version so that the Scala Play project compiles again?

Solution

  • So searched a bit further (didn't search well enough, apparently).

    1. Syntax js-tokens;[3.0.0,4),[4.0.0,5) means larger than or equal of 3.0.0 but below 4 or larger than or equal of 4.0.0 but below 5, two sets, I think. Someone else can clarify, but that's what I got from https://maven.apache.org/enforcer/enforcer-rules/versionRanges.html :)
    2. Maven Version Range Sets in Transitives Do Not Work. This can be handled currently with this

      dependencyOverrides += "org.webjars.npm" % "js-tokens" % "3.0.2"