Sbt build failed - module not found: org.scala-sbt # sbt; 0.13.5

I am unsuccessfully trying to configure sbt build for an existing Scala project that previously worked fine, but all the documents remained. It seems that the wrong URL is being replaced with an allow dependency for "sbt.jar" ...

Inside my_project dir:

ear application.xml web-logic-application.xml project target config-classes *.class src main java package(java-utils) scala package(scala) my_app.properties spring.xml ... webapp WEB-INF web.xml test scala resources build.sbt 

my_project / build.sbt

 name := "my_project" organization := "my.app" version := "1.0" scalaVersion := "2.10.2" ... libraryDependencies += ... 

C: \ Users \ svc \ .sbt \ repositories :

 [repositories] local maven-central typesafe: http://repo.typesafe.com/typesafe/releases/ typesafe-snapshots: http://repo.typesafe.com/typesafe/snapshots/ 

C: \ Users \ svc \ .sbt \ 0.13.5 \ plugins \ plugins.sbt :

 resolvers += "typesave" at "http://repo.typesafe.com/typesafe/releases" addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.5.0") addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.4.2") 

C: \ Program Files (x86) \ sbt \ conf \ sbtconfig.txt (not changed after installing sbt on the local PC):

 # Set the java args to high */ -Xmx512M -XX:MaxPermSize=256m -XX:ReservedCodeCacheSize=128m # Set the extra SBT options */ -Dsbt.log.format=true 

The magazine shows:

 Getting org.scala-sbt sbt 0.13.5 ... :: problems summary :: :::: WARNINGS module not found: org.scala-sbt#sbt;0.13.5 ==== local: tried C:\Users\svc\.ivy2\local\org.scala-sbt\sbt\0.13.5\ivys\ivy.xml -- artifact org.scala-sbt#sbt;0.13.5!sbt.jar: C:\Users\svc\.ivy2\local\org.scala-sbt\sbt\0.13.5\jars\sbt.jar ==== Maven Central: tried http://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.5/sbt-0.13.5.pom -- artifact org.scala-sbt#sbt;0.13.5!sbt.jar: http://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.5/sbt-0.13.5.jar ==== typesafe: tried http://repo.typesafe.com/typesafe/releases/org/scala-sbt/sbt/0.13.5/sbt-0.13.5.pom -- artifact org.scala-sbt#sbt;0.13.5!sbt.jar: http://repo.typesafe.com/typesafe/releases/org/scala-sbt/sbt/0.13.5/sbt-0.13.5.jar :::::::::::::::::::::::::::::::::::::::::::::: :: UNRESOLVED DEPENDENCIES :: :::::::::::::::::::::::::::::::::::::::::::::: :: org.scala-sbt#sbt;0.13.5: not found :::::::::::::::::::::::::::::::::::::::::::::: :::: ERRORS Server access Error: Connection refused: connect url=http://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.5/sbt-0.13.5.pom Server access Error: Connection refused: connect url=http://repo1.maven.org/maven2/org/scala-sbt/sbt/0.13.5/sbt-0.13.5.jar Server access Error: Connection refused: connect url=http://repo.typesafe.com/typesafe/releases/org/scala-sbt/sbt/0.13.5/sbt-0.13.5.pom Server access Error: Connection refused: connect url=http://repo.typesafe.com/typesafe/releases/org/scala-sbt/sbt/0.13.5/sbt-0.13.5.jar ... 

In fact - I can see "sbt" above http://repo.typesafe.com/typesafe/releases/org.scala-sbt/sbt/0.13.5/jars/sbt.jar but it is missing from the URL, generated by the framework:

via http://repo1.maven.org/maven2/org/scala -sbt / sbt / 0.13.5 / sbt-0.13.5.jar or above http://repo.typesafe.com/typesafe/releases/org/ scala-sbt / sbt / 0.13.5 / sbt-0.13.5.jar

Can anyone suggest?

+5
source share
3 answers

The last workable option.

my_project \ build.sbt looks like this:

 name := "my_project" organization := "my.app" version := "1.0" scalaVersion := "2.10.2" resolvers ++= Seq[sbt.Resolver]( "Local Maven Repository@wildfly " at "file:///M:/", "Local Maven Repository@common " at "file:///" + Path.userHome.absolutePath + "/.m2/repository" ) seq(webSettings :_*) ... libraryDependencies += ... 

C: \ Users \ svc \ .sbt \ repositories - deleted

Posted by sbt-launch.jar in C: \ Program Files (x86) \ sbt \ bin

Posted by build.properties in the my_project / project folder with this line inside:

 sbt.version=0.13.6 

(which version does not matter, it works with any version 0.13. ~ - I checked)

Placed plugins.sbt in the folder C: \ Users \ svc.sbt \ 0.13 \ plugins with these lines inside:

 resolvers += "typesave" at "http://repo.typesafe.com/typesafe/releases" addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.3.0") addSbtPlugin("com.earldouglas" % "xsbt-web-plugin" % "0.4.2") 

Deleted C: \ Users \ svc \ .sbt \ 0.13.5

Placed sbtconfig.txt in the C: \ Program Files (x86) \ sbt \ conf directory with these lines inside:

 # Set the java args to high -Xms1G -Xmx2G -XX:MaxPermSize=512m -XX:ReservedCodeCacheSize=128m # Set the extra SBT options -DproxySet=true -Dsbt.log.format=true #-Dhttp.proxyHost=my-proxy-in.com #-Dhttp.proxyPort=8080 #-Dhttps.proxyHost=my-proxy-in.com #-Dhttps.proxyPort=8080 #-Dhttp.proxyUser=my_user #-Dhttp.proxyPassword="my_psw" -Dhttp.proxyHost=my-proxy-out.com -Dhttp.proxyPort=8080 -Dhttps.proxyHost=my-proxy-out.com -Dhttps.proxyPort=8080 

In the case of some artifacts placed on a corporate closed network (as for me), you have to run sbt twice - with two different proxies (comments / no comments).

+1
source

Try installing ssl certificates. You can try using the command below. This helped me solve the same problem. (Ubuntu 15.04)

 update-ca-certificates -f 
+16
source

Have you tried to delete the ~/.sbt/repositories file? The default should be enough.

If this still does not work, try updating your sbt startup program to the latest version.

In addition, it is good practice to have a build.properties file in the my_project/project directory with this line inside:

 sbt.version=0.13.6 

This will force the implementation of the sbt version for the project, instead of using the launch version.

+2
source

Source: https://habr.com/ru/post/1207157/


All Articles