buildr 1.4.7.pre2 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. data/CHANGELOG +24 -2
  2. data/Rakefile +4 -1
  3. data/addon/buildr/{checkstyle.rake → checkstyle.rb} +0 -0
  4. data/addon/buildr/{findbugs.rake → findbugs.rb} +0 -0
  5. data/addon/buildr/gwt.rake +82 -0
  6. data/addon/buildr/{javancss.rake → javancss.rb} +0 -0
  7. data/addon/buildr/jdepend.rb.orig +178 -0
  8. data/addon/buildr/nailgun.rb +2 -2
  9. data/addon/buildr/{pmd.rake → pmd.rb} +3 -1
  10. data/addon/buildr/sonar.rb +142 -0
  11. data/buildr.gemspec +21 -17
  12. data/doc/installing.textile.orig +282 -0
  13. data/doc/more_stuff.textile +31 -0
  14. data/doc/more_stuff.textile.orig +1004 -0
  15. data/etc/KEYS +44 -0
  16. data/lib/buildr.rb +3 -3
  17. data/lib/buildr/core/doc.rb +9 -3
  18. data/lib/buildr/core/generate.rb +2 -2
  19. data/lib/buildr/core/run.rb +1 -1
  20. data/lib/buildr/core/shell.rb +1 -1
  21. data/lib/buildr/core/test.rb +1 -1
  22. data/lib/buildr/core/util.rb +2 -2
  23. data/lib/buildr/ide/eclipse.rb +4 -4
  24. data/lib/buildr/ide/idea.rb +184 -1
  25. data/lib/buildr/java/ant.rb +2 -3
  26. data/lib/buildr/java/bdd.rb +4 -4
  27. data/lib/buildr/java/pom.rb +5 -4
  28. data/lib/buildr/java/rjb.rb +1 -1
  29. data/lib/buildr/java/test_result.rb +4 -0
  30. data/lib/buildr/packaging/version_requirement.rb +1 -1
  31. data/lib/buildr/packaging/zip.rb +1 -1
  32. data/lib/buildr/run.rb +3 -2
  33. data/lib/buildr/scala/org/apache/buildr/Specs2Runner.class +0 -0
  34. data/lib/buildr/version.rb +1 -1
  35. data/rakelib/doc.rake +5 -5
  36. data/rakelib/package.rake +3 -3
  37. data/rakelib/rspec.rake +22 -4
  38. data/rakelib/stage.rake +16 -12
  39. data/spec/core/application_spec.rb +1 -1
  40. data/spec/core/cc_spec.rb +12 -4
  41. data/spec/core/doc_spec.rb +1 -1
  42. data/spec/core/run_spec.rb +17 -4
  43. data/spec/core/test_spec.rb +5 -3
  44. data/spec/ide/idea_spec.rb +2 -2
  45. data/spec/java/cobertura_spec.rb +4 -0
  46. data/spec/java/emma_spec.rb +4 -1
  47. data/spec/java/java_spec.rb +1 -1
  48. data/spec/java/pom_spec.rb +125 -0
  49. data/spec/packaging/archive_spec.rb +1 -1
  50. data/spec/packaging/artifact_spec.rb +1 -1
  51. data/spec/sandbox.rb +4 -0
  52. data/spec/spec_helpers.rb +6 -1
  53. data/spec/version_requirement_spec.rb +2 -0
  54. metadata +390 -239
data/etc/KEYS CHANGED
@@ -187,3 +187,47 @@ sIHg4pUCB3Z7wT6vvSs/eQ3jARt7mok3JE56JL0sV2+Z2SePiFUn/ixKdn1lKP8d
187
187
  +THIYJ/ZdpxUZeNKy7f1djoctqAk5T7ujVJh2d6xRXwqvQcJKoeW
188
188
  =6E9O
189
189
  -----END PGP PUBLIC KEY BLOCK-----
190
+ pub 2048R/C694390E 2012-05-19 [expires: 2016-05-19]
191
+ uid Peter Donald <peter.j.donald@gmail.com>
192
+ sig 3 C694390E 2012-05-19 Peter Donald <peter.j.donald@gmail.com>
193
+ sub 2048R/0C53F414 2012-05-19 [expires: 2016-05-19]
194
+ sig C694390E 2012-05-19 Peter Donald <peter.j.donald@gmail.com>
195
+
196
+ -----BEGIN PGP PUBLIC KEY BLOCK-----
197
+ Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
198
+ Comment: GPGTools - http://gpgtools.org
199
+
200
+ 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
231
+ IAU=
232
+ =dNyx
233
+ -----END PGP PUBLIC KEY BLOCK-----
@@ -18,6 +18,9 @@ unless defined?(Buildr::VERSION)
18
18
  end
