learning sbt / failed to download slf4j

1,158 views
Skip to first unread message

Luc

unread,
Apr 25, 2014, 1:58:40 PM4/25/14
to lif...@googlegroups.com
Hello,

I'm trying to switch from maven to sbt. (Motivation are to check speed differences, and have a better understanding of dependencies of my system).
So it's running fine with maven. I could run the sbt tutorial also.

Problem comes with the first trial to update: (this is the same result whichever is my sbt configuration file).
I tried different variations from https://www.assembla.com/spaces/liftweb/wiki/using_sbt

Any idea how to fix this?

Thanks for any hints!

$sbt update
[info] Building project safmh 1.0 against Scala 2.9.1
[info]    using LiftProject with sbt 0.7.4 and Scala 2.7.7
[info]
[info] == update ==
[warn]  [NOT FOUND  ] org.slf4j#slf4j-api;1.7.2!slf4j-api.jar (1ms)
[warn] ==== Local Maven Repository: tried
[warn]   file:///home/nuage/.m2/repository/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::              FAILED DOWNLOADS            ::
[warn]  :: ^ see resolution messages for details  ^ ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.slf4j#slf4j-api;1.7.2!slf4j-api.jar
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[info]
[warn] :: problems summary ::
[warn] :::: WARNINGS
[warn]          [NOT FOUND  ] org.slf4j#slf4j-api;1.7.2!slf4j-api.jar (1ms)
[warn]  ==== Local Maven Repository: tried
[warn]    file:///home/nuage/.m2/repository/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.jar
[warn]          ::::::::::::::::::::::::::::::::::::::::::::::
[warn]          ::              FAILED DOWNLOADS            ::
[warn]          :: ^ see resolution messages for details  ^ ::
[warn]          ::::::::::::::::::::::::::::::::::::::::::::::
[warn]          :: org.slf4j#slf4j-api;1.7.2!slf4j-api.jar
[warn]          ::::::::::::::::::::::::::::::::::::::::::::::
[info]
[info] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
[error] sbt.ResolveException: download failed: org.slf4j#slf4j-api;1.7.2!slf4j-api.jar
[info] == update ==
[error] Error running update: sbt.ResolveException: download failed: org.slf4j#slf4j-api;1.7.2!slf4j-api.jar
[info]
[info] Total time: 2 s, completed 25-Apr-2014 19:48:06
[info]
[info] Total session time: 3 s, completed 25-Apr-2014 19:48:06
[error] Error during build.

Antonio Salazar Cardozo

unread,
Apr 25, 2014, 2:01:21 PM4/25/14
to lif...@googlegroups.com
It looks like it's only searching in your local maven repository. Did you mess with the resolvers at all? Usually sbt searches
at least Maven central, which it doesn't seem to be doing in this interaction.
Thanks,
Antonio

Luc

unread,
Apr 25, 2014, 2:13:48 PM4/25/14
to lif...@googlegroups.com
Thanks for the hint, no luck so far.

As in the example, I modified the resolvers, here is my build.sbt :

name := "safmh"

libraryDependencies
+= "org.mongodb" %% "casbah" % "2.5.0"
 
scalaVersion
:= "2.9.1"

seq
(webSettings: _*)

// If using JRebel with 0.1.0 of the sbt web plugin
//jettyScanDirs := Nil
// using 0.2.4+ of the sbt web plugin
//scanDirectories in Compile := Nil

// you can also add multiple repositories at the same time
resolvers
++= Seq(
 
"Scala Tools Releases" at "http://scala-tools.org/repo-releases/",
 
"Java.net Maven2 Repository" at "http://download.java.net/maven/2/"
)

libraryDependencies
++= {
  val liftVersion
= "2.5.1" // Put the current/latest lift version here
 
Seq(
   
"net.liftweb" %% "lift-webkit" % liftVersion % "compile->default",
   
"net.liftweb" %% "lift-mapper" % liftVersion % "compile->default",
   
"net.liftweb" %% "lift-wizard" % liftVersion % "compile->default")
}

// when using the sbt web app plugin 0.2.4+, use "container" instead of "jetty" for the context
// Customize any further dependencies as desired
libraryDependencies
++= Seq(
 
"org.eclipse.jetty" % "jetty-webapp" % "9.1.0.M0" % "container",
 
"org.scala-tools.testing" % "specs_2.9.0" % "1.6.8" % "test", // For specs.org tests
 
"junit" % "junit" % "4.8" % "test->default", // For JUnit 4 testing
 
"javax.servlet" % "servlet-api" % "2.5" % "provided->default",
 
"com.h2database" % "h2" % "1.2.138", // In-process database, useful for development systems
 
"ch.qos.logback" % "logback-classic" % "0.9.26" % "compile->default" // Logging
)

I also tried to change the resolvers confs (without anything, and without the Maven2 line) with no luck.
Also "http://download.java.net/maven/2/org/" has no  "slf4j" directory...
Also my previous "sbt update" did successfully downloaded many dependencies.

Any hints? I'll try to find where "slf4j" should be downloaded...

Luc

unread,
Apr 25, 2014, 2:31:45 PM4/25/14
to lif...@googlegroups.com
So I solved my problem with

rm -r ~.ivy2/
mv
~.m2 ~.m2.bak

It looks like some people had problem with slf4j this week.
It may be that sbt may be blocked by having a slf4j folder with .pom and no .jar, but don't thrust me there I'm really leaning now...

Thanks for the hint, it helped me to find this solution !

Antonio Salazar Cardozo

unread,
Apr 26, 2014, 9:51:26 AM4/26/14
to lif...@googlegroups.com
I'm glad you figured it out, that looked like a pretty bizarre one heh. Do note that at least the scala tools resolver is
way outdated. You'll probably want to have Sonatype instead:


Thanks,
Antonio

Diego Medina

unread,
Apr 28, 2014, 7:48:35 AM4/28/14
to Lift
and for others I just updated the wiki entry.


--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Diego Medina
Lift/Scala consultant
di...@fmpwizard.com
http://fmpwizard.telegr.am
Reply all
Reply to author
Forward
0 new messages