Return-Path: Delivered-To: apmail-incubator-buildr-user-archive@locus.apache.org Received: (qmail 45993 invoked from network); 9 Oct 2008 03:30:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2008 03:30:46 -0000 Received: (qmail 82054 invoked by uid 500); 9 Oct 2008 03:30:45 -0000 Delivered-To: apmail-incubator-buildr-user-archive@incubator.apache.org Received: (qmail 82030 invoked by uid 500); 9 Oct 2008 03:30:45 -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 82019 invoked by uid 99); 9 Oct 2008 03:30:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Oct 2008 20:30:45 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=DNS_FROM_SECURITYSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hellonico@gmail.com designates 74.125.44.153 as permitted sender) Received: from [74.125.44.153] (HELO yx-out-1718.google.com) (74.125.44.153) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Oct 2008 03:29:42 +0000 Received: by yx-out-1718.google.com with SMTP id 36so774401yxh.0 for ; Wed, 08 Oct 2008 20:30:17 -0700 (PDT) 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 :content-transfer-encoding:content-disposition:references; bh=jNheaXN4ZVnzx/qmU1MGzNP+C5sFpUBg8qkhqF3xWo0=; b=MrbyUmwcWbVQPDabu7YMr+DKrRHibNSz02/pwaQoTvVCMJMEmMmeDlzj8W0Joc263/ AqL11YKuSMUCpu3Rnwpc8q82KjPuS2ng2IigxnQRJKn70fqfOde6kKi2SZpzCxvZslMh zi5QwmP2p7/iyW9OD3jyN3vWPEBp7y4TKPy0g= 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:content-transfer-encoding:content-disposition :references; b=YRvy7PKPb+YFVcQF8aL4/WkuWdZP5uzvXv62+ZAK9+/Y82KOnwgpbOebRu5ycBBBYy +YqvQppuK1ewdhn+7iKUSvjpWsD71pYmff+B9Y+3f143OkmtV1bnmA9cS3y1czLEdA4l p2JLCQoGEydRFNQRbbsXdvV9x8pFuieBoz+BA= Received: by 10.100.166.10 with SMTP id o10mr3004653ane.126.1223523017589; Wed, 08 Oct 2008 20:30:17 -0700 (PDT) Received: by 10.100.131.9 with HTTP; Wed, 8 Oct 2008 20:30:17 -0700 (PDT) Message-ID: <6539b1ea0810082030n7eca4a89x9d8e6df2a7ae8b95@mail.gmail.com> Date: Thu, 9 Oct 2008 12:30:17 +0900 From: "Nicolas Modrzyk" To: buildr-user@incubator.apache.org Subject: Re: Buildr.settings before buildfile located In-Reply-To: <3de5d7d20810081925m273a25d5w3a59e82763bfdb98@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6539b1ea0810081845v530c7309p3d3eed11d6cca52c@mail.gmail.com> <3de5d7d20810081925m273a25d5w3a59e82763bfdb98@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Ok I get it. The strange thing though, is that right now it only failed for groups, not for standalone artifacts. For example, this doesn't cause any troubles: APACHE_DS = "org.apache.apacheds:noarch-installer:jar:1.5.1" But this does: AXIOM = group("axiom-api", "axiom-dom", "axiom-impl", :under=>"org.apache.ws.commons.axiom", :version=>"1.2.7") Nicolas, On Thu, Oct 9, 2008 at 11:25 AM, Assaf Arkin wrote: > On Wed, Oct 8, 2008 at 6:45 PM, Nicolas Modrzyk wrote: >> Hi list, >> >> I am using buildr 1.3.3 (snapshot) not standalone, but embedded into >> my own script. >> >> I have a set of dependencies, and one of them would be: >> AXIOM = group("axiom-api", "axiom-dom", "axiom-impl", >> :under=>"org.apache.ws.commons.axiom", :version=>"1.2.7") >> >> That call fails with the following: >> Internal error: Called Buildr.settings before buildfile located (RuntimeError) >> >> The full stack trace would be: >> /Users/niko/tools/gemrepository/gems/buildr-1.3.3/lib/buildr/core/application.rb:144:in >> `settings': Internal error: Called Buildr.settings before buildfile >> located (RuntimeError) >> from /Users/niko/tools/gemrepository/gems/buildr-1.3.3/lib/buildr/core/application.rb:375:in >> `settings' >> from /Users/niko/tools/gemrepository/gems/buildr-1.3.3/lib/buildr/packaging/artifact.rb:431:in >> `local' >> from /Users/niko/tools/gemrepository/gems/buildr-1.3.3/lib/buildr/packaging/artifact.rb:458:in >> `locate' >> from /Users/niko/tools/gemrepository/gems/buildr-1.3.3/lib/buildr/packaging/artifact.rb:593:in >> `artifact' >> from /Users/niko/tools/gemrepository/gems/buildr-1.3.3/lib/buildr/packaging/artifact.rb:686:in >> `group' >> from /Users/niko/tools/gemrepository/gems/buildr-1.3.3/lib/buildr/packaging/artifact.rb:686:in >> `map' >> from /Users/niko/tools/gemrepository/gems/buildr-1.3.3/lib/buildr/packaging/artifact.rb:686:in >> `group' >> from /Users/niko/projects/tempo.svn/rsc/scripts/../build/dependencies.rb:21 >> >> I went and look at applications.rb, and there's obviously the line >> firing the RuntimeError: >> def settings >> fail "Internal error: Called Buildr.settings before buildfile >> located" unless rakefile >> @settings ||= Settings.new(self) >> end >> >> If I comment it out, everything works fine, and it was also working >> fine with earlier versions of buildr. >> >> Is there any reason why we're now forcing the check for a rakefile ? > > Settings -- in this case path to local repository -- are loaded and > cached from optional YAML files, two of which, build.yml and > profile.yml are located in the same directory as the buildfile. The > only way to access these files is to locate the buildfile first, which > happens during Buildr.application.run. > > This sanity check is there to prevent Buildr (or 3rd party library) > from incorrectly loading settings too early, preventing issues like > this form cropping undetected: > https://issues.apache.org/jira/browse/BUILDR-115 > >> Or anyway I can disable it (apart from touching buildr source code)? > > You can create your own Application object that has different behavior > and assign it to Buildr.application. > > Assaf > >> >> Thanks, >> >> Nicolas, >> >