Return-Path: Delivered-To: apmail-incubator-buildr-user-archive@locus.apache.org Received: (qmail 75417 invoked from network); 18 Jan 2008 06:41:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jan 2008 06:41:00 -0000 Received: (qmail 76901 invoked by uid 500); 18 Jan 2008 06:40:50 -0000 Delivered-To: apmail-incubator-buildr-user-archive@incubator.apache.org Received: (qmail 76879 invoked by uid 500); 18 Jan 2008 06:40:49 -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 76870 invoked by uid 99); 18 Jan 2008 06:40:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Jan 2008 22:40:49 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vic.borja@gmail.com designates 209.85.198.188 as permitted sender) Received: from [209.85.198.188] (HELO rv-out-0910.google.com) (209.85.198.188) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jan 2008 06:40:25 +0000 Received: by rv-out-0910.google.com with SMTP id k20so820982rvb.0 for ; Thu, 17 Jan 2008 22:40:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=r260ANHEMpXSMdxPyM3i1KfVzcnww9yjkXFLnDfDvCw=; b=EGSLojAcHS8jqnJQnUJoCAW/t5v/v79qqrczyRiSw4Nwzgad1b4B/RRkvxxFV5XANsDXw0TTWy3lBBkqJ5MgmSLHROcFnGP/f9DC3rKsHAqW5WE/4qGSfOOzQEOYuf78Wl1OCWu5oMAdNkrex1fXD13YoRo4YCpVs4YtorCe5OE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=WCLpOzOSonOum4eeyR8/K6/zU3jSmVBcsSll57bBL50me6EFh5W+pw0M5mgAHWt1tOXNoF//sq+ZZlU3ouD9VReFw1Sx2X5YdRTzyJLlfL9ZkdJBRlEzh5xaHdQn3PZYdcXXwGaAD91qJ8fN314Uol1k9nVG4n9AakYLCb+gpa8= Received: by 10.140.207.2 with SMTP id e2mr2097065rvg.299.1200638429572; Thu, 17 Jan 2008 22:40:29 -0800 (PST) Received: by 10.140.135.19 with HTTP; Thu, 17 Jan 2008 22:40:29 -0800 (PST) Message-ID: <53466cf0801172240k29e813f1o127e14724f39bca8@mail.gmail.com> Date: Fri, 18 Jan 2008 00:40:29 -0600 From: "Victor Hugo Borja" To: buildr-user@incubator.apache.org Subject: Re: Buildr questions In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2329_23458198.1200638429544" References: <3de5d7d20801161210x454697b0j7012277a38ed40b8@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_2329_23458198.1200638429544 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Neil, PANOPTICODE = ["org.panopticode:panopticode:jar:0.1", > "org.panopticode:panopticode-dom4j:jar:1.6.1", > "org.panopticode:panopticode-treemap:jar:0.1"] > I'd like to be able to > > PANTOPTICODE_CLASSPATH = artifact(PANOPTICODE) > > Which would yield a list of fully qualified paths of jars from my local > repository. # This leads to an array with full paths to PANOPTICODE jars. PANTOPTICODE_CLASSPATH = PANOPTICODE.map { |spec| artifact(spec).to_s } Here's my second question: > > If I have a buildfile and define a regular ruby method that's called via a > rake task > > task :neiltest do > somemethod > end > > def somemethod > path_to("usr", "local", "bin") > end > > I get this error: > > rake aborted! > undefined method `path_to' for main:Object > > Why is that? The 'somemethod' is being declared on the 'main' object, thus it has no access to the current project methods (like path_to), you either have to pass the project as an argument or define the method on the current project object: def self.somemethod path_to("usr", "local", "bin") end If you have more than one simple method, prefer defining a module and extending the current project with it. Best Regards, -- Quaerendo invenietis. ------=_Part_2329_23458198.1200638429544--