How do I find outdated libraries with sbt? - 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.

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

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.

Related

SBT fails to launch on ARM64 Apple silicon with error Could not find required component 'xsbti'

When I launch SBT 1.5 using the command which in turn launches version 0.13 for the project
❯ sbt -v
[sbt_options] declare -a sbt_options='()'
[process_args] java_version = '8'
# Executing command line:
java
-Dfile.encoding=UTF-8
-Xms1024m
-Xmx1024m
-Xss4M
-XX:ReservedCodeCacheSize=128m
-jar
/opt/homebrew/Cellar/sbt/1.5.0/libexec/bin/sbt-launch.jar
[info] Loading global plugins from /Users/viswanath/.sbt/0.13/plugins
[info] Updating {file:/Users/viswanath/.sbt/0.13/plugins/}global-plugins...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
I get the following error
[error] (compile:compileIncremental) sbt.InvalidComponent: Could not find required component 'xsbti'
on my MacBookPro with M1 processor (a.k.a Apple silicon) on ARM64 architecture. Any clue on how to fix this problem?
Note: Bundled SBT runs fine on IntelliJ
Try installing with SDKMAN
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install java
sdk install sbt
sbt compile
Bumped up the project's SBT version to 1.5.0 and the problem disappeared. See this githib issue for more information.
Alternatively, check this workaround on SBT 1.5.0 for launching SBT in interactive mode.
sbt -Dsbt.boot.directory=/tmp/boot1 -Dsbt.launcher.coursier=false

sbt-1.1.1 sbtVersion showing 1.1.0

I invoke:
brew install sbt
I get:
/usr/local/Cellar/sbt/1.1.1: 491 files, 48.3MB, built in 7 seconds
I invoke:
sbt sbtVersion
I get:
[info] Loading project definition from /Users/name/project
[info] Set current project to name (in build file:/Users/name/)
[info] 1.1.0
I'm expecting to see
[info] 1.1.1
Why don't the version values match?
Thank you.
Most likely, because you have a file project/build.properties with line
sbt.version=1.1.0
So one thing is the version of the launcher that you installed with Homebrew and another is the version of the sbt you launch in particular project. If you don't set it explicitly in project/build.properties, sbt will try to run its own version (launcher's, i.e. 1.1.1 in your case).
Another possible reason is that Homebrew could install the formula, but not link the binaries (assuming you upgraded from sbt 1.1.0). You can run several commands to verify which versions you have
$ brew info sbt
...
$ brew list --versions sbt
sbt 0.13.16 0.13.11 1.0.0 1.0.1 1.1.0 0.13.12 0.13.15 1.1.1 0.13.13 1.0.4 1.0.3 1.0.2
$ brew list sbt
/usr/local/Cellar/sbt/1.1.1/bin/sbt
/usr/local/Cellar/sbt/1.1.1/libexec/bin/ (5 files)
/usr/local/Cellar/sbt/1.1.1/libexec/lib/ (483 files)
You can see here that I have many old versions installed, but the one linked is 1.1.1. In case I need to switch to an older launcher, I can run brew switch sbt 1.0.4, for example.

installing Amazon DynamoDB Storage Backend for Titan 0.5.4

Im trying to install and run Amazon DynamoDB Storage Backend for Titan 0.5.4 locally, and I followed the instruction here on linux ubuntu but I got Titan 1.0.0 instead of Titan 0.5.4 which I really couldn't find why!
phoenix# dynamodb-titan-storage-backend$ mvn install
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------
[INFO] Building Amazon DynamoDB Storage Backend for Titan 1.0.0
[INFO] ----------------------------------------------------------------
You forgot to switch from 1.0.0 to 0.5.4branch.
To do that, run this after cloning your repo:
git checkout 0.5.4

Error while building Spark 1.2.1 on Windows 7 using sbt

I am trying to build Spark 1.2.1 on Windows with the help of sbt, and I'm running into the following issue:
Edit: The command I ran was sbt/sbt assembly
[info] Set current project to spark-parent (in build file:/C:/Programming/spark-1.2.1/)
[error] Expected symbol
[error] Not a valid command: /
[error] /sbt
[error] ^
Any help would be greatly appreciated.
I used the latest sbt Windows installer to install sbt and have Git installed on my machine.

Unable to run playn sample project - compile errors

