Return-Path: Delivered-To: apmail-buildr-users-archive@www.apache.org Received: (qmail 47219 invoked from network); 23 Feb 2010 01:28:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Feb 2010 01:28:55 -0000 Received: (qmail 40170 invoked by uid 500); 23 Feb 2010 01:28:55 -0000 Delivered-To: apmail-buildr-users-archive@buildr.apache.org Received: (qmail 40119 invoked by uid 500); 23 Feb 2010 01:28:55 -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 Received: (qmail 40109 invoked by uid 99); 23 Feb 2010 01:28:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2010 01:28:55 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of alex.boisvert@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-wy0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2010 01:28:46 +0000 Received: by wyb40 with SMTP id 40so379768wyb.17 for ; Mon, 22 Feb 2010 17:28:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=Zyxk09CIUIU4UzAFHYDezdhYPJfWpPxaMS8458HLjMo=; b=J4qcycdyqNajEzVWh8jd4ckqGrCXW3rPxQPY4nVOHV1ZDlfH05LpNsPj9AtczAC+sw ljxisEQiATx255OWmrWN8JIDL0Q7T2Var0yAh9z99nowO+c6XnTcl8YnekjOXZaTdHqc b5iVvUHGf5YY2IFjozOHN99UgmBzYH3XStMnc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=OrcE9CSIN22myf+n4Jhfa6SQpSZkRCcyq6uNOfv6VJ/UeQScBSHWjvFXO87g5vhknk 9prGaqJiBboSOg7iVpoZHX8HNpQSn4qvQ5Zsg4TtXDKOP6qBfNv9H656MvnOmVabP1lN rS1xx/1mAC0NcN4Qe58LtRmq5e4YQ4IbVVQn0= MIME-Version: 1.0 Received: by 10.216.163.195 with SMTP id a45mr256574wel.46.1266888506205; Mon, 22 Feb 2010 17:28:26 -0800 (PST) In-Reply-To: <6A248D74-8DF4-4B54-B963-BB95A93823BE@detailedbalance.net> References: <6A248D74-8DF4-4B54-B963-BB95A93823BE@detailedbalance.net> Date: Mon, 22 Feb 2010 17:28:26 -0800 Message-ID: <4dcd15a91002221728g1a8a1cf6peca95c3d56cc7c92@mail.gmail.com> Subject: Re: Does the SQL ant task work in buildr for anyone else? From: Alex Boisvert To: users@buildr.apache.org Content-Type: multipart/alternative; boundary=0016367b5dda61e75c04803a774c X-Virus-Checked: Checked by ClamAV on apache.org --0016367b5dda61e75c04803a774c Content-Type: text/plain; charset=ISO-8859-1 It fails for me with Ant 1.7.1 but works with 1.8.0 so I'd be inclined to point the finger towards Ant. I didn't look in the Ant sql task code although I wouldn't be surprised to see a System.exit() somewhere in there given the abrupt termination behavior. alex On Mon, Feb 22, 2010 at 5:03 PM, Rhett Sutphin wrote: > Hi, > > I've been trying to track down an intermittent failure in my build script > and I've discovered a repeatable problem with the sql ant task in buildr. > When you execute the 'foo:postgresql' task in the buildfile below, the "SQL > finished" line is never printed. The SQL gets executed, but then buildr > just exits. There's no error and the usual "Completed in ..." message isn't > printed. > > If you use an invalid SQL statement (or database, etc.), you get an error > from ant which buildr bubbles up, as expected. The behavior seems to be the > same with buildr on MRI and JRuby. The problem isn't database-dependent -- > I see the same thing with HSQLDB and Oracle. An equivalent ant script > behaves as expected. If I use the src attribute and an external file > instead of pcdata, I see the same weird behavior. > > I use antwrap for other things in my buildfile and none of them act like > this. I'll file a bug, but first I wanted to see if 1) anyone else uses the > sql ant task in buildr and 2) either does or doesn't have this problem. > > Thanks, > Rhett > > ------ Example buildfile ------ > > require 'buildr' > > repositories.remote << "http://repo1.maven.org/maven2" > > define 'foo' do > task 'postgresql' do > ant('test') do |ant| > ant.sql :driver => 'org.postgresql.Driver', > :classpath => > artifact("postgresql:postgresql:jar:8.2-504.jdbc3").to_s, > # some actual database > :url => 'jdbc:postgresql:test', > # and credentials > :userid => 'rsutphin', > :password => '', > # some valid SQL statement for that database > :pcdata => "UPDATE sites SET name='foo' WHERE name='foo';" > end > info "SQL finished" > end > end > --0016367b5dda61e75c04803a774c--