lib/java/ant.rb in buildr-1.2.6 vs lib/java/ant.rb in buildr-1.2.7

- old
+ new

@@ -10,11 +10,11 @@ # Which version of Ant we're using by default. VERSION = "1.7.0" # Libraries used by Ant. REQUIRES = [ "org.apache.ant:ant:jar:#{VERSION}", "org.apache.ant:ant-launcher:jar:#{VERSION}", "xerces:xercesImpl:jar:2.6.2" ] - Java.rjb.onload { |rjb| rjb.classpath << REQUIRES } + Java.wrapper.setup { |jw| jw.classpath << REQUIRES } class << self # *Deprecated* Use ant { ... } instead. def declarative(name, options = nil, &block) @@ -47,10 +47,10 @@ # end def ant(name, options=nil, &block) warn_deprecated "Options are ignored." if options options = { :name=>name, :basedir=>Dir.pwd, :declarative=>true } options.merge!(:logger=> Logger.new(STDOUT), :loglevel=> Logger::DEBUG) if Rake.application.options.trace - Java.rjb do + Java.wrapper do AntProject.new(options).tap do |project| # Set Ant logging level to debug (--trace), info (default) or error only (--quiet). project.project.getBuildListeners().get(0). setMessageOutputLevel((Rake.application.options.trace && 4) || (verbose && 2) || 0) yield project if block_given?