From commits-return-4721-apmail-buildr-commits-archive=buildr.apache.org@buildr.apache.org Sun Jan 30 06:48:12 2011 Return-Path: Delivered-To: apmail-buildr-commits-archive@www.apache.org Received: (qmail 74675 invoked from network); 30 Jan 2011 06:48:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Jan 2011 06:48:12 -0000 Received: (qmail 28567 invoked by uid 500); 30 Jan 2011 06:48:12 -0000 Delivered-To: apmail-buildr-commits-archive@buildr.apache.org Received: (qmail 28539 invoked by uid 500); 30 Jan 2011 06:48:11 -0000 Mailing-List: contact commits-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@buildr.apache.org Delivered-To: mailing list commits@buildr.apache.org Received: (qmail 28532 invoked by uid 500); 30 Jan 2011 06:48:10 -0000 Delivered-To: apmail-incubator-buildr-commits@incubator.apache.org Received: (qmail 28528 invoked by uid 99); 30 Jan 2011 06:48:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Jan 2011 06:48:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 30 Jan 2011 06:48:05 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0U6lhbD020612 for ; Sun, 30 Jan 2011 06:47:43 GMT Message-ID: <24499913.291661296370063225.JavaMail.jira@thor> Date: Sun, 30 Jan 2011 01:47:43 -0500 (EST) From: "David (JIRA)" To: buildr-commits@incubator.apache.org Subject: [jira] Created: (BUILDR-567) Enable Ant using JRuby's Ant integration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Enable Ant using JRuby's Ant integration ---------------------------------------- Key: BUILDR-567 URL: https://issues.apache.org/jira/browse/BUILDR-567 Project: Buildr Issue Type: Improvement Components: JRuby Affects Versions: 1.4.4 Reporter: David Buildr does not work with JRuby's Ant integration. Since Antwrap hasn't been updated in almost three years, I tried to follow the JRuby + Ant examples in the article linked at the end. This simple script works using just jruby: # test.rb require 'ant' # Use JRuby Ant integration puts ant.properties['ant.version'] puts ant.properties['ant.core.lib'] But when I try accessing ant from Buildr, I keep getting a TypeError that complains about Ant not being a class. This buildfile: # buildfile - buildr sandbox VERSION_NUMBER = "1.0.0" GROUP = "buildr-sandbox" require 'ant' repositories.remote << "http://www.ibiblio.org/maven2/" desc "The Buildr-sandbox project" define "buildr-sandbox" do project.version = VERSION_NUMBER project.group = GROUP package :jar end Results in this error: Buildr aborted! TypeError : Ant is not a class .../jruby/lib/ruby/site_ruby/shared/ant.rb:3:in `(root)' org/jruby/RubyKernel.java:1041:in `require' .../jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require' .../jruby/lib/ruby/site_ruby/shared/ant.rb:6:in `(root)' org/jruby/RubyKernel.java:1066:in `load' .../buildr-sandbox/buildfile:412:in `raw_load_buildfile' .../jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/buildr-1.4.4-java/lib/buildr/core/application.rb:218:in `load_buildfile' .../jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/buildr-1.4.4-java/lib/buildr/core/application.rb:523:in `standard_exception_handling' .../jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/buildr-1.4.4-java/lib/buildr/core/application.rb:213:in `load_buildfile' .../jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/buildr-1.4.4-java/lib/buildr/core/application.rb:137:in `run' .../jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/buildr-1.4.4-java/lib/buildr/core/application.rb:523:in `standard_exception_handling' .../jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/buildr-1.4.4-java/lib/buildr/core/application.rb:135:in `run' .../jruby-1.6.0.RC1/lib/ruby/gems/1.8/gems/buildr-1.4.4-java/bin/buildr:19:in `(root)' org/jruby/RubyKernel.java:1066:in `load' I think it's because $JRUBY_HOME/lib/ruby/site_ruby/shared/ant.rb defnes Ant as a class while lib/buildr/java/ant.rb, which runs first (I think) defines it as a module. The article: http://www.engineyard.com/blog/2010/rake-and-ant-together-a-pick-it-n-stick-it-approach/ -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.