19
19
 
20
20
  require 'rake'
21
+ include Rake::DSL
22
+ Rake::TaskManager.record_task_metadata = true
23
+
21
24
  require 'rbconfig'
22
25
  require 'pathname'
23
26
  autoload :Tempfile, 'tempfile'
@@ -32,9 +35,6 @@ require 'find'
32
35
  require 'uri'
33
36
  require 'stringio'
34
37
  require 'fileutils'
35
- require 'yaml' # From test_result.rb: necessary to require YAML even if it is mentioned by autoload as it fails on some platforms.
36
- require 'rspec/core/formatters/base_formatter' # From test_result.rb
37
-
38
38
 
39
39
  require 'buildr/core/util'
40
40
  require 'buildr/core/common'
@@ -112,7 +112,13 @@ module Buildr
112
112
  # Includes additional source files and directories when generating the documentation
113
113
  # and returns self. When specifying a directory, includes all source files in that directory.
114
114
  def include(*files)
115
- @files.include *files.flatten.compact
115
+ files.each do |file|
116
+ if file.respond_to? :to_ary
117
+ include(*file.to_ary)
118
+ else
119
+ @files.include *files.flatten.compact.collect { |f| File.expand_path(f.to_s) }
120
+ end
121
+ end
116
122
  self
117
123
  end
118
124
 
@@ -121,7 +127,7 @@ module Buildr
121
127
  #
122
128
  # Excludes source files and directories from generating the documentation.
123
129
  def exclude(*files)
124
- @files.exclude *files
130
+ @files.exclude *files.collect{|f|File.expand_path(f)}
125
131
  self
126
132
  end
127
133
 
@@ -205,7 +211,7 @@ module Buildr
205
211
  def source_files #:nodoc:
206
212
  @source_files ||= @files.map(&:to_s).map do |file|
207
213
  Array(engine.class.source_ext).map do |ext|
208
- File.directory?(file) ? FileList[File.join(file, "**/*.#{ext}")] : file
214
+ File.directory?(file) ? FileList[File.join(file, "**/*.#{ext}")] : File.expand_path(file)
209
215
  end
210
216
  end.flatten.reject { |file| @files.exclude?(file) }
211
217
  end
@@ -52,7 +52,7 @@ GROUP = "#{name}"
52
52
  COPYRIGHT = ""
53
53
 
54
54
  # Specify Maven 2.0 remote repositories here, like this:
55
- repositories.remote << "http://www.ibiblio.org/maven2/"
55
+ repositories.remote << "http://repo1.maven.org/maven2"
56
56
 
57
57
  desc "The #{name.capitalize} project"
58
58
  define "#{name}" do
@@ -122,7 +122,7 @@ define "#{name}" do
122
122
  legacy = repository["layout"].to_s =~ /legacy/
123
123
  !legacy
124
124
  } rescue nil
125
- repositories = [{"name" => "Standard maven2 repository", "url" => "http://www.ibiblio.org/maven2"}] if repositories.nil? || repositories.empty?
125
+ repositories = [{"name" => "Standard maven2 repository", "url" => "http://repo1.maven.org/maven2"}] if repositories.nil? || repositories.empty?
126
126
  repositories.each do |repository|
127
127
  name, url = repository["name"], repository["url"]
128
128
  script << "# #{name}"
@@ -23,7 +23,7 @@ module Buildr
23
23
 
24
24
  def run(task)
25
25
  fail "Missing :main option" unless task.options[:main]
