You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "David (JIRA)" <ji...@apache.org> on 2011/01/30 07:47:43 UTC
[jira] Created: (BUILDR-567) Enable Ant using JRuby's Ant
integration
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.
[jira] [Updated] (BUILDR-567) Enable Ant using JRuby's Ant
integration
Posted by "Peter Donald (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BUILDR-567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Donald updated BUILDR-567:
--------------------------------
Fix Version/s: 1.5
> 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
> Fix For: 1.5
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira