Importing scala libraries with Maveen is refused, how to resolve this?

Viewed 141

I am wrestling with importing required jar files and deploying them into scala projects after writing build.sbt script. Resolvers deny downloading any scala libraries from neither sonar and maveen 2 resolvers. My scala version is 2.13.0 and sbt is 1.6.1 after compiling sbt builds the program yields errors stated below.

 download error: Caught java.io.IOException (Server returned HTTP
 response code: 400 for URL:

  https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.0
   /scala-library-2.13.0 .pom) while downloading
   https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.0
   /scala-library-2.13.0 .pom [error] download error: Caught
   java.net.URISyntaxException (Illegal character in path at index 68:
   http://download.java.net/maven/2/org/scala-lang/scala-library/2.13.0
   /scala-library-2.13.0 .pom) while downloading
   http://download.java.net/maven/2/org/scala-lang/scala-library/2.13.0
   /scala-library-2.13.0 .pom [error] download error: Caught
   java.net.ConnectException (Connection refused (Connection refused))
   while downloading
   http://repo.typesafe.com/typesafe/releases/org/scala-lang/scala-library/2.13.0
   /scala-library-2.13.0 .po [error] Error downloading
   org.json4s:json4s-native_2.13.0 :3.5.1

Here is my build.sbt script which means error does'nt stem from syntax error.

lazy val commonSettings = Seq(
  organization := "scala_REINFORCEMENTLEARNING",
  organizationName:="trial",
  scalaVersion := "2.13.0",
  version := "0.1.0-SNAPSHOT"
)

lazy val root = (project in file("."))
    .settings(
      commonSettings,
      name := "sarsamora",
      libraryDependencies ++= Seq(
        "org.scalatest" %% "scalatest" % "3.2.10" % "test",
        "com.typesafe" % "config" % "1.2.1",
        "commons-io" % "commons-io" % "2.4",
        "jline" % "jline" % "2.12.1",
        "org.json4s" %% "json4s-native" % "3.5.1",
        // logging
        "ch.qos.logback" %  "logback-classic" % "1.1.7",
        "com.typesafe.scala-logging" %%  "scala-logging" % "3.4.0",
        "org.scala-graph" %% "graph-core" % "1.11.3",
        "org.scalanlp" %% "breeze" % "0.13",
        "org.scalanlp" %% "breeze-natives" % "1.1",
        "org.scalanlp" %% "breeze-viz" % "1.1",
        "org.jfree" % "jfreechart" % "1.0.19"
      )
    )
lazy val compiler = (project in file(".")).dependsOn(root)
    .settings(commonSettings:_*)

  resolvers ++= Seq(
    ("Typesafe" at "http://repo.typesafe.com/typesafe/releases/").withAllowInsecureProtocol(true),
    ("Java.net Maven2 Repository" at "http://download.java.net/maven/2/").withAllowInsecureProtocol(true),



    )
1 Answers

Look's like you've got an extra whitespace in your version number:

https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.0/scala-library-2.13.0 .pom

Fix the Scala version in your build.sbt and it should be it.

Related