You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2011/07/26 11:08:44 UTC
svn commit: r1151031 - /buildr/trunk/addon/buildr/jibx.rb
Author: donaldp
Date: Tue Jul 26 09:08:43 2011
New Revision: 1151031
URL: http://svn.apache.org/viewvc?rev=1151031&view=rev
Log:
Indent code using source code formatter
Modified:
buildr/trunk/addon/buildr/jibx.rb
Modified: buildr/trunk/addon/buildr/jibx.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/addon/buildr/jibx.rb?rev=1151031&r1=1151030&r2=1151031&view=diff
==============================================================================
--- buildr/trunk/addon/buildr/jibx.rb (original)
+++ buildr/trunk/addon/buildr/jibx.rb Tue Jul 26 09:08:43 2011
@@ -13,25 +13,23 @@
# License for the specific language governing permissions and limitations under
# the License.
-
require 'java/java'
-
module Buildr
# Provides JiBX bytecode enhancement. Require explicitly using <code>require 'buildr/jibx'</code>.
- module JiBX
+ module JiBX
JIBX_VERSION = '1.1.5'
BCEL_VERSION = '5.2'
STAX_VERSION = '1.0-2'
XPP3_VERSION = '1.1.4c'
- REQUIRES = [ "org.jibx:jibx-bind:jar:#{JIBX_VERSION}",
- "org.jibx:jibx-run:jar:#{JIBX_VERSION}",
- "org.apache.bcel:bcel:jar:#{BCEL_VERSION}",
- "javax.xml.stream:stax-api:jar:#{STAX_VERSION}",
- "xpp3:xpp3:jar:#{XPP3_VERSION}" ]
+ REQUIRES = ["org.jibx:jibx-bind:jar:#{JIBX_VERSION}",
+ "org.jibx:jibx-run:jar:#{JIBX_VERSION}",
+ "org.apache.bcel:bcel:jar:#{BCEL_VERSION}",
+ "javax.xml.stream:stax-api:jar:#{STAX_VERSION}",
+ "xpp3:xpp3:jar:#{XPP3_VERSION}"]
Java.classpath << REQUIRES
@@ -43,15 +41,16 @@ module Buildr
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.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
+ private
def requires()
@requires ||= Buildr.artifacts(REQUIRES).each { |artifact| artifact.invoke }.map(&:to_s)
@@ -60,18 +59,18 @@ module Buildr
end
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_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 || {})
@@ -80,7 +79,7 @@ module Buildr
end
class Project
- include JiBX
+ include JiBX
end
end