Return-Path: Delivered-To: apmail-buildr-users-archive@www.apache.org Received: (qmail 10043 invoked from network); 8 Mar 2009 17:33:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Mar 2009 17:33:06 -0000 Received: (qmail 54366 invoked by uid 500); 8 Mar 2009 17:33:06 -0000 Delivered-To: apmail-buildr-users-archive@buildr.apache.org Received: (qmail 54345 invoked by uid 500); 8 Mar 2009 17:33:06 -0000 Mailing-List: contact users-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@buildr.apache.org Delivered-To: mailing list users@buildr.apache.org Delivered-To: moderator for users@buildr.apache.org Received: (qmail 58080 invoked by uid 99); 8 Mar 2009 10:58:31 -0000 X-ASF-Spam-Status: No, hits=3.4 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Message-ID: <49B3A3C5.1090302@iki.fi> Date: Sun, 08 Mar 2009 12:53:57 +0200 From: Juri Pakaste User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090227 Shredder/3.0b2 MIME-Version: 1.0 To: users@buildr.apache.org Subject: Compiling scala with buildr: not very automatic? X-Enigmail-Version: 0.96a Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig40D1515CDBFC72F3C2CC3F3B" X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on smtp-68.nebula.fi X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=0.0 required=5.0 tests=HTML_MESSAGE autolearn=unavailable version=3.2.4 --------------enig40D1515CDBFC72F3C2CC3F3B Content-Type: multipart/alternative; boundary="------------000608090506030302080809" This is a multi-part message in MIME format. --------------000608090506030302080809 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 =3D VERSION_NUMBER project.group =3D GROUP manifest["Implementation-Vendor"] =3D 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. --=20 Juri Pakaste / juri@iki.fi / http://www.juripakaste.fi/ --------------000608090506030302080809 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable = 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

=C2=A0 project.version =3D VERSION_NUMBER
=C2=A0 project.group =3D GROUP
=C2=A0 manifest["Implementation-Vendor"] =3D COPYRIGHT

=C2=A0 define "jones-gui" do
=C2=A0=C2=A0=C2=A0 compile
=C2=A0 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.

--=20
Juri Pakaste / juri@iki.fi / http://www.juripakaste.fi/

--------------000608090506030302080809-- --------------enig40D1515CDBFC72F3C2CC3F3B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkmzo84ACgkQAwsjUHeKd2lZIACeKiNPPclZp3SMksIZMc9jhW/Z MBwAoJhqPqT9pnVTZafYDQoREzVlnFrq =erSR -----END PGP SIGNATURE----- --------------enig40D1515CDBFC72F3C2CC3F3B--