Return-Path: Delivered-To: apmail-incubator-buildr-user-archive@locus.apache.org Received: (qmail 59519 invoked from network); 21 Jan 2008 05:05:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jan 2008 05:05:08 -0000 Received: (qmail 91243 invoked by uid 500); 21 Jan 2008 05:04:59 -0000 Delivered-To: apmail-incubator-buildr-user-archive@incubator.apache.org Received: (qmail 91228 invoked by uid 500); 21 Jan 2008 05:04:59 -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 91219 invoked by uid 99); 21 Jan 2008 05:04:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Jan 2008 21:04:59 -0800 X-ASF-Spam-Status: No, hits=2.7 required=10.0 tests=HTML_MESSAGE,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of arkin@intalio.com does not designate 64.233.166.183 as permitted sender) Received: from [64.233.166.183] (HELO py-out-1112.google.com) (64.233.166.183) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Jan 2008 05:04:32 +0000 Received: by py-out-1112.google.com with SMTP id a25so2264479pyi.13 for ; Sun, 20 Jan 2008 21:04:37 -0800 (PST) Received: by 10.64.185.7 with SMTP id i7mr13851618qbf.69.1200891876766; Sun, 20 Jan 2008 21:04:36 -0800 (PST) Received: by 10.64.193.5 with HTTP; Sun, 20 Jan 2008 21:04:36 -0800 (PST) Message-ID: <3de5d7d20801202104v32d2dea6maafc627412624916@mail.gmail.com> Date: Sun, 20 Jan 2008 21:04:36 -0800 From: "Assaf Arkin" To: buildr-user@incubator.apache.org Subject: Re: Custom prerequisite task for "resources" In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13892_25298941.1200891876764" References: <3de5d7d20801200201v535715e7n3bbb9d04e7c06447@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_13892_25298941.1200891876764 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On 1/20/08, Nick Sieger wrote: > > Ok, clever. That works, thanks. But it still feels like a bug to me. > Why the deviation from Rake? One thing I've liked about Buildr so far > is that it's built upon Rake -- but this sort of change seems to > deviate from that if you're changing the way that task depedencies are > declared. Here's the problem: define 'foo' do task 'precompile' end Generally you would expect that this project's precompile task doesn't interfere with another project's precompile task. The project gets around this by using a namespace to define the task as foo:precompile, essentially: namespace 'foo' do task 'precompile' end Namespaces are a Rake feature, which usually does the right thing. Not always, though. (Unless this is a bug from moving to Rake 0.8, which could also be the case) Assaf /Nick > > On 1/20/08, Assaf Arkin wrote: > > Try: > > task 'resources'=>task('unpack_gems') > > > > Assaf > > > > On 1/19/08, Nick Sieger wrote: > > > > > > In 1.2.9, I had a custom task working that ran right before the > > > "resources" task to unpack a gem into "target" so that it could be > > > copied by it. Inside the project define block, I have > > > > > > directory _("target") > > > task :unpack_gems => _("target") do |t| > > > Dir.chdir(t.prerequisites.first) do > > > ruby "-S", "gem", "unpack", "rack" > > > mv FileList["rack-*"].first, "rack" > > > end > > > end > > > resources.from _('lib'), _('target/rack/lib') > > > task :resources => :unpack_gems > > > > > > In trunk, this fails: > > > > > > $ buildr > > > (in /Users/nicksieger/Projects/jruby/contrib/rack, development) > > > Building jruby-rack > > > /opt/local/bin/ruby -S gem unpack rack > > > Unpacked gem: 'rack-0.2.0' > > > Testing jruby-rack > > > rake aborted! > > > Don't know how to build task 'unpack_gems' > > > > > > (See full trace by running task with --trace) > > > > > > Full trace attached. It seems to be failing in the test:resources > > > stage, but I can't untangle the prerequisites to see why. > > > > > > Any idea? > > > > > > /Nick > > > > > > > > > > > -- > > CTO, Intalio > > http://www.intalio.com > > > -- CTO, Intalio http://www.intalio.com ------=_Part_13892_25298941.1200891876764--