26
- cp = project.compile.dependencies + [project.path_to(:target, :classes)] + task.classpath
26
+ cp = project.compile.dependencies + [project.path_to(:target, :classes), project.path_to(:target, :resources)] + task.classpath
27
27
  Java::Commands.java(task.options[:main], {
28
28
  :properties => jrebel_props(project).merge(task.options[:properties] || {}),
29
29
  :classpath => cp,
@@ -115,7 +115,7 @@ module Buildr
115
115
 
116
116
  private
117
117
  def jruby_home
118
- @jruby_home ||= RUBY_PLATFORM =~ /java/ ? Config::CONFIG['prefix'] : ENV['JRUBY_HOME']
118
+ @jruby_home ||= RUBY_PLATFORM =~ /java/ ? RbConfig::CONFIG['prefix'] : ENV['JRUBY_HOME']
119
119
  end
120
120
 
121
121
  def jruby_artifact
@@ -139,7 +139,7 @@ module Buildr
139
139
  # cases are written in Java, then JUnit is selected as the test framework. You can also select
140
140
  # a specific test framework, for example, to use TestNG instead of JUnit:
141
141
  # test.using :testng
142
- class TestTask < Rake::Task
142
+ class TestTask < ::Rake::Task
143
143
 
144
144
  class << self
145
145
 
@@ -32,7 +32,7 @@ module Buildr
32
32
  # For JRuby, the value for RUBY_PLATFORM will always be 'java'
33
33
  # That's why this function checks on Config::CONFIG['host_os']
34
34
  def win_os?
35
- Config::CONFIG['host_os'] =~ /windows|cygwin|bccwin|cygwin|djgpp|mingw|mswin|wince/i
35
+ RbConfig::CONFIG['host_os'] =~ /windows|cygwin|bccwin|cygwin|djgpp|mingw|mswin|wince/i
36
36
  end
37
37
 
38
38
  # Runs Ruby with these command line arguments. The last argument may be a hash,
@@ -43,7 +43,7 @@ module Buildr
43
43
  def ruby(*args)
44
44
  options = Hash === args.last ? args.pop : {}
45
45
  cmd = []
46
- ruby_bin = normalize_path(Config::CONFIG['ruby_install_name'], Config::CONFIG['bindir'])
46
+ ruby_bin = normalize_path(RbConfig::CONFIG['ruby_install_name'], RbConfig::CONFIG['bindir'])
47
47
  if options.delete(:sudo) && !(win_os? || Process.uid == File.stat(ruby_bin).uid)
48
48
  cmd << 'sudo' << '-u' << "##{File.stat(ruby_bin).uid}"
49
49
  end
@@ -250,16 +250,16 @@ module Buildr
250
250
  classpathentry.src project.test.resources
251
251
  end
252
252
 
253
+ project.eclipse.classpath_containers.each { |container|
254
+ classpathentry.con container
255
+ }
256
+
253
257
  # Classpath elements from other projects
254
258
  classpathentry.src_projects project_libs
255
259
 
256
260
  classpathentry.output project.compile.target if project.compile.target
257
261
  classpathentry.lib libs
258
262
  classpathentry.var vars
259
-
260
- project.eclipse.classpath_containers.each { |container|
261
- classpathentry.con container
262
- }
263
263
  end
264
264
  end
265
265
  end
@@ -238,6 +238,113 @@ module Buildr
238
238
  @skip_content = true
239
239
  end
240
240
 
241
+ def add_gwt_facet(modules = {}, options = {})
242
+ name = options[:name] || "GWT"
243
+ settings =
244
+ {
245
+ :webFacet => "Web",
246
+ :compilerMaxHeapSize => "512",
247
+ :compilerParameters => "-draftCompile -localWorkers 2 -strict",
248
+ :gwtSdkUrl => "file://$GWT_TOOLS$",
249
+ :gwtScriptOutputStyle => "PRETTY"
250
+ }.merge(options[:settings] || {})
251
+
252
+ add_facet(name, "gwt") do |f|
253
+ f.configuration do |c|
254
+ settings.each_pair do |k, v|
255
+ c.setting :name => k.to_s, :value => v.to_s
256
+ end
257
+ c.packaging do |d|
258
+ modules.each_pair do |k, v|
259
+ d.module :name => k, :enabled => v
260
+ end
261
+ end
262
+ end
263
+ end
264
+ end
265
+
266
+ def add_web_facet(options = {})
267
+ name = options[:name] || "Web"
268
+ url_base = options[:url_base] || "/"
269
+ default_webroots = [buildr_project._(:source, :main, :webapp)]
270
+ webroots = options[:webroots] || default_webroots
271
+ web_xml = options[:web_xml] || "#{buildr_project._(:source, :main, :webapp)}/WEB-INF/web.xml"
272
+ version = options[:version] || "3.0"
273
+
274
+ add_facet(name, "web") do |f|
275
+ f.configuration do |c|
276
+ c.descriptors do |d|
277
+ if File.exist?(web_xml) || default_web_xml != web_xml
278
+ d.deploymentDescriptor :name => 'web.xml', :url => file_path(web_xml), :optional => "true", :version => version
279
+ end
280
+ end
281
+ c.webroots do |w|
282
+ webroots.each do |webroot|
283
+ w.root :url => file_path(webroot), :relative => url_base
284
+ end
285
+ end
286
+ end
287
+ end
288
+ end
289
+
290
+ def add_jruby_facet(options = {})
291
+ name = options[:name] || "JRuby"
292
+ jruby_version = options[:jruby_version] || "jruby-1.5.2-p249"
293
+ add_facet(name, "JRUBY") do |f|
294
+ f.configuration(:number => 0) do |c|
295
+ c.JRUBY_FACET_CONFIG_ID :NAME => "JRUBY_SDK_NAME", :VALUE => jruby_version
296
+ end
297
+ end
298
+ end
299
+
300
+ def add_jpa_facet(options = {})
301
+ name = options[:name] || "JPA"
302
+ factory_entry = options[:factory_entry] || buildr_project.name.to_s
303
+ validation_enabled = options[:validation_enabled].nil? ? true : options[:validation_enabled]
304
+ provider_enabled = options[:provider_enabled] || 'Hibernate'
305
+ default_persistence_xml = buildr_project._(:source, :main, :resources, "META-INF/persistence.xml")
306
+ persistence_xml = options[:persistence_xml] || default_persistence_xml
307
+ default_orm_xml = buildr_project._(:source, :main, :resources, "META-INF/orm.xml")
308
+ orm_xml = options[:orm_xml] || default_orm_xml
309
+ add_facet(name, "jpa") do |f|
310
+ f.configuration do |c|
311
+ c.setting :name => "validation-enabled", :value => validation_enabled
312
+ c.setting :name => "provider-name", :value => provider_enabled
313
+ c.tag!('datasource-mapping') do |ds|
314
+ ds.tag!('factory-entry', :name => factory_entry)
315
+ end
316
+ if File.exist?(persistence_xml) || default_persistence_xml != persistence_xml
317
+ c.deploymentDescriptor :name => 'persistence.xml', :url => file_path(persistence_xml)
318
+ end
319
+ if File.exist?(orm_xml) || default_orm_xml != orm_xml
320
+ c.deploymentDescriptor :name => 'orm.xml', :url => file_path(orm_xml)
321
+ end
322
+ end
323
+ end
324
+ end
325
+
326
+ def add_ejb_facet(options = {})
327
+ name = options[:name] || "EJB"
328
+ default_ejb_xml = buildr_project._(:source, :main, :resources, "WEB-INF/ejb-jar.xml")
329
+ ejb_xml = options[:ejb_xml] || default_ejb_xml
330
+ ejb_roots = options[:ejb_roots] || [buildr_project.compile.sources, buildr_project.resources.sources].flatten
331
+
332
+ add_facet(name, "ejb") do |facet|
333
+ facet.configuration do |c|
334
+ c.descriptors do |d|
335
+ if File.exist?(ejb_xml) || default_ejb_xml != ejb_xml
336
+ d.deploymentDescriptor :name => 'ejb-jar.xml', :url => file_path(ejb_xml)
337
+ end
338
+ end
339
+ c.ejbRoots do |e|
340
+ ejb_roots.each do |ejb_root|
341
+ e.root :url => file_path(ejb_root)
342
+ end
343
+ end
344
+ end
345
+ end
346
+ end
347
+
241
348
  protected
242
349
 
243
350
  def test_dependency_details
@@ -445,6 +552,82 @@ module Buildr
445
552
  end
446
553
  end
447
554
 
555
+ def add_exploded_war_artifact(project, options = {})
556
+ artifact_name = options[:name] || project.iml.id
557
+ build_on_make = options[:build_on_make].nil? ? false : options[:build_on_make]
558
+
559
+ add_artifact(artifact_name, "exploded-war", build_on_make) do |xml|
560
+ dependencies = (options[:dependencies] || ([project] + project.compile.dependencies)).flatten
561
+ libraries, projects = partition_dependencies(dependencies)
562
+
563
+ ## The content here can not be indented
564
+ output_dir = options[:output_dir] || project._(:artifacts, artifact_name)
565
+ xml.tag!('output-path', output_dir)
566
+
567
+ xml.root :id => "root" do
568
+ xml.element :id => "directory", :name => "WEB-INF" do
569
+ xml.element :id => "directory", :name => "classes" do
570
+ projects.each do |p|
571
+ xml.element :id => "module-output", :name => p.iml.id
572
+ end
573
+ if options[:enable_jpa]
574
+ module_names = options[:jpa_module_names] || [project.iml.id]
575
+ module_names.each do |module_name|
576
+ facet_name = options[:jpa_facet_name] || "JPA"
577
+ xml.element :id => "jpa-descriptors", :facet => "#{module_name}/jpa/#{facet_name}"
578
+ end
579
+ end
580
+ if options[:enable_ejb]
581
+ module_names = options[:ejb_module_names] || [project.iml.id]
582
+ module_names.each do |module_name|
583
+ facet_name = options[:ejb_facet_name] || "EJB"
584
+ xml.element :id => "javaee-facet-resources", :facet => "#{module_name}/ejb/#{facet_name}"
585
+ end
586
+ end
587
+ end
588
+ xml.element :id => "directory", :name => "lib" do
589
+ libraries.each(&:invoke).map(&:to_s).each do |dependency_path|
590
+ xml.element :id => "file-copy", :path => resolve_path(dependency_path)
591
+ end
592
+ end
593
+ end
594
+
595
+ if options[:enable_war].nil? || options[:enable_war]
596
+ module_names = options[:war_module_names] || [project.iml.id]
597
+ module_names.each do |module_name|
598
+ facet_name = options[:war_facet_name] || "Web"
599
+ xml.element :id => "javaee-facet-resources", :facet => "#{module_name}/web/#{facet_name}"
600
+ end
601
+ end
602
+
603
+ if options[:enable_gwt]
604
+ module_names = options[:gwt_module_names] || [project.iml.id]
605
+ module_names.each do |module_name|
606
+ facet_name = options[:gwt_facet_name] || "GWT"
607
+ xml.element :id => "gwt-compiler-output", :facet => "#{module_name}/gwt/#{facet_name}"
608
+ end
609
+ end
610
+ end
611
+ end
612
+ end
613
+
614
+ def add_gwt_configuration(launch_page, project, options = {})
615
+ name = options[:name] || "Run #{launch_page}"
616
+ shell_parameters = options[:shell_parameters] || ""
617
+ vm_parameters = options[:vm_parameters] || "-Xmx512m"
618
+
619
+ add_configuration(name, "GWT.ConfigurationType", "GWT Configuration") do |xml|
620
+ xml.module(:name => project.iml.id)
621
+ xml.option(:name => "RUN_PAGE", :value => launch_page)
622
+ xml.option(:name => "SHELL_PARAMETERS", :value => shell_parameters)
623
+ xml.option(:name => "VM_PARAMETERS", :value => vm_parameters)
624
+
625
+ xml.RunnerSettings(:RunnerId => "Run")
626
+ xml.ConfigurationWrapper(:RunnerId => "Run")
627
+ xml.method()
628
+ end
629
+ end
630
+
448
631
  protected
449
632
 
450
633
  def extension
@@ -509,7 +692,7 @@ module Buildr
509
692
  if subproject.iml.group == true
510
693
  attribs[:group] = subproject.parent.name.gsub(':', '/')
511
694
  elsif !subproject.iml.group.nil?
512
- attribs[:group] = subproject.group.to_s
695
+ attribs[:group] = subproject.iml.group.to_s
513
696
  end
514
697
  xml.module attribs
515
698
  end
@@ -22,7 +22,7 @@ module Buildr
22
22
  module Ant
23
23
 
24
24
  # Which version of Ant we're using by default.
25
- VERSION = '1.8.0'
25
+ VERSION = '1.8.3'
26
26
 
27
27
  class << self
28
28
  # Current version of Ant being used.
@@ -34,8 +34,7 @@ module Buildr
34
34
  def dependencies
35
35
  # Ant-Trax required for running the JUnitReport task, and there's no other place
36
36
  # to put it but the root classpath.
37
- @dependencies ||= ["org.apache.ant:ant:jar:#{version}", "org.apache.ant:ant-launcher:jar:#{version}",
38
- "org.apache.ant:ant-trax:jar:#{version}"]
37
+ @dependencies ||= ["org.apache.ant:ant:jar:#{version}", "org.apache.ant:ant-launcher:jar:#{version}"]
39
38
  end
40
39
 
41
40
  private
@@ -115,7 +115,7 @@ module Buildr
115
115
  end
116
116
 
117
117
  def jruby_home
118
- @jruby_home ||= RUBY_PLATFORM =~ /java/ ? Config::CONFIG['prefix'] :
118
+ @jruby_home ||= RUBY_PLATFORM =~ /java/ ? RbConfig::CONFIG['prefix'] :
119
119
  ( ENV['JRUBY_HOME'] || File.expand_path('~/.jruby') )
120
120
  end
121
121
 
@@ -166,7 +166,7 @@ module Buildr
166
166
  require 'jruby'
167
167
  def JRuby.gem(name, version = '>0', *args)
168
168
  require 'rbconfig'
169
- jruby_home = Config::CONFIG['prefix']
169
+ jruby_home = RbConfig::CONFIG['prefix']
170
170
  expected_version = '#{TestFramework::JRubyBased.version}'
171
171
  unless JRUBY_VERSION >= expected_version
172
172
  fail "Expected JRuby version \#{expected_version} installed at \#{jruby_home} but got \#{JRUBY_VERSION}"
@@ -194,7 +194,7 @@ module Buildr
194
194
  runner.requires ||= []
195
195
  runner.requires.unshift File.join(File.dirname(__FILE__), 'test_result')
196
196
  runner.gems ||= {}
197
- runner.rspec ||= ['--format', 'progress', '--format', "html:#{runner.html_report}"]
197
+ runner.rspec ||= ['--format', 'progress', '--format', 'documentation']
198
198
  runner.format.each { |format| runner.rspec << '--format' << format } if runner.format
199
199
  runner.rspec.push '--format', "Buildr::TestFramework::TestResult::YamlFormatter"
200
200
  runner.rspec.push '-o', runner.result
@@ -240,7 +240,7 @@ module Buildr
240
240
 
241
241
  def runner_config
242
242
  runner = super
243
- runner.gems.update 'rspec' => '~> 2.1.0'
243
+ runner.gems.update 'rspec' => '~> 2.9.0'
244
244
  runner.requires.unshift 'rspec'
245
245
  runner
246
246
  end
@@ -103,10 +103,10 @@ module Buildr
103
103
  if options[:scopes].include?(spec[:scope])
104
104
  spec.delete(:scope)
105
105
 
106
- exclusions = dep["exclusions"]["exclusion"] rescue nil
106
+ exclusions = dep["exclusions"].first["exclusion"] rescue nil
107
107
  transitive_deps = POM.load(spec).dependencies(options[:scopes_transitive] || SCOPES_TRANSITIVE)
108
108
  transitive_deps = transitive_deps.reject{|dep|
109
- exclusions.find {|ex| dep.index("#{dep['groupdId'].first}:#{dep['artifactId'].first}:") == 0}
109
+ exclusions.find {|ex| dep.index("#{ex['groupId'].first}:#{ex['artifactId'].first}:") == 0}
110
110
  } if exclusions
111
111
 
112
112
  [Artifact.to_spec(spec)] + transitive_deps
@@ -130,7 +130,7 @@ module Buildr
130
130
  hash
131
131
  }
132
132
  props = project["properties"].first rescue {}
133
- props = props.inject({}) { |mapped, pair| mapped[pair.first] = value_of(pair.last, pom) ; mapped }
133
+ props = props.inject({}) { |mapped, pair| mapped[pair.first] = value_of(pair.last, props) ; mapped }
134
134
  (parent ? parent.properties.merge(props) : props).merge(pom)
135
135
  end
136
136
  end
@@ -164,7 +164,8 @@ module Buildr
164
164
  # property substitution.
165
165
  def value_of(element, substitute = nil)
166
166
  value = element.to_a.join.strip
167
- substitute ? value.gsub(/\$\{([^}]+)\}/) { |key| substitute[$1] } : value
167
+ value = value.gsub(/\$\{([^}]+)\}/) { |key| Array(substitute[$1]).join.strip } if substitute
168
+ value
168
169
  end
169
170
 
170
171
  # :call-seq: