Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala sbt unable to find commons-logging-1.0.4.jar

Tags:

scala

sbt

I am trying to get an open source project running with scala that is built using sbt.

I downloaded sbt and set it up. But when I try to run sbt from the command line, I get the following error.

:: problems summary :: :::: WARNINGS [NOT FOUND ] commons-logging#commons-logging;1.0.4!commons-logging.jar (1ms)

==== Maven2 Local: tried

file:///Users/jeremy/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar

  ::::::::::::::::::::::::::::::::::::::::::::::

  ::              FAILED DOWNLOADS            ::

  :: ^ see resolution messages for details  ^ ::

  ::::::::::::::::::::::::::::::::::::::::::::::

  :: commons-logging#commons-logging;1.0.4!commons-logging.jar

  ::::::::::::::::::::::::::::::::::::::::::::::

:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS download failed: commons-logging#commons-logging;1.0.4!commons-logging.jar Error during sbt execution: Error retrieving required libraries (see /Users/jeremy/sourceCode/public/scalaConsole/project/boot/update.log for complete log) Error: Could not retrieve sbt 0.10.1

Any ideas on how I could resolve this.

I have scala 2.9.1 and sbt version 0.10.1

Thanks

like image 630
fohtoh Avatar asked Sep 18 '11 19:09

fohtoh


2 Answers

It worked for me after I removed both ~/.m2/repository/commons-logging and ~/.ivy2/cache/commons-logging. If sbt founds none of this two paths it will actually try and download the commons logging package.

like image 149
Ionuț G. Stan Avatar answered Oct 18 '22 15:10

Ionuț G. Stan


Sometimes maven doesn't download the files correctly and you'll only find a .pom file in the repository and no commons-logging-1.0.4.jar file. First I removed ~/.m2/repository/commons-logging. Then I downloaded the jar manually from http://search.maven.org/remotecontent?filepath=commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar and finally installed the jar using the mvn install command:

mvn install:install-file -DgroupId=commons-logging -DartifactId=commons-logging -Dversion=1.0.4 -Dpackaging=jar -Dfile=commons-logging-1.0.4.jar
like image 5
Travis Stevens Avatar answered Oct 18 '22 15:10

Travis Stevens