I've tried to follow the instructions on the getting started page for playn and run into problems when running the first program java showcase. I get the following errors when right clicking and running Maven test. Also I get numerous errors in the problem tab of eclipse related to (failure to transfer xxx from yyy) where xxx is some jar file and yyy is a gwt or playn website
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building PlayN Showcase Java 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://snapshots.repository.codehaus.org/org/apache/maven/plugins/maven-surefire-plugin/2.10/maven-surefire-plugin-2.10.pom
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.10/maven-surefire-plugin-2.10.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/2.10/maven-surefire-plugin-2.10.pom (11 KB at 47.2 KB/sec)
Downloading: http://snapshots.repository.codehaus.org/org/apache/maven/surefire/surefire/2.10/surefire-2.10.pom
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.10/surefire-2.10.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire/2.10/surefire-2.10.pom (12 KB at 118.8 KB/sec)
Downloading: http://snapshots.repository.codehaus.org/org/apache/maven/maven-parent/20/maven-parent-20.pom
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/20/maven-parent-20.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/20/maven-parent-20.pom (25 KB at 143.9 KB/sec)
Downloading: http://snapshots.repository.codehaus.org/org/apache/maven/plugins/maven-antrun-plugin/1.6/maven-antrun-plugin-1.6.pom
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.6/maven-antrun-plugin-1.6.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-antrun-plugin/1.6/maven-antrun-plugin-1.6.pom (5 KB at 52.2 KB/sec)
Downloading: https://oss.sonatype.org/content/repositories/snapshots/com/googlecode/playn/playn-showcase-core/1.0-SNAPSHOT/maven-metadata.xml
Downloading: http://forplay.googlecode.com/svn/mavenrepo/com/googlecode/playn/playn-showcase-core/1.0-SNAPSHOT/maven-metadata.xml
Downloading: http://forplay.googlecode.com/svn/mavenrepo/com/googlecode/playn/playn-showcase-core/1.0-SNAPSHOT/playn-showcase-core-1.0-SNAPSHOT.pom
Downloading: https://oss.sonatype.org/content/repositories/snapshots/com/googlecode/playn/playn-showcase-core/1.0-SNAPSHOT/playn-showcase-core-1.0-SNAPSHOT.pom
[WARNING] The POM for com.googlecode.playn:playn-showcase-core:jar:1.0-SNAPSHOT is missing, no dependency information available
Downloading: http://forplay.googlecode.com/svn/mavenrepo/jlayer/tritonus_share/1.0/tritonus_share-1.0.pom
[WARNING] Checksum validation failed, no checksums available from the repository for http://forplay.googlecode.com/svn/mavenrepo/jlayer/tritonus_share/1.0/tritonus_share-1.0.pom
Downloaded: http://forplay.googlecode.com/svn/mavenrepo/jlayer/tritonus_share/1.0/tritonus_share-1.0.pom (462 B at 0.7 KB/sec)
Downloading: http://forplay.googlecode.com/svn/mavenrepo/com/googlecode/playn/playn-showcase-core/1.0-SNAPSHOT/playn-showcase-core-1.0-SNAPSHOT.jar
Downloading: http://forplay.googlecode.com/svn/mavenrepo/jlayer/mp3spi/1.9.5/mp3spi-1.9.5.jar
Downloading: http://forplay.googlecode.com/svn/mavenrepo/jlayer/tritonus_share/1.0/tritonus_share-1.0.jar
[WARNING] Checksum validation failed, no checksums available from the repository for http://forplay.googlecode.com/svn/mavenrepo/jlayer/mp3spi/1.9.5/mp3spi-1.9.5.jar
Downloaded: http://forplay.googlecode.com/svn/mavenrepo/jlayer/mp3spi/1.9.5/mp3spi-1.9.5.jar (25 KB at 40.9 KB/sec)
[WARNING] Checksum validation failed, no checksums available from the repository for http://forplay.googlecode.com/svn/mavenrepo/jlayer/tritonus_share/1.0/tritonus_share-1.0.jar
Downloaded: http://forplay.googlecode.com/svn/mavenrepo/jlayer/tritonus_share/1.0/tritonus_share-1.0.jar (101 KB at 102.4 KB/sec)
Downloading: https://oss.sonatype.org/content/repositories/snapshots/com/googlecode/playn/playn-showcase-core/1.0-SNAPSHOT/playn-showcase-core-1.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.155s
[INFO] Finished at: Tue Aug 07 08:01:22 EDT 2012
[INFO] Final Memory: 7M/112M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project playn-showcase-java: Could not resolve dependencies for project com.googlecode.playn:playn-showcase-java:jar:1.0-SNAPSHOT: Could not find artifact com.googlecode.playn:playn-showcase-core:jar:1.0-SNAPSHOT in forplay-legacy (http://forplay.googlecode.com/svn/mavenrepo) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
You can try this:
Right click on "playn-showcase" then: Run As -> Maven Install
It should retrieve all dependencies correctly.
Next time you want to launch the sample, you can follow the tutorial procedure:
Right click on "playn-showcase-java" then: Run As -> Maven Test

Resources