module Buildr::JiBX
Provides JiBX
bytecode enhancement. Require explicitly using require 'buildr/jibx'
.
Constants
- BCEL_VERSION
- JIBX_VERSION
- REQUIRES
- STAX_VERSION
- XPP3_VERSION
Public Class Methods
bind(options)
click to toggle source
# File addon/buildr/jibx.rb, line 38 def bind(options) rake_check_options options, :classpath, :output, :binding, :target, :verbose, :load artifacts = Buildr.artifacts(options[:classpath]).each { |a| a.invoke }.map(&:to_s) + [options[:output].to_s] binding = file(options[:binding]).tap { |task| task.invoke }.to_s Buildr.ant 'jibx' do |ant| ant.taskdef :name=>'bind', :classname=>'org.jibx.binding.ant.CompileTask', :classpath => requires.join(File::PATH_SEPARATOR) ant.bind :verbose => options[:verbose].to_s, :load => options[:load].to_s, :binding=>options[:binding].to_s do ant.classpath :path => artifacts.join(File::PATH_SEPARATOR) end end end
Private Class Methods
requires()
click to toggle source
# File addon/buildr/jibx.rb, line 55 def requires() @requires ||= Buildr.artifacts(REQUIRES).each { |artifact| artifact.invoke }.map(&:to_s) end
Public Instance Methods
jibx_bind(options = nil)
click to toggle source
# File addon/buildr/jibx.rb, line 61 def jibx_bind(options = nil) # FIXME - add support for :bindingfileset and :classpathset # Note: either :binding or :bindingfileset should be set, and either # :classpath or :classpathset should be set, and options passed to # ant.bind should be adjusted accordingly. At present, only :binding # and :classpath are supported (which should be fine for most!) jibx_options = {:output => compile.target, :classpath => compile.classpath, :binding => path_to(:source, :main, :resources, 'META-INF/binding.xml'), :target => compile.target, :load => false, :verbose => false } JiBX.bind jibx_options.merge(options || {}) end