These are chat archives for sbt/sbt

21st
Oct 2016
Li Haoyi
@lihaoyi
Oct 21 2016 03:59
I'm having trouble installing SBT on a new windows+ubuntu+bash machine
root@DESKTOP-OS5U75T:~/Ammonite# sbt
Detected sbt version 0.13.9
Starting sbt: invoke with -help for other options
Cannot find sbt launcher 0.13.9
Please download:
  From  http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.9/sbt-launch.jar
    To  /root/.sbt/.lib/0.13.9/sbt-launch.jar
root@DESKTOP-OS5U75T:~/Ammonite# wget http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.9/sbt-launch.jar
--2016-10-21 11:57:15--  http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.9/sbt-launch.jar
Resolving typesafe.artifactoryonline.com (typesafe.artifactoryonline.com)... 52.206.88.240, 54.164.254.38
Connecting to typesafe.artifactoryonline.com (typesafe.artifactoryonline.com)|52.206.88.240|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2016-10-21 11:57:16 ERROR 404: Not Found.
This is after installing sbt via
    8  sudo apt-get install openjdk-8-jdk
    9  sudo add-apt-repository ppa:openjdk-r/ppa
   10  sudo apt-get update
   11  apt-get install openjdk-8-jdk
   12  wget http://apt.typesafe.com/repo-deb-build-0002.deb
   13  sudo dpkg -i repo-deb-build-0002.deb
   14  sudo apt-get update
   15  sudo apt-get installsbt
   16  sudo apt-get install sbt
anyone have any idea? not sure if my instructions were out of date, or whether I had some leftover state lying around, or whether this stuff doesn't just work on windows/ubuntu
Dale Wijnand
@dwijnand
Oct 21 2016 09:00
Where does that apt.typesafe.com instruction come from?
From http://www.scala-sbt.org/download.html, the ubuntu section (from the source) says:
echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
sudo apt-get update
sudo apt-get install sbt
Edmondo Porcu
@edmondo1984
Oct 21 2016 10:34
Hello , has anyone managed to use xsbt-web to build war application without packaging the libs inside ? it is importing all my transitive dependencies which are already on the classpath of my tomcat. Can projects depend on other projects in a "provided" configuration?
This message was deleted
Li Haoyi
@lihaoyi
Oct 21 2016 14:31
@dwijnand yeah the sbt website instructions worked, I got the other funny instructions from stackoverflow http://stackoverflow.com/questions/13711395/install-sbt-on-ubuntu
one odd thing I just noticed is that running the sbt-website instructions on a clean ubuntu 16.04 VM ends up installing openjdk-9-jre-internal, which caused problems with TLS something somethings
uninstalling it to install openjdk-8-jdk seems to make it happy
Matthew de Detrich
@mdedetrich
Oct 21 2016 16:03
Is it standard practice in sbt to not catch exceptions and instead to just let it error out? I mean you can catch exceptions but there doesn’t seem to be a way to log it with sys.error
Perry
@pfn
Oct 21 2016 16:39
huh, does java work on bash-on-windows yet?
I'm still on build 14393...
need to be on 14901 at least for java to work
ritschwumm
@ritschwumm
Oct 21 2016 18:03
@edmondo1984 why would you want to put any libraries on the tomcat classpath?
a war is meant to represent a complete application (minus the servlet api and its implementation)
Perry
@pfn
Oct 21 2016 18:55
@ritschwumm because some things must be in the container classpath
e.g. jdbc drivers, because the connection pool is managed by the container
@ritschwumm and his question seems to indicate that his .war is bundling stuff that's already provided by the container
in that case, @edmondo1984 needs to excludeAll the transitive dependencies already included by tomcat and possibly mark them provided if required to compile his code
@edmondo1984 and yes, projects can depend on other projects provided, e.g. lazy val a = project; lazy val b = project.dependsOn(a % "provided") works fine