lib/buildr/javacc.rb in buildr-1.2.6 vs lib/buildr/javacc.rb in buildr-1.2.7
- old
+ new
@@ -4,22 +4,22 @@
# Provides JavaCC compile tasks. Require explicitly using <code>require "buildr/javacc"</code>.
module JavaCC
REQUIRES = [ "net.java.dev.javacc:javacc:jar:4.0", "net.java.dev.javacc:javacc:jar:4.0" ]
- Java.rjb.classpath << REQUIRES
+ Java.wrapper.classpath << REQUIRES
class << self
def javacc(*args)
options = Hash === args.last ? args.pop : {}
rake_check_options options, :output
args = args.flatten.map(&:to_s).collect { |f| File.directory?(f) ? FileList[f + "/**/*.jj"] : f }.flatten
args.unshift "-OUTPUT_DIRECTORY=#{options[:output]}" if options[:output]
- Java.rjb do |rjb|
- rjb.import("org.javacc.parser.Main").mainProgram(args) == 0 or
+ Java.wrapper do |jw|
+ jw.import("org.javacc.parser.Main").mainProgram(args) == 0 or
fail "Failed to run JavaCC, see errors above."
end
end
def jjtree(*args)
@@ -27,11 +27,11 @@
rake_check_options options, :output, :build_node_files
args = args.flatten.map(&:to_s).collect { |f| File.directory?(f) ? FileList[f + "**/*.jjt"] : f }.flatten
args.unshift "-OUTPUT_DIRECTORY=#{options[:output]}" if options[:output]
args.unshift "-BUILD_NODE_FILES=#{options[:build_node_files] || false}"
- Java.rjb do |rjb|
- rjb.import("org.javacc.jjtree.JJTree").new.main(args) == 0 or
+ Java.wrapper do |jw|
+ jw.import("org.javacc.jjtree.JJTree").new.main(args) == 0 or
fail "Failed to run JJTree, see errors above."
end
end
end