Author: vborja
Date: Tue Mar 25 17:13:02 2008
New Revision: 641092
URL: http://svn.apache.org/viewvc?rev=641092&view=rev
Log:
BUILDR-4
Requirements for XMLBeans, Groovyc
Modified:
incubator/buildr/trunk/lib/buildr/xmlbeans.rb
incubator/buildr/trunk/lib/java/groovyc.rb
Modified: incubator/buildr/trunk/lib/buildr/xmlbeans.rb
URL:
http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/buildr/xmlbeans.rb?rev=641092&r1=641091&r2=641092&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/buildr/xmlbeans.rb (original)
+++ incubator/buildr/trunk/lib/buildr/xmlbeans.rb Tue Mar 25 17:13:02 2008
@@ -32,10 +32,9 @@
#
# require 'buildr/xmlbeans'
# artifacts[Buildr::XMLBeans].use :xmlbeans => '2.2.0'
- REQUIRES = ArtifactNamespace.for self, {
- 'stax:stax-api:jar:>=1' => '1.0.1',
- 'org.apache.xmlbeans:xmlbeans:jar:>2' => '2.3.0'
- }
+ REQUIRES = ArtifactNamespace.for self,
+ 'stax:stax-api:jar:>=1' => '1.0.1',
+ 'org.apache.xmlbeans:xmlbeans:jar:>2' => '2.3.0'
class << self
@@ -46,7 +45,7 @@
puts "Running XMLBeans schema compiler" if verbose
Buildr.ant "xmlbeans" do |ant|
ant.taskdef :name=>"xmlbeans",
:classname=>"org.apache.xmlbeans.impl.tool.XMLBean",
- :classpath=>requires.map(&:to_s).join(File::PATH_SEPARATOR)
+ :classpath=>requires.join(File::PATH_SEPARATOR)
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 } }
@@ -56,8 +55,8 @@
touch options[:output].to_s, :verbose=>false
end
- def requires
- REQUIRES.each { |artifact| artifact.invoke }
+ def requires()
+ @requires ||= REQUIRES.each(&:invoke).map(&:to_s)
end
end
Modified: incubator/buildr/trunk/lib/java/groovyc.rb
URL:
http://svn.apache.org/viewvc/incubator/buildr/trunk/lib/java/groovyc.rb?rev=641092&r1=641091&r2=641092&view=diff
==============================================================================
--- incubator/buildr/trunk/lib/java/groovyc.rb (original)
+++ incubator/buildr/trunk/lib/java/groovyc.rb Tue Mar 25 17:13:02 2008
@@ -51,18 +51,16 @@
class Groovyc < Base
# The groovyc compiler jars are added to classpath at load time,
- # if you want to customize the artifact versions to use, you must use
- # the
+ # if you want to customize artifact versions, you must set them on the
#
# artifacts['Buildr::Compiler::Groovyc']
#
# namespace before this file is required.
- REQUIRES = ArtifactNamespace.for self, {
- 'org.codehaus.groovy:groovy:jar:>=1.5.3' => '1.5.3',
- 'commons-cli:commons-cli:jar:>=1.0' => '1.0',
- 'asm:asm:jar:>=2.2' => '2.2.3',
- 'antlr:antlr:jar:>=2.7.7' => '2.7.7'
- }
+ REQUIRES = ArtifactNamespace.for self,
+ 'org.codehaus.groovy:groovy:jar:>=1.5.3' => '1.5.3',
+ 'commons-cli:commons-cli:jar:>=1.0' => '1.0',
+ 'asm:asm:jar:>=2.2' => '2.2.3',
+ 'antlr:antlr:jar:>=2.7.7' => '2.7.7'
ANT_TASK = 'org.codehaus.groovy.ant.Groovyc'
GROOVYC_OPTIONS = [:encoding, :verbose, :fork, :memoryInitialSize,
:memoryMaximumSize, :listfiles, :stacktrace]