You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by bo...@apache.org on 2010/03/03 16:05:12 UTC
svn commit: r918501 - /buildr/trunk/addon/buildr/xmlbeans.rb
Author: boisvert
Date: Wed Mar 3 15:05:12 2010
New Revision: 918501
URL: http://svn.apache.org/viewvc?rev=918501&view=rev
Log:
No need to convert artifacts to string
Modified:
buildr/trunk/addon/buildr/xmlbeans.rb
Modified: buildr/trunk/addon/buildr/xmlbeans.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/addon/buildr/xmlbeans.rb?rev=918501&r1=918500&r2=918501&view=diff
==============================================================================
--- buildr/trunk/addon/buildr/xmlbeans.rb (original)
+++ buildr/trunk/addon/buildr/xmlbeans.rb Wed Mar 3 15:05:12 2010
@@ -23,12 +23,12 @@
# Provides XMLBeans schema compiler. Require explicitly using <code>require "buildr/xmlbeans"</code>.
#
# require 'buildr/xmlbeans'
- # define 'some_proj' do
+ # define 'some_proj' do
# compile_xml_beans _(:source, :main, :xsd) # the directory with *.xsd
# end
module XMLBeans
- # You can use ArtifactNamespace to customize the versions of
+ # You can use ArtifactNamespace to customize the versions of
# <code>:xmlbeans</code> or <code>:stax</code> used by this module:
#
# require 'buildr/xmlbeans'
@@ -37,7 +37,7 @@
ns.xmlbeans! 'org.apache.xmlbeans:xmlbeans:jar:2.3.0', '>2'
ns.stax_api! 'stax:stax-api:jar:>=1.0.1'
end
-
+
class << self
def compile(*args)
@@ -48,7 +48,7 @@
Buildr.ant "xmlbeans" do |ant|
ant.taskdef :name=>"xmlbeans", :classname=>"org.apache.xmlbeans.impl.tool.XMLBean",
:classpath=>requires.join(File::PATH_SEPARATOR)
- ant.xmlbeans :srconly=>"true", :srcgendir=>options[:output].to_s, :classgendir=>options[:output].to_s,
+ ant.xmlbeans :srconly=>"true", :srcgendir=>options[:output].to_s, :classgendir=>options[:output].to_s,
:javasource=>options[:javasource] do
args.flatten.each { |file| ant.fileset File.directory?(file) ? { :dir=>file } : { :file=>file } }
end
@@ -58,7 +58,7 @@
end
def requires()
- @requires ||= REQUIRES.artifacts.each(&:invoke).map(&:to_s)
+ @requires ||= REQUIRES.artifacts
end
end