buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Spiewak <>
Subject Re: Compiling scala with buildr: not very automatic?
Date Sun, 08 Mar 2009 17:38:48 GMT
This is one of those undocumented bugs.  :-)  Try adding this to the top of
your buildfile:

  require 'buildr/scala'

As a matter of interest, this will be required in future as a matter of
course as support for the Scala/Java joint compiler is merged in.


On Sun, Mar 8, 2009 at 4:53 AM, Juri Pakaste <> wrote:

>  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
>   manifest["Implementation-Vendor"] = COPYRIGHT
>   define "jones-gui" do
>     compile
>   end
> end
> 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.
> So:
> 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 / /

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message