Search code examples
scalajavafximportdependenciessbt

Problem when adding dependencies to build.sbt


I have the following snippet of code in my build.sbt file for a Scala project:

// for scalaFX
libraryDependencies += "org.scalafx" %% "scalafx" % "16.0.0-R24",
scalacOptions       += "-Ymacro-annotations",

// for scalaFXML
libraryDependencies += "org.scalafx" %% "scalafxml-core-sfx8" % "0.5",

// for terminalFX
libraryDependencies += "com.kodedu.terminalfx" % "terminalfx" % "1.2.0",

resolvers           += "terminalfx-repo" at "https://github.com/javaterminal/TerminalFX/blob/master/releases",

However, I faced this error:

not found: https://repo1.maven.org/maven2/com/kodedu/terminalfx/terminalfx/1.2.0/terminalfx-1.2.0.pom

Would anyone know why it attempted to search for the .pom file in this path and not the one specified in the resolver? Any help or guidance would be appreciated!


Solution

  • Probably because a rendered preview of a file in a master branch on a GitHub is not a Maven artifact. It renders a HTML page, and resolver expects XML.

    You added

    https://github.com/javaterminal/TerminalFX/blob/master/releases
    

    while the documentations suggests

    https://github.com/javaterminal/terminalfx/raw/master/releases
    

    This raw instead of blob is a huge difference.