buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juri Pakaste <>
Subject Compiling scala with buildr: not very automatic?
Date Sun, 08 Mar 2009 10:53:57 GMT
I had a lot of trouble getting buildr to compile Scala code
successfully. It seems to work now, or at least I'm getting .class
files, but I was wondering if someone could point out if I'm doing
something wrong or if I just misunderstood the documentation; it's been
a year since the last time I used buildr and I've never used it to
compile anything but Java, so a brain fart seems entirely plausible.

Basically I couldn't get buildr to automatically recognize a scala
project. My project is called jones and I have a sub-project called
jones-gui. I have a Scala file called
jones-gui/src/main/scala/Main.scala. I had a buildfile that looked like
this, without the boilerplate on top:

desc "The Jones project"
define "jones" do

  project.version = VERSION_NUMBER = GROUP
  manifest["Implementation-Vendor"] = COPYRIGHT

  define "jones-gui" do


And got nothing as a result. After reading the documentation and source
code I first tried explicitly calling compile.using(:scala) but it just
told me that "No scala compiler available. Did you install it?" Adding
require 'buildr/scala' to the top of the buildfile and calling
compile.using(Buildr::Scala::Scalac) finally did the trick.


1) Should Buildr have determined automatically it was Scala code and
called scalac accordingly?
2) If not, should compile.using(:scala) or :scalac worked?
3) If not, should the documentation be clarified?

I'm running buildr 1.3.3 and Scala

Juri Pakaste / /

View raw message