Scala sbt cannot find commons-logging-1.0.4.jar

I am trying to get an open source project working with scala which is created using sbt.

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

:: summary 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 :::::::::::::::::::::::::::::::::::::::::::::: 

:: USING VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS download failed: commons-logging # commons-logging; 1.0.4! commons-logging.jar Error executing sbt: error getting the required libraries (see /Users/jeremy/sourceCode/public/scalaConsole/project/boot/update.log for the full log) Error: could not get sbt 0.10.1

Any ideas on how I can solve this.

I have scala 2.9.1 and sbt version 0.10.1

thanks

+7
source share
5 answers

It worked for me after I deleted both ~/.m2/repository/commons-logging and ~/.ivy2/cache/commons-logging . If sbt does not detect either of these two paths, it will actually try to download the community registration package.

+10
source

Sometimes maven does not load files correctly, and you only find the .pom file in the repository and the commons-logging-1.0.4.jar file. First I deleted ~ / .m2 / repository / commons-logging. I then 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 command mvn installation:

 mvn install:install-file -DgroupId=commons-logging -DartifactId=commons-logging -Dversion=1.0.4 -Dpackaging=jar -Dfile=commons-logging-1.0.4.jar 
+5
source

Are you behind the proxy server? If so, you may need to modify your sbt bat or sh script to pass proxy information to the JVM as follows:

 java -XX:MaxPermSize=96m -Xmx512m -Dhttp.proxyHost=my.proxy.server.com -Dhttp.proxyPort=1234 -jar sbt-launch-0.10.1.jar 
0
source

I don’t know what is the main cause of the problem. But I use a script that automatically installs and runs sbt; so I modified the script to load public information before running sbt.

The sbt launcher is here: https://gist.github.com/1274530

To run sbt, save the script somewhere in your $ PATH, make sure it is executable, and run it by typing sbt .

0
source

Add http://repo1.maven.org/maven to the maven.repo.remote property in the project.properties file. This will download the file from the maven2 repository.

Old entry:

 maven.repo.remote=http://www.ibiblio.org/maven 

New entry:

 maven.repo.remote=http://www.ibiblio.org/maven,http://repo1.maven.org/maven 
0
source

All Articles