Return-Path: Delivered-To: apmail-incubator-buildr-user-archive@locus.apache.org Received: (qmail 49521 invoked from network); 5 Oct 2008 12:28:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Oct 2008 12:28:48 -0000 Received: (qmail 28281 invoked by uid 500); 5 Oct 2008 12:28:46 -0000 Delivered-To: apmail-incubator-buildr-user-archive@incubator.apache.org Received: (qmail 28262 invoked by uid 500); 5 Oct 2008 12:28:46 -0000 Mailing-List: contact buildr-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: buildr-user@incubator.apache.org Delivered-To: mailing list buildr-user@incubator.apache.org Received: (qmail 28251 invoked by uid 99); 5 Oct 2008 12:28:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Oct 2008 05:28:46 -0700 X-ASF-Spam-Status: No, hits=3.6 required=10.0 tests=HTML_MESSAGE,SPF_SOFTFAIL,URIBL_RHS_DOB X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of boisvert@intalio.com does not designate 74.125.46.152 as permitted sender) Received: from [74.125.46.152] (HELO yw-out-1718.google.com) (74.125.46.152) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Oct 2008 12:27:43 +0000 Received: by yw-out-1718.google.com with SMTP id 5so398076ywr.0 for ; Sun, 05 Oct 2008 05:28:17 -0700 (PDT) Received: by 10.151.46.3 with SMTP id y3mr5500527ybj.225.1223209697518; Sun, 05 Oct 2008 05:28:17 -0700 (PDT) Received: by 10.150.182.5 with HTTP; Sun, 5 Oct 2008 05:28:17 -0700 (PDT) Message-ID: <5582dd3b0810050528t10ec6c6dl7ba8cc29f60abc19@mail.gmail.com> Date: Sun, 5 Oct 2008 21:28:17 +0900 From: "Alex Boisvert" To: buildr-user@incubator.apache.org Subject: Re: compiling scala with 1.3.2 In-Reply-To: <1223205138.17057.8.camel@zornaila> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_30182_11003855.1223209697513" References: <1223205138.17057.8.camel@zornaila> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_30182_11003855.1223209697513 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Adrian, Java and Scala sources must currently be in different projects since buildr only supports one compiler per project and the Scala 2.7.1 compiler only supports Scala files. (This will change in 2.7.2 with the addition of Java support; we'll update the Buildr support soon). So right now you'll need a layout similar to: Buildfile project1 src main java project2 src main scala test scala alex On Sun, Oct 5, 2008 at 4:12 AM, Adrian Petru Dimulescu < adrian.dimulescu@gmail.com> wrote: > Hello, I'm having some trouble understanding how I should organize my > project that would contain java and scala source files. > > Reading the documentation at > http://incubator.apache.org/buildr/languages.html#scala , I organized my > test project as follows. Here what I get with my buildr 1.3.2 : > > dadi@zornaila:~/Desktop/work/most-interesting-words$ buildr clean > build ; tree > (in /home/dadi/Desktop/work/most-interesting-words, development) > Cleaning most-interesting-words > Building most-interesting-words > Compiling most-interesting-words > into /home/dadi/Desktop/work/most-interesting-words/target/classes > Testing most-interesting-words > Compiling most-interesting-words:test > into /home/dadi/Desktop/work/most-interesting-words/target/test/classes > Completed in 6.631s > . > |-- buildfile > |-- src > | |-- main > | | |-- java > | | | `-- foaieverde > | | | `-- AJavaClass.java > | | `-- scala > | | |-- efort > | | | `-- AstaEsteScala.scala > | | `-- ex > | | |-- DoSmth.scala > | | `-- MyScallClass.scala > | `-- test > | `-- scala > | `-- of > | `-- CeMaiScalaClasa.scala > `-- target > |-- classes > | `-- foaieverde > | `-- AJavaClass.class > `-- test > `-- classes > `-- of > `-- CeMaiScalaClasa.class > > > My buildfile is : > > VERSION_NUMBER = "0.1" > NEXT_VERSION = "0.2" > > GROUP = "adrian" > COPYRIGHT = "me" > > repositories.remote << "http://www.ibiblio.org/maven2/" > > desc "The Most-interesting-words project" > define "most-interesting-words" do > > project.version = VERSION_NUMBER > project.group = GROUP > manifest["Implementation-Vendor"] = COPYRIGHT > > package(:jar) > end > > > So it looks like classes in src/main/scala are not noticed, while > classes in src/test/scala are compiled as expected. > > > > Secondly, I would like to be able to put java and scala files mixed up > in the src/main/java . I thought that adding : > > compile.using(:scalac).from('src/main/java') > > would allow me to do just that, instead, if I add this directive to my > buildfile I get : > > (in /home/dadi/Desktop/work/most-interesting-words, development) > rake aborted! > javac compiler already selected for this project > > > Thank you for any ideas, > Adrian. > > ------=_Part_30182_11003855.1223209697513--