buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <boisv...@intalio.com>
Subject Re: Compiling scala with buildr: not very automatic?
Date Sun, 08 Mar 2009 17:39:07 GMT
Hi Juri,

Yes, adding:

require 'buildr/scala'

to the top of your Buildfile is the right way to go.   This was a recent
change.  The documentation hasn't been updated on the website yet;  It's
updated in SVN though.   For now, I would also advise using the Buildr trunk
code since there's been quite a few little fixes in 1.3.3 and the trunk
should work better out of the box with the latest Scala 2.7.3.

alex

On Sun, Mar 8, 2009 at 3:53 AM, Juri Pakaste <juri@iki.fi> 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
>   project.group = GROUP
>   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 2.7.3.final.
>
>  --
> Juri Pakaste / juri@iki.fi / http://www.juripakaste.fi/
>
>

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