Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find outdated libraries with sbt?

Tags:

sbt

How can I find libraries which have newer versions with sbt.

For Ruby bundler, it can be done with bundle outdated. I want to do similar thing with sbt.

like image 980
kawty Avatar asked Aug 25 '13 15:08

kawty


People also ask

Where are dependencies stored in sbt?

Solution. You can use both managed and unmanaged dependencies in your SBT projects. If you have JAR files (unmanaged dependencies) that you want to use in your project, simply copy them to the lib folder in the root directory of your SBT project, and SBT will find them automatically.

How do we specify library dependencies in sbt?

The libraryDependencies key Most of the time, you can simply list your dependencies in the setting libraryDependencies . It's also possible to write a Maven POM file or Ivy configuration file to externally configure your dependencies, and have sbt use those external configuration files.

Does sbt use Ivy?

By default, sbt uses the standard Ivy home directory location ${user.


2 Answers

There is sbt-updates which gives you latest stable and snapshot versions. Not sure how reliable it is, though.

Example run:

my-project $ sbt [info] Set current project to my-project > dependencyUpdates [info] Found 14 dependency updates for my-project [info]   com.typesafe.akka:akka-actor                                  : 2.2.1  -> 2.2.3  [info]   com.typesafe.akka:akka-agent                                  : 2.2.1  -> 2.2.3  [info]   com.typesafe.akka:akka-dataflow                               : 2.2.1  -> 2.2.3  [info]   com.typesafe.akka:akka-slf4j                                  : 2.2.1  -> 2.2.3  [info]   com.typesafe.akka:akka-testkit                                : 2.2.1  -> 2.2.3  [info]   com.typesafe.akka:akka-zeromq                                 : 2.2.1  -> 2.2.3  [info]   org.scala-lang.plugins:continuations:plugin->default(compile) : 2.10.2 -> 2.10.3 [info]   org.scala-lang:scala-library                                  : 2.10.2 -> 2.10.3 [info]   org.scalaz:scalaz-concurrent                                  : 7.0.3  -> 7.0.5  [info]   org.scalaz:scalaz-core                                        : 7.0.3  -> 7.0.4  [info]   org.scalaz:scalaz-effect                                      : 7.0.3  -> 7.0.5  [info]   org.scalaz:scalaz-iteratee                                    : 7.0.3  -> 7.0.5  [info]   org.scalaz:scalaz-typelevel                                   : 7.0.3  -> 7.0.5  [info]   org.scalaz:scalaz-xml                                         : 7.0.3  -> 7.0.5  
like image 132
Debilski Avatar answered Sep 22 '22 04:09

Debilski


You can use "SBT > dependencyUpdates" in the command line. Just like described above. That will work. But that is now automated.

You can use VersionEye to monitor your build.sbt file on GitHub/Bitbucket. VersionEye will notify you about out-dated dependencies in your project, automatically via email. In that way it is completely automated and you don't have to remember to execute commands in the shell. It's like a CI Server for versions ;-)

By the way, I'm the dude who started VersionEye. Let me know if you have questions.

like image 42
Robert Reiz Avatar answered Sep 20 '22 04:09

Robert Reiz