buildr 1.4.4-x86-mswin32 → 1.4.5-x86-mswin32
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.
- data/CHANGELOG +46 -0
- data/Rakefile +0 -1
- data/addon/buildr/bnd.rb +147 -0
- data/addon/buildr/jaxb_xjc.rb +72 -0
- data/addon/buildr/protobuf.rb +14 -1
- data/buildr.gemspec +6 -2
- data/doc/artifacts.textile +6 -0
- data/doc/contributing.textile +3 -0
- data/doc/download.textile +60 -0
- data/doc/index.textile +9 -15
- data/doc/installing.textile +23 -6
- data/doc/mailing_lists.textile +4 -0
- data/doc/more_stuff.textile +333 -6
- data/doc/packaging.textile +187 -1
- data/lib/buildr.rb +8 -1
- data/lib/buildr/clojure.rb +34 -0
- data/lib/buildr/clojure/shell.rb +52 -0
- data/lib/buildr/core.rb +3 -0
- data/lib/buildr/core/#application.rb# +700 -0
- data/lib/buildr/core/application.rb +18 -8
- data/lib/buildr/core/build.rb +2 -2
- data/lib/buildr/core/cc.rb +57 -63
- data/lib/buildr/core/checks.rb +4 -5
- data/lib/buildr/core/doc.rb +3 -1
- data/lib/buildr/core/generate.rb +2 -0
- data/lib/buildr/core/jrebel.rb +42 -0
- data/lib/buildr/core/linux.rb +30 -0
- data/lib/buildr/core/project.rb +9 -8
- data/lib/buildr/core/run.rb +3 -3
- data/lib/buildr/core/shell.rb +29 -90
- data/lib/buildr/core/test.rb +3 -3
- data/lib/buildr/core/transports.rb +5 -5
- data/lib/buildr/core/util.rb +2 -2
- data/lib/buildr/groovy.rb +1 -0
- data/lib/buildr/groovy/compiler.rb +12 -1
- data/lib/buildr/groovy/doc.rb +76 -0
- data/lib/buildr/groovy/shell.rb +24 -15
- data/lib/buildr/ide.rb +1 -1
- data/lib/buildr/ide/idea.rb +527 -141
- data/lib/buildr/java/bdd.rb +18 -13
- data/lib/buildr/java/ecj.rb +1 -3
- data/lib/buildr/java/jtestr_result.rb +295 -0
- data/lib/buildr/java/jtestr_runner.rb.erb +4 -6
- data/lib/buildr/java/packaging.rb +14 -3
- data/lib/buildr/java/pom.rb +6 -2
- data/lib/buildr/java/test_result.rb +15 -243
- data/lib/buildr/java/tests.rb +1 -1
- data/lib/buildr/packaging.rb +2 -1
- data/lib/buildr/packaging/#package.rb.rej# +19 -0
- data/lib/buildr/packaging/archive.rb +13 -3
- data/lib/buildr/packaging/artifact.rb +11 -12
- data/lib/buildr/packaging/tar.rb +4 -1
- data/lib/buildr/packaging/zip.rb +106 -1
- data/lib/buildr/resources/completed.png +0 -0
- data/lib/buildr/resources/failed.png +0 -0
- data/lib/buildr/resources/icons-license.txt +17 -0
- data/lib/buildr/run.rb +7 -14
- data/lib/buildr/scala/#Untitled-2# +7 -0
- data/lib/buildr/scala/bdd.rb +1 -1
- data/lib/buildr/scala/compiler.rb +1 -1
- data/lib/buildr/scala/doc.rb +20 -2
- data/lib/buildr/scala/shell.rb +14 -22
- data/lib/buildr/scala/tests.rb +2 -2
- data/lib/buildr/shell.rb +113 -108
- data/lib/buildr/version.rb +1 -1
- data/rakelib/checks.rake +9 -7
- data/rakelib/doc.rake +10 -0
- data/rakelib/release.rake +9 -0
- data/rakelib/rspec.rake +27 -28
- data/rakelib/setup.rake +1 -1
- data/rakelib/stage.rake +2 -2
- data/spec/addon/bnd_spec.rb +330 -0
- data/spec/addon/jaxb_xjc_spec.rb +125 -0
- data/spec/core/application_spec.rb +1 -1
- data/spec/core/build_spec.rb +7 -7
- data/spec/core/cc_spec.rb +154 -104
- data/spec/core/compile_spec.rb +3 -3
- data/spec/core/project_spec.rb +10 -0
- data/spec/core/run_spec.rb +1 -0
- data/spec/core/shell_spec.rb +146 -0
- data/spec/groovy/doc_spec.rb +65 -0
- data/spec/ide/eclipse_spec.rb +1 -1
- data/spec/ide/idea_spec.rb +1145 -0
- data/spec/java/bdd_spec.rb +3 -3
- data/spec/java/emma_spec.rb +2 -0
- data/spec/java/packaging_spec.rb +40 -11
- data/spec/java/test_coverage_helper.rb +1 -1
- data/spec/packaging/archive_spec.rb +76 -21
- data/spec/packaging/artifact_namespace_spec.rb +1 -1
- data/spec/packaging/artifact_spec.rb +14 -7
- data/spec/sandbox.rb +11 -4
- data/spec/scala/bdd_spec.rb +2 -2
- data/spec/scala/compiler_spec.rb +2 -2
- data/spec/scala/doc_spec.rb +24 -4
- data/spec/scala/scala.rb +2 -2
- data/spec/scala/tests_spec.rb +2 -2
- data/spec/spec_helpers.rb +9 -8
- data/spec/xpath_matchers.rb +121 -0
- metadata +246 -166
- data/lib/buildr/ide/idea.ipr.template +0 -300
- data/lib/buildr/ide/idea7x.ipr.template +0 -290
- data/lib/buildr/ide/idea7x.rb +0 -231
- data/spec/ide/idea7x_spec.rb +0 -96
@@ -38,9 +38,9 @@
|
|
38
38
|
|
39
39
|
require 'rake'
|
40
40
|
require 'highline/import'
|
41
|
-
require 'rubygems/source_info_cache'
|
41
|
+
require 'rubygems/source_info_cache' if Gem::VERSION =~ /1.[0-4]/
|
42
42
|
require 'buildr/core/util'
|
43
|
-
Gem.autoload :SourceInfoCache, 'rubygems/source_info_cache'
|
43
|
+
Gem.autoload :SourceInfoCache, 'rubygems/source_info_cache' if Gem::VERSION =~ /1.[0-4]/
|
44
44
|
|
45
45
|
|
46
46
|
# Gem::user_home is nice, but ENV['HOME'] lets you override from the environment.
|
@@ -187,6 +187,20 @@ module Buildr
|
|
187
187
|
@on_failure << block
|
188
188
|
end
|
189
189
|
|
190
|
+
# Call on_completion hooks with the given title and message
|
191
|
+
def build_completed(title, message)
|
192
|
+
@on_completion.each do |block|
|
193
|
+
block.call(title, message) rescue nil
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
# Call on_failure hooks with the given title, message and exception
|
198
|
+
def build_failed(title, message, ex = nil)
|
199
|
+
@on_failure.each do |block|
|
200
|
+
block.call(title, message, ex) rescue nil
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
190
204
|
# :call-seq:
|
191
205
|
# deprecated(message)
|
192
206
|
#
|
@@ -241,9 +255,7 @@ module Buildr
|
|
241
255
|
# On OS X this will load Cocoa and Growl which takes half a second we
|
242
256
|
# don't want to measure, so put this after the console message.
|
243
257
|
title, message = "Your build has completed", "#{Dir.pwd}\nbuildr #{@top_level_tasks.join(' ')}"
|
244
|
-
|
245
|
-
block.call(title, message) rescue nil
|
246
|
-
end
|
258
|
+
build_completed(title, message)
|
247
259
|
end
|
248
260
|
end
|
249
261
|
end
|
@@ -530,9 +542,7 @@ module Buildr
|
|
530
542
|
rescue Exception => ex
|
531
543
|
ex_msg = ex.class.name == "Exception" ? ex.message : "#{ex.class.name} : #{ex.message}"
|
532
544
|
title, message = "Your build failed with an error", "#{Dir.pwd}:\n#{ex_msg}"
|
533
|
-
|
534
|
-
block.call(title, message, ex) rescue nil
|
535
|
-
end
|
545
|
+
build_failed(title, message, ex)
|
536
546
|
# Exit with error message
|
537
547
|
$stderr.puts "Buildr aborted!"
|
538
548
|
$stderr.puts $terminal.color(ex_msg, :red)
|
data/lib/buildr/core/build.rb
CHANGED
@@ -211,7 +211,7 @@ module Buildr
|
|
211
211
|
end
|
212
212
|
|
213
213
|
def copy(dir, url, message)
|
214
|
-
svn 'copy', dir, url, '-m', message
|
214
|
+
svn 'copy', '--parents', dir, url, '-m', message
|
215
215
|
end
|
216
216
|
|
217
217
|
def remove(url, message)
|
@@ -513,4 +513,4 @@ end
|
|
513
513
|
|
514
514
|
class Buildr::Project
|
515
515
|
include Buildr::Build
|
516
|
-
end
|
516
|
+
end
|
data/lib/buildr/core/cc.rb
CHANGED
@@ -33,117 +33,112 @@ module Buildr
|
|
33
33
|
|
34
34
|
private
|
35
35
|
|
36
|
+
# run block on sub-projects depth-first, then on this project
|
37
|
+
def each_project(&block)
|
38
|
+
depth_first = lambda do |p|
|
39
|
+
p.projects.each { |c| depth_first.call(c, &block) }
|
40
|
+
block.call(p)
|
41
|
+
end
|
42
|
+
depth_first.call(@project)
|
43
|
+
end
|
44
|
+
|
36
45
|
def associate_with(project)
|
37
46
|
@project = project
|
38
47
|
end
|
39
48
|
|
40
49
|
def monitor_and_compile
|
41
|
-
# we don't want to actually fail if our dependencies don't
|
50
|
+
# we don't want to actually fail if our dependencies don't succeed
|
42
51
|
begin
|
43
|
-
|
44
|
-
|
52
|
+
each_project { |p| p.test.compile.invoke }
|
53
|
+
build_completed(project)
|
45
54
|
rescue Exception => ex
|
46
55
|
$stderr.puts $terminal.color(ex.message, :red)
|
47
56
|
$stderr.puts
|
48
57
|
|
49
|
-
|
58
|
+
build_failed(project, ex)
|
50
59
|
end
|
51
60
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
res_tail = if res_dirs.empty? then '' else ",{#{res_dirs.join ','}}/**/*" end
|
61
|
-
|
62
|
-
pattern = "{{#{main_dirs.join ','}}/**/*.{#{main_ext.join ','}}#{test_tail}#{res_tail}}"
|
63
|
-
|
64
|
-
times, _ = check_mtime pattern, {} # establish baseline
|
65
|
-
|
66
|
-
dir_names = (main_dirs + test_dirs + res_dirs).map { |file| strip_filename project, file }
|
67
|
-
if dir_names.length == 1
|
68
|
-
info "Monitoring directory: #{dir_names.first}"
|
61
|
+
dirs = []
|
62
|
+
each_project do |p|
|
63
|
+
dirs += p.compile.sources.map(&:to_s)
|
64
|
+
dirs += p.test.compile.sources.map(&:to_s)
|
65
|
+
dirs += p.resources.sources.map(&:to_s)
|
66
|
+
end
|
67
|
+
if dirs.length == 1
|
68
|
+
info "Monitoring directory: #{dirs.first}"
|
69
69
|
else
|
70
|
-
info "Monitoring directories: [#{
|
70
|
+
info "Monitoring directories: [#{dirs.join ', '}]"
|
71
71
|
end
|
72
|
-
|
72
|
+
|
73
|
+
timestamps = lambda do
|
74
|
+
times = {}
|
75
|
+
dirs.each { |d| Dir.glob("#{d}/**/*").map { |f| times[f] = File.mtime f } }
|
76
|
+
times
|
77
|
+
end
|
78
|
+
|
79
|
+
old_times = timestamps.call()
|
73
80
|
|
74
81
|
while true
|
75
82
|
sleep delay
|
76
83
|
|
77
|
-
|
84
|
+
new_times = timestamps.call()
|
85
|
+
changed = changed(new_times, old_times)
|
86
|
+
old_times = new_times
|
87
|
+
|
78
88
|
unless changed.empty?
|
79
89
|
info '' # better spacing
|
80
90
|
|
81
91
|
changed.each do |file|
|
82
|
-
info "Detected changes in #{
|
83
|
-
end
|
84
|
-
|
85
|
-
in_main = main_dirs.any? do |dir|
|
86
|
-
changed.any? { |file| file.index(dir) == 0 }
|
92
|
+
info "Detected changes in #{file}"
|
87
93
|
end
|
88
94
|
|
89
|
-
|
90
|
-
|
95
|
+
each_project do |p|
|
96
|
+
# transitively reenable prerequisites
|
97
|
+
reenable = lambda do |t|
|
98
|
+
t = task(t)
|
99
|
+
t.reenable
|
100
|
+
t.prerequisites.each { |c| reenable.call(c) }
|
101
|
+
end
|
102
|
+
reenable.call(p.test.compile)
|
91
103
|
end
|
92
104
|
|
93
|
-
in_res = res_dirs.any? do |dir|
|
94
|
-
changed.any? { |file| file.index(dir) == 0 }
|
95
|
-
end
|
96
|
-
|
97
|
-
project.task(:compile).reenable if in_main
|
98
|
-
project.task('test:compile').reenable if in_test || in_main
|
99
|
-
|
100
105
|
successful = true
|
101
106
|
begin
|
102
|
-
|
103
|
-
project
|
104
|
-
project.task('test:compile').invoke if in_test || in_main
|
107
|
+
each_project { |p| p.test.compile.invoke }
|
108
|
+
build_completed(project)
|
105
109
|
rescue Exception => ex
|
106
110
|
$stderr.puts $terminal.color(ex.message, :red)
|
111
|
+
build_failed(project, ex)
|
107
112
|
successful = false
|
108
113
|
end
|
109
114
|
|
110
|
-
notify_build_status(successful, project)
|
111
115
|
puts $terminal.color("Build complete", :green) if successful
|
112
116
|
end
|
113
117
|
end
|
114
118
|
end
|
115
119
|
|
116
|
-
def
|
117
|
-
|
118
|
-
if successful
|
119
|
-
growl_notify('Completed', 'Your build has completed', project.path_to)
|
120
|
-
else
|
121
|
-
growl_notify('Failed', 'Your build has failed with an error', project.path_to)
|
122
|
-
end
|
123
|
-
end
|
120
|
+
def build_completed(project)
|
121
|
+
Buildr.application.build_completed('Compilation successful', project.path_to)
|
124
122
|
end
|
125
123
|
|
126
|
-
def
|
127
|
-
|
128
|
-
|
124
|
+
def build_failed(project, ex = nil)
|
125
|
+
Buildr.application.build_failed('Compilation failed', project.path_to, ex)
|
126
|
+
end
|
129
127
|
|
130
|
-
|
131
|
-
|
132
|
-
|
128
|
+
def changed(new_times, old_times)
|
129
|
+
changed = []
|
130
|
+
new_times.each do |(fname,newtime)|
|
131
|
+
if old_times[fname].nil? || old_times[fname] < newtime
|
133
132
|
changed << fname
|
134
133
|
end
|
135
134
|
end
|
136
135
|
|
137
136
|
# detect deletion (slower than it could be)
|
138
137
|
old_times.each_key do |fname|
|
139
|
-
changed << fname unless
|
138
|
+
changed << fname unless new_times.has_key? fname
|
140
139
|
end
|
141
140
|
|
142
|
-
|
143
|
-
end
|
144
|
-
|
145
|
-
def strip_filename(project, name)
|
146
|
-
name.gsub project.base_dir + File::SEPARATOR, ''
|
141
|
+
changed
|
147
142
|
end
|
148
143
|
end
|
149
144
|
|
@@ -158,7 +153,6 @@ module Buildr
|
|
158
153
|
before_define do |project|
|
159
154
|
cc = CCTask.define_task :cc
|
160
155
|
cc.send :associate_with, project
|
161
|
-
project.recursive_task(:cc)
|
162
156
|
end
|
163
157
|
|
164
158
|
def cc
|
data/lib/buildr/core/checks.rb
CHANGED
@@ -15,8 +15,7 @@
|
|
15
15
|
|
16
16
|
|
17
17
|
require 'buildr/core/project'
|
18
|
-
autoload :
|
19
|
-
|
18
|
+
autoload :RSpec, 'rspec'
|
20
19
|
|
21
20
|
module Buildr
|
22
21
|
# Methods added to Project to allow checking the build.
|
@@ -90,7 +89,7 @@ module Buildr
|
|
90
89
|
@description = args.pop if String === args.last
|
91
90
|
@subject = args.shift
|
92
91
|
raise ArgumentError, "Expecting subject followed by description, and either one is optional. Not quite sure what to do with this list of arguments." unless args.empty?
|
93
|
-
@block = block || lambda { info "Pending: #{description}" }
|
92
|
+
@block = block || lambda { |klass| info "Pending: #{description}" }
|
94
93
|
end
|
95
94
|
|
96
95
|
# :call-seq:
|
@@ -120,7 +119,7 @@ module Buildr
|
|
120
119
|
end
|
121
120
|
define_method(:it) { subject }
|
122
121
|
define_method(:description) { description }
|
123
|
-
include
|
122
|
+
include ::RSpec::Matchers
|
124
123
|
include Matchers
|
125
124
|
end
|
126
125
|
|
@@ -148,8 +147,8 @@ module Buildr
|
|
148
147
|
passed
|
149
148
|
rescue Exception=>ex
|
150
149
|
if verbose
|
151
|
-
error ex.backtrace.select { |line| line =~ /#{Buildr.application.buildfile}/ }.join("\n")
|
152
150
|
error ex
|
151
|
+
error ex.backtrace.select { |line| line =~ /#{Buildr.application.buildfile}/ }.join("\n")
|
153
152
|
end
|
154
153
|
false
|
155
154
|
end
|
data/lib/buildr/core/doc.rb
CHANGED
@@ -204,7 +204,9 @@ module Buildr
|
|
204
204
|
|
205
205
|
def source_files #:nodoc:
|
206
206
|
@source_files ||= @files.map(&:to_s).map do |file|
|
207
|
-
|
207
|
+
Array(engine.class.source_ext).map do |ext|
|
208
|
+
File.directory?(file) ? FileList[File.join(file, "**/*.#{ext}")] : file
|
209
|
+
end
|
208
210
|
end.flatten.reject { |file| @files.exclude?(file) }
|
209
211
|
end
|
210
212
|
|
data/lib/buildr/core/generate.rb
CHANGED
@@ -47,6 +47,8 @@ module Buildr
|
|
47
47
|
if root
|
48
48
|
script = HEADER.split("\n")
|
49
49
|
header = <<-EOF
|
50
|
+
#{"require 'buildr/scala'\n" if Dir.glob(path + "/**/*.scala").size > 0}
|
51
|
+
#{"require 'buildr/groovy'\n" if Dir.glob(path + "/**/*.groovy").size > 0}
|
50
52
|
# Version number for this release
|
51
53
|
VERSION_NUMBER = "1.0.0"
|
52
54
|
# Group identifier for your projects
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
+
# contributor license agreements. See the NOTICE file distributed with this
|
3
|
+
# work for additional information regarding copyright ownership. The ASF
|
4
|
+
# licenses this file to you under the Apache License, Version 2.0 (the
|
5
|
+
# "License"); you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
# License for the specific language governing permissions and limitations under
|
14
|
+
# the License.
|
15
|
+
|
16
|
+
module Buildr
|
17
|
+
module JRebel
|
18
|
+
def jrebel_home
|
19
|
+
unless @jrebel_home
|
20
|
+
@jrebel_home = ENV['REBEL_HOME'] || ENV['JREBEL'] || ENV['JREBEL_HOME']
|
21
|
+
end
|
22
|
+
|
23
|
+
(@jrebel_home && File.exists?(@jrebel_home)) ? @jrebel_home : nil
|
24
|
+
end
|
25
|
+
|
26
|
+
def rebel_jar
|
27
|
+
if jrebel_home
|
28
|
+
# jrebel_home may point to jrebel.jar directly
|
29
|
+
File.directory?(jrebel_home) ? File.join(jrebel_home, 'jrebel.jar') : jrebel_home
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def jrebel_args
|
34
|
+
rebel_jar ? [ '-noverify', "-javaagent:#{rebel_jar}" ] : []
|
35
|
+
end
|
36
|
+
|
37
|
+
def jrebel_props(project)
|
38
|
+
{}
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
2
|
+
# contributor license agreements. See the NOTICE file distributed with this
|
3
|
+
# work for additional information regarding copyright ownership. The ASF
|
4
|
+
# licenses this file to you under the Apache License, Version 2.0 (the
|
5
|
+
# "License"); you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
12
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
13
|
+
# License for the specific language governing permissions and limitations under
|
14
|
+
# the License.
|
15
|
+
|
16
|
+
|
17
|
+
# Let's see if we can use notify-send. Must be running from console in verbose mode.
|
18
|
+
if $stdout.isatty && verbose
|
19
|
+
system("which notify-send > /dev/null 2>/dev/null")
|
20
|
+
if $?.exitstatus == 0
|
21
|
+
def notify_send(type, title, message)
|
22
|
+
icon = File.join(File.dirname(__FILE__), '../resources/', type.to_s + '.png')
|
23
|
+
system "notify-send -i #{icon} \"#{title}\" \"#{message}\""
|
24
|
+
end
|
25
|
+
|
26
|
+
Buildr.application.on_completion { |title, message| notify_send(:completed, title, message) if verbose }
|
27
|
+
Buildr.application.on_failure { |title, message, ex| notify_send(:failed, title, message) if verbose }
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
data/lib/buildr/core/project.rb
CHANGED
@@ -235,8 +235,9 @@ module Buildr
|
|
235
235
|
# project(name) => project
|
236
236
|
#
|
237
237
|
# See Buildr#project.
|
238
|
-
def project(*args) #:nodoc:
|
238
|
+
def project(*args, &block) #:nodoc:
|
239
239
|
options = args.pop if Hash === args.last
|
240
|
+
return define(args.first, options, &block) if block
|
240
241
|
rake_check_options options, :scope if options
|
241
242
|
raise ArgumentError, 'Only one project name at a time' unless args.size == 1
|
242
243
|
@projects ||= {}
|
@@ -557,7 +558,7 @@ module Buildr
|
|
557
558
|
# define 'foo' do
|
558
559
|
# project.version = '1.0'
|
559
560
|
# end
|
560
|
-
def project(*args)
|
561
|
+
def project(*args, &block)
|
561
562
|
if Hash === args.last
|
562
563
|
options = args.pop
|
563
564
|
else
|
@@ -566,7 +567,7 @@ module Buildr
|
|
566
567
|
if args.empty?
|
567
568
|
self
|
568
569
|
else
|
569
|
-
Project.project *(args + [{ :scope=>self.name }.merge(options)])
|
570
|
+
Project.project *(args + [{ :scope=>self.name }.merge(options)]), &block
|
570
571
|
end
|
571
572
|
end
|
572
573
|
|
@@ -641,7 +642,7 @@ module Buildr
|
|
641
642
|
def call_callbacks(phase) #:nodoc:
|
642
643
|
remaining = @callbacks.select { |cb| cb.phase == phase }
|
643
644
|
known_callbacks = remaining.map { |cb| cb.name }
|
644
|
-
|
645
|
+
|
645
646
|
# call each extension in order
|
646
647
|
until remaining.empty?
|
647
648
|
callback = first_satisfied(remaining, known_callbacks)
|
@@ -652,9 +653,9 @@ module Buildr
|
|
652
653
|
callback.blocks.each { |b| b.call(self) }
|
653
654
|
end
|
654
655
|
end
|
655
|
-
|
656
|
+
|
656
657
|
private
|
657
|
-
|
658
|
+
|
658
659
|
# find first callback with satisfied dependencies
|
659
660
|
def first_satisfied(r, known_callbacks)
|
660
661
|
remaining_names = r.map { |cb| cb.name }
|
@@ -944,8 +945,8 @@ module Buildr
|
|
944
945
|
# end
|
945
946
|
#
|
946
947
|
# puts project('myapp:beans').version
|
947
|
-
def project(*args)
|
948
|
-
Project.project *args
|
948
|
+
def project(*args, &block)
|
949
|
+
Project.project *args, &block
|
949
950
|
end
|
950
951
|
|
951
952
|
# :call-seq:
|
data/lib/buildr/core/run.rb
CHANGED
@@ -21,7 +21,7 @@ module Buildr
|
|
21
21
|
module Run
|
22
22
|
|
23
23
|
class JavaRunner < Base
|
24
|
-
include
|
24
|
+
include Buildr::JRebel
|
25
25
|
|
26
26
|
specify :name => :java, :languages => [:java, :scala, :groovy, :clojure]
|
27
27
|
|
@@ -29,9 +29,9 @@ module Buildr
|
|
29
29
|
fail "Missing :main option" unless task.options[:main]
|
30
30
|
cp = project.compile.dependencies + [project.path_to(:target, :classes)] + task.classpath
|
31
31
|
Java::Commands.java(task.options[:main], {
|
32
|
-
:properties =>
|
32
|
+
:properties => jrebel_props(project).merge(task.options[:properties] || {}),
|
33
33
|
:classpath => cp,
|
34
|
-
:java_args =>
|
34
|
+
:java_args => jrebel_args + (task.options[:java_args] || [])
|
35
35
|
})
|
36
36
|
end
|
37
37
|
end # JavaRunnner
|