buildr 1.3.5-java → 1.4.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (151) hide show
  1. data/CHANGELOG +153 -8
  2. data/README.rdoc +1 -1
  3. data/addon/buildr/antlr.rb +5 -5
  4. data/addon/buildr/drb.rb +18 -18
  5. data/addon/buildr/hibernate.rb +18 -14
  6. data/addon/buildr/javacc.rb +4 -4
  7. data/addon/buildr/jetty.rb +5 -5
  8. data/addon/buildr/nailgun.rb +23 -23
  9. data/addon/buildr/openjpa.rb +1 -1
  10. data/addon/buildr/org/apache/buildr/BuildrNail$Main.class +0 -0
  11. data/addon/buildr/org/apache/buildr/BuildrNail.class +0 -0
  12. data/addon/buildr/org/apache/buildr/JettyWrapper$1.class +0 -0
  13. data/addon/buildr/org/apache/buildr/JettyWrapper$BuildrHandler.class +0 -0
  14. data/addon/buildr/org/apache/buildr/JettyWrapper.class +0 -0
  15. data/addon/buildr/protobuf.rb +75 -0
  16. data/addon/buildr/xmlbeans.rb +5 -5
  17. data/buildr.buildfile +2 -2
  18. data/buildr.gemspec +8 -7
  19. data/doc/_layouts/default.html +2 -2
  20. data/doc/artifacts.textile +4 -4
  21. data/doc/building.textile +35 -3
  22. data/doc/contributing.textile +5 -0
  23. data/doc/download.textile +16 -5
  24. data/doc/extending.textile +38 -12
  25. data/doc/installing.textile +6 -5
  26. data/doc/languages.textile +182 -42
  27. data/doc/more_stuff.textile +2 -2
  28. data/doc/packaging.textile +14 -15
  29. data/doc/projects.textile +7 -2
  30. data/doc/quick_start.textile +4 -4
  31. data/doc/scripts/buildr-git.rb +63 -63
  32. data/doc/scripts/gitflow.rb +21 -21
  33. data/doc/settings_profiles.textile +9 -2
  34. data/doc/testing.textile +16 -5
  35. data/etc/KEYS +38 -0
  36. data/lib/buildr.rb +1 -1
  37. data/lib/buildr/core.rb +1 -0
  38. data/lib/buildr/core/application.rb +33 -27
  39. data/lib/buildr/core/build.rb +41 -28
  40. data/lib/buildr/core/cc.rb +172 -0
  41. data/lib/buildr/core/checks.rb +1 -1
  42. data/lib/buildr/core/common.rb +7 -6
  43. data/lib/buildr/core/compile.rb +7 -8
  44. data/lib/buildr/core/doc.rb +263 -0
  45. data/lib/buildr/core/environment.rb +6 -6
  46. data/lib/buildr/core/filter.rb +77 -35
  47. data/lib/buildr/core/generate.rb +7 -7
  48. data/lib/buildr/core/help.rb +1 -1
  49. data/lib/buildr/core/osx.rb +6 -6
  50. data/lib/buildr/core/progressbar.rb +4 -4
  51. data/lib/buildr/core/project.rb +144 -36
  52. data/lib/buildr/core/shell.rb +34 -34
  53. data/lib/buildr/core/test.rb +89 -20
  54. data/lib/buildr/core/transports.rb +8 -7
  55. data/lib/buildr/core/util.rb +77 -23
  56. data/lib/buildr/groovy/bdd.rb +5 -5
  57. data/lib/buildr/groovy/compiler.rb +19 -15
  58. data/lib/buildr/groovy/shell.rb +6 -6
  59. data/lib/buildr/ide/eclipse.rb +148 -75
  60. data/lib/buildr/ide/eclipse/java.rb +3 -3
  61. data/lib/buildr/ide/eclipse/plugin.rb +8 -5
  62. data/lib/buildr/ide/eclipse/scala.rb +4 -2
  63. data/lib/buildr/ide/idea.rb +2 -2
  64. data/lib/buildr/ide/idea7x.rb +23 -4
  65. data/lib/buildr/java.rb +1 -0
  66. data/lib/buildr/java/ant.rb +4 -4
  67. data/lib/buildr/java/bdd.rb +51 -54
  68. data/lib/buildr/java/cobertura.rb +57 -35
  69. data/lib/buildr/java/commands.rb +14 -5
  70. data/lib/buildr/java/compiler.rb +3 -217
  71. data/lib/buildr/java/deprecated.rb +4 -4
  72. data/lib/buildr/java/doc.rb +70 -0
  73. data/lib/buildr/java/emma.rb +22 -22
  74. data/lib/buildr/java/jruby.rb +4 -4
  75. data/lib/buildr/java/jtestr_runner.rb.erb +27 -25
  76. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.class +0 -0
  77. data/lib/buildr/java/org/apache/buildr/JavaTestFilter.java +8 -3
  78. data/lib/buildr/java/packaging.rb +30 -29
  79. data/lib/buildr/java/pom.rb +4 -4
  80. data/lib/buildr/java/rjb.rb +6 -6
  81. data/lib/buildr/java/test_result.rb +61 -85
  82. data/lib/buildr/java/tests.rb +44 -27
  83. data/lib/buildr/java/version_requirement.rb +8 -8
  84. data/lib/buildr/packaging/archive.rb +55 -22
  85. data/lib/buildr/packaging/artifact.rb +75 -36
  86. data/lib/buildr/packaging/artifact_namespace.rb +90 -78
  87. data/lib/buildr/packaging/artifact_search.rb +5 -5
  88. data/lib/buildr/packaging/gems.rb +11 -7
  89. data/lib/buildr/packaging/package.rb +10 -7
  90. data/lib/buildr/packaging/tar.rb +14 -14
  91. data/lib/buildr/packaging/version_requirement.rb +30 -10
  92. data/lib/buildr/packaging/ziptask.rb +51 -13
  93. data/lib/buildr/scala.rb +1 -0
  94. data/lib/buildr/scala/bdd.rb +25 -20
  95. data/lib/buildr/scala/compiler.rb +87 -40
  96. data/lib/buildr/scala/doc.rb +106 -0
  97. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.class +0 -0
  98. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.java +57 -0
  99. data/lib/buildr/scala/shell.rb +14 -9
  100. data/lib/buildr/scala/tests.rb +33 -26
  101. data/lib/buildr/shell.rb +33 -33
  102. data/rakelib/all-in-one.rake +113 -0
  103. data/rakelib/checks.rake +1 -1
  104. data/rakelib/doc.rake +7 -0
  105. data/rakelib/package.rake +1 -1
  106. data/rakelib/release.rake +9 -6
  107. data/rakelib/rspec.rake +26 -7
  108. data/rakelib/setup.rake +15 -3
  109. data/rakelib/stage.rake +18 -11
  110. data/spec/addon/drb_spec.rb +25 -25
  111. data/spec/core/application_spec.rb +111 -21
  112. data/spec/core/build_spec.rb +16 -15
  113. data/spec/core/cc_spec.rb +174 -0
  114. data/spec/core/checks_spec.rb +34 -34
  115. data/spec/core/common_spec.rb +51 -5
  116. data/spec/core/compile_spec.rb +89 -14
  117. data/spec/core/extension_spec.rb +127 -19
  118. data/spec/core/generate_spec.rb +2 -2
  119. data/spec/core/project_spec.rb +10 -10
  120. data/spec/core/test_spec.rb +144 -35
  121. data/spec/core/transport_spec.rb +8 -8
  122. data/spec/core/util_spec.rb +63 -5
  123. data/spec/groovy/bdd_spec.rb +5 -5
  124. data/spec/groovy/compiler_spec.rb +29 -18
  125. data/spec/ide/eclipse_spec.rb +185 -9
  126. data/spec/ide/idea7x_spec.rb +22 -10
  127. data/spec/java/ant_spec.rb +9 -5
  128. data/spec/java/bdd_spec.rb +29 -37
  129. data/spec/java/cobertura_spec.rb +12 -12
  130. data/spec/java/commands_spec.rb +34 -0
  131. data/spec/java/compiler_spec.rb +53 -53
  132. data/spec/java/emma_spec.rb +11 -11
  133. data/spec/java/java_spec.rb +10 -10
  134. data/spec/java/packaging_spec.rb +67 -20
  135. data/spec/java/test_coverage_helper.rb +18 -18
  136. data/spec/java/tests_spec.rb +13 -9
  137. data/spec/packaging/archive_spec.rb +187 -20
  138. data/spec/packaging/artifact_namespace_spec.rb +172 -83
  139. data/spec/packaging/artifact_spec.rb +83 -18
  140. data/spec/packaging/packaging_spec.rb +41 -14
  141. data/spec/sandbox.rb +23 -12
  142. data/spec/scala/bdd_spec.rb +13 -8
  143. data/spec/scala/compiler_spec.rb +18 -13
  144. data/spec/scala/scala.rb +3 -3
  145. data/spec/scala/tests_spec.rb +46 -24
  146. data/spec/spec_helpers.rb +28 -10
  147. data/spec/version_requirement_spec.rb +25 -11
  148. metadata +148 -132
  149. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner$.class +0 -0
  150. data/lib/buildr/scala/org/apache/buildr/SpecsSingletonRunner.scala +0 -35
  151. data/rakelib/stage.rake~ +0 -213
@@ -13,11 +13,13 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
+ # necessary to require YAML even if it is mentioned by autoload as it fails on some platforms.
17
+ require 'yaml'
16
18
  require 'fileutils'
17
19
  module Buildr #:nodoc:
18
20
  module TestFramework
19
-
20
- # A class used by buildr for jruby based frameworks, so that buildr can know
21
+
22
+ # A class used by buildr for jruby based frameworks, so that buildr can know
21
23
  # which tests succeeded/failed.
22
24
  class TestResult
23
25
 
@@ -35,14 +37,14 @@ module Buildr #:nodoc:
35
37
  end
36
38
 
37
39
  def self.guard(file)
38
- begin
40
+ begin
39
41
  yield
40
42
  rescue => e
41
43
  dump_yaml(file, e)
42
44
  end
43
45
  end
44
46
  end
45
-
47
+
46
48
  attr_accessor :failed, :succeeded
47
49
 
48
50
  def initialize
@@ -54,7 +56,7 @@ module Buildr #:nodoc:
54
56
  attr_reader :result
55
57
 
56
58
  attr_accessor :example_group, :options, :where
57
-
59
+
58
60
  def initialize(options, where)
59
61
  @options = options
60
62
  @where = where
@@ -62,7 +64,7 @@ module Buildr #:nodoc:
62
64
  @result[:succeeded] = []
63
65
  @result[:failed] = []
64
66
  end
65
-
67
+
66
68
  %w[ example_started
67
69
  start_dump dump_failure dump_summary dump_pending ].each do |meth|
68
70
  module_eval "def #{meth}(*args); end"
@@ -73,15 +75,15 @@ module Buildr #:nodoc:
73
75
  end
74
76
 
75
77
  def example_passed(example)
76
- result.succeeded << example_group.location.gsub(/:\d+$/, '')
78
+ result.succeeded << example_name(example)
77
79
  end
78
80
 
79
- def example_pending(example, counter, failure)
80
- result.succeeded << example_group.location.gsub(/:\d+$/, '')
81
+ def example_pending(example, counter)
82
+ result.succeeded << example_name(example)
81
83
  end
82
84
 
83
85
  def example_failed(example, counter, failure)
84
- result.failed << example_group.location.gsub(/:\d+$/, '')
86
+ result.failed << example_name(example)
85
87
  end
86
88
 
87
89
  def start(example_count)
@@ -93,69 +95,16 @@ module Buildr #:nodoc:
93
95
  FileUtils.mkdir_p File.dirname(where)
94
96
  File.open(where, 'w') { |f| f.puts YAML.dump(result) }
95
97
  end
96
- end # YamlFormatter
97
-
98
- # Rspec formatter used for JtestR
99
- # (JtestR provides its own version of rspec)
100
- class JtestRYamlFormatter
101
- attr_reader :result
102
-
103
- attr_accessor :example_group, :options, :where
104
-
105
- def initialize(options, where)
106
- @options = options
107
- @where = where
108
- @result = Hash.new
109
- @result[:succeeded] = []
110
- @result[:failed] = []
111
- end
112
-
113
- %w[ example_started
114
- start_dump dump_failure dump_summary dump_pending ].each do |meth|
115
- module_eval "def #{meth}(*args); end"
116
- end
117
-
118
- def add_example_group(example_group)
119
- @example_group = example_group
120
- end
121
98
 
122
- def example_passed(example)
123
- end
124
-
125
- def example_pending(example, counter, failure)
126
- end
127
-
128
- def example_failed(example, counter, failure)
129
- if example_group.respond_to?(:spec_path)
130
- result.failed << example_group.spec_path.gsub(/:\d+$/, '')
99
+ private
100
+ def example_name(example)
101
+ if Spec::Example::ExampleProxy === example
102
+ example_group.location.gsub(/:\d+$/, '')
131
103
  else
132
- path = path_from_bt(failure.exception.backtrace)
133
- result.failed << path if path
104
+ example.name.gsub(/(.+)(\..+\(\))/, '\1')
134
105
  end
135
106
  end
136
-
137
- def start(example_count)
138
- @result = TestResult.new
139
- end
140
-
141
- def path_from_bt(ary)
142
- files = options.files
143
- test = nil
144
- ary.find do |bt|
145
- bt = bt.split(':').first.strip
146
- test = bt if files.include?(bt)
147
- end
148
- test
149
- end
150
-
151
- def close
152
- files = options.files
153
- result.succeeded = files - result.failed
154
-
155
- FileUtils.mkdir_p File.dirname(where)
156
- File.open(where, 'w') { |f| f.puts YAML.dump(result) }
157
- end
158
- end # JtestRYamlFormatter
107
+ end # YamlFormatter
159
108
 
160
109
  # A JtestR ResultHandler
161
110
  # Using this handler we can use RSpec formatters, like html/ci_reporter with JtestR
@@ -177,7 +126,7 @@ module Buildr #:nodoc:
177
126
  ignore_patterns << /org\.jruby\.javasupport\.JavaMethod\./
178
127
  ignore_patterns << /jtestr.*\.jar!/i << /runner\.rb/
179
128
  end
180
-
129
+
181
130
  def clean_up_double_slashes(line)
182
131
  line.gsub!('//','/')
183
132
  end
@@ -197,10 +146,11 @@ module Buildr #:nodoc:
197
146
  error.backtrace.compact!
198
147
  end
199
148
  end
200
-
149
+
201
150
  class << self
202
151
  # an rspec reporter used to proxy events to rspec formatters
203
152
  attr_reader :reporter
153
+ attr_accessor :test_files
204
154
 
205
155
  def init(argv = [], out = STDOUT, err = STDERR)
206
156
  ::JtestR::TestNGResultHandler.module_eval { include TestNGResultHandlerMixin }
@@ -218,10 +168,11 @@ module Buildr #:nodoc:
218
168
  reporter.end
219
169
  reporter.dump
220
170
  end
171
+
221
172
  end
222
173
 
223
174
  module ExampleMethods
224
- attr_accessor :name, :description, :__full_description
175
+ attr_accessor :name, :description, :__full_description, :location
225
176
  end
226
177
 
227
178
  def reporter
@@ -239,9 +190,10 @@ module Buildr #:nodoc:
239
190
  else
240
191
  example_group.description = name.to_s
241
192
  end
242
- reporter.add_example_group(example_group)
193
+ reporter.example_group_started(example_group)
243
194
  end
244
195
 
196
+
245
197
  def starting
246
198
  end
247
199
 
@@ -261,8 +213,8 @@ module Buildr #:nodoc:
261
213
  current_example.extend ::Spec::Example::ExampleMethods
262
214
  current_example.extend ExampleMethods
263
215
  name = name.to_s
264
- name[/\((pen?ding|error|failure|success)\)?$/]
265
- name = $`
216
+ current_example.location = name.to_s
217
+ current_example.name = name.gsub(/(.*)\((.+)\)/, '\2')
266
218
  current_example.description = name
267
219
  if example_group.name[/Spec/]
268
220
  current_example.__full_description = "#{example_group.description} #{name}"
@@ -270,31 +222,56 @@ module Buildr #:nodoc:
270
222
  current_example.__full_description = "#{example_group.name}: #{name}"
271
223
  end
272
224
  reporter.example_started(current_example)
273
- #puts "STARTED #{name} #{current_example.__full_description}"
274
225
  end
275
226
 
276
227
  def succeed_single(name = nil)
277
- #puts "SUCC SINGLE #{name}"
278
228
  reporter.example_finished(current_example, nil)
279
229
  end
280
-
230
+
281
231
  def fail_single(name = nil)
282
- #puts "FAIL SINGLE #{name}"
232
+ current_example.name = current_name
283
233
  reporter.example_finished(current_example, current_error)
284
234
  end
285
235
 
286
236
  def error_single(name = nil)
287
- #puts "ERR SINGLE #{name}"
237
+ current_example.name = current_name
288
238
  reporter.example_finished(current_example, current_error)
289
239
  end
290
240
 
291
241
  def pending_single(name = nil)
292
- #puts "PEND SINGLE #{name}"
293
242
  error = ::Spec::Example::ExamplePendingError.new(name)
294
243
  reporter.example_finished(current_example, error)
295
244
  end
296
245
 
297
246
  private
247
+ def detect_file(trace)
248
+ # find first matching test file in stacktrace
249
+ file = nil
250
+ first_pos = nil
251
+ RSpecResultHandler.test_files.each do |f|
252
+ pos = trace.index(f)
253
+ if pos && (first_pos.nil? || pos < first_pos)
254
+ file = f
255
+ first_pos = pos
256
+ end
257
+ end
258
+ file || fail("RSpecResultHandler.detect_file failed: #{trace}")
259
+ end
260
+
261
+ def current_name(example = current_example, fault = current_failure)
262
+ return example.name unless fault
263
+ case fault
264
+ when Test::Unit::Error
265
+ detect_file(fault.long_display)
266
+ when Test::Unit::Failure
267
+ detect_file(fault.location.to_s)
268
+ when Spec::Runner::Reporter::Failure
269
+ detect_file(fault.exception.backtrace.to_s)
270
+ else
271
+ example.name
272
+ end
273
+ end
274
+
298
275
  def current_error(fault = current_failure)
299
276
  case fault
300
277
  when nil
@@ -314,8 +291,7 @@ module Buildr #:nodoc:
314
291
  fault.exception
315
292
  when Spec::Runner::Reporter::Failure
316
293
  ex = fault.exception
317
- fault.example.instance_variable_get(:@_implementation).to_s =~ /@(.+:\d+)/
318
- Error.new(ex.message, [$1.to_s] + ex.backtrace)
294
+ Error.new(ex.message, ex.backtrace)
319
295
  when Expectations::Results
320
296
  file = fault.file
321
297
  line = fault.line
@@ -326,7 +302,7 @@ module Buildr #:nodoc:
326
302
  test_cls, test_meth = $1.to_s, $`.to_s
327
303
  exception = fault.exception
328
304
  (class << exception; self; end).module_eval do
329
- define_method(:backtrace) do
305
+ define_method(:backtrace) do
330
306
  (["#{test_cls}:in `#{test_meth}'"] + stackTrace).map { |s| s.to_s }
331
307
  end
332
308
  end
@@ -335,7 +311,7 @@ module Buildr #:nodoc:
335
311
  test_cls, test_meth = fault.method.test_class.name, fault.method.method_name
336
312
  exception = fault.throwable
337
313
  (class << exception; self; end).module_eval do
338
- define_method(:backtrace) do
314
+ define_method(:backtrace) do
339
315
  (["#{test_cls}:in `#{test_meth}'"] + stackTrace).map { |s| s.to_s }
340
316
  end
341
317
  end
@@ -24,22 +24,30 @@ module Buildr
24
24
  class TestFramework::Java < TestFramework::Base
25
25
 
26
26
  class << self
27
-
27
+
28
28
  def applies_to?(project) #:nodoc:
29
- project.test.compile.language == :java
29
+ project.test.compile.language == :java || project.test.compile.language == :groovy
30
+ end
31
+
32
+ def dependencies
33
+ unless @dependencies
34
+ super
35
+ # Add buildr utility classes (e.g. JavaTestFilter)
36
+ @dependencies |= [ File.join(File.dirname(__FILE__)) ]
37
+ end
38
+ @dependencies
30
39
  end
31
-
32
40
  end
33
-
41
+
34
42
  private
35
43
 
36
44
  # Add buildr utilities (JavaTestFilter) to classpath
37
- Java.classpath << File.join(File.dirname(__FILE__))
45
+ Java.classpath << lambda { dependencies }
38
46
 
39
47
  # :call-seq:
40
48
  # filter_classes(dependencies, criteria)
41
- #
42
- # Return a list of classnames that match the given criteria.
49
+ #
50
+ # Return a list of classnames that match the given criteria.
43
51
  # The criteria parameter is a hash that must contain at least one of:
44
52
  #
45
53
  # * :class_names -- List of patterns to match against class name
@@ -62,7 +70,7 @@ module Buildr
62
70
  Java.load
63
71
  filter = Java.org.apache.buildr.JavaTestFilter.new(dependencies.to_java(Java.java.lang.String))
64
72
  if criteria[:interfaces]
65
- filter.add_interfaces(criteria[:interfaces].to_java(Java.java.lang.String))
73
+ filter.add_interfaces(criteria[:interfaces].to_java(Java.java.lang.String))
66
74
  end
67
75
  if criteria[:class_annotations]
68
76
  filter.add_class_annotations(criteria[:class_annotations].to_java(Java.java.lang.String))
@@ -79,31 +87,40 @@ module Buildr
79
87
  raise
80
88
  end
81
89
  end
82
-
90
+
83
91
  end
84
92
 
85
93
 
86
94
  # JMock is available when using JUnit and TestNG, JBehave.
87
95
  module JMock
88
-
89
- VERSION = '1.2.0'
90
-
96
+
97
+ VERSION = '2.5.1'
98
+
91
99
  class << self
92
100
  def version
93
101
  Buildr.settings.build['jmock'] || VERSION
94
102
  end
95
103
 
96
104
  def dependencies
97
- @dependencies ||= ["jmock:jmock:jar:#{version}"]
105
+ two_or_later = version[0,1].to_i >= 2
106
+ group = two_or_later ? "org.jmock" : "jmock"
107
+
108
+ @dependencies ||= ["#{group}:jmock:jar:#{version}"]
109
+ if two_or_later
110
+ @dependencies << "org.jmock:jmock-junit#{Buildr::JUnit.version.to_s[0,1]}:jar:#{version}"
111
+ @dependencies << "org.hamcrest:hamcrest-core:jar:1.1"
112
+ @dependencies << "org.hamcrest:hamcrest-library:jar:1.1"
113
+ end
114
+ @dependencies
98
115
  end
99
-
116
+
100
117
  private
101
118
  def const_missing(const)
102
119
  return super unless const == :REQUIRES # TODO: remove in 1.5
103
120
  Buildr.application.deprecated "Please use JMock.dependencies/.version instead of JMock::REQUIRES/VERSION"
104
121
  dependencies
105
122
  end
106
- end
123
+ end
107
124
  end
108
125
 
109
126
 
@@ -147,7 +164,7 @@ module Buildr
147
164
  def generate(projects, target = @target.to_s)
148
165
  html_in = File.join(target, 'html')
149
166
  rm_rf html_in ; mkpath html_in
150
-
167
+
151
168
  Buildr.ant('junit-report') do |ant|
152
169
  ant.taskdef :name=>'junitreport', :classname=>'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator',
153
170
  :classpath=>Buildr.artifacts(JUnit.ant_taskdef).each(&:invoke).map(&:to_s).join(File::PATH_SEPARATOR)
@@ -167,7 +184,7 @@ module Buildr
167
184
  end
168
185
 
169
186
  # JUnit version number.
170
- VERSION = '4.5'
187
+ VERSION = '4.7'
171
188
 
172
189
  class << self
173
190
  # :call-seq:
@@ -184,25 +201,25 @@ module Buildr
184
201
  def version
185
202
  Buildr.settings.build['junit'] || VERSION
186
203
  end
187
-
204
+
188
205
  def dependencies
189
206
  @dependencies ||= ["junit:junit:jar:#{version}"]+ JMock.dependencies
190
207
  end
191
-
208
+
192
209
  def ant_taskdef #:nodoc:
193
210
  "org.apache.ant:ant-junit:jar:#{Ant.version}"
194
211
  end
195
-
212
+
196
213
  private
197
214
  def const_missing(const)
198
215
  return super unless const == :REQUIRES # TODO: remove in 1.5
199
216
  Buildr.application.deprecated "Please use JUnit.dependencies/.version instead of JUnit::REQUIRES/VERSION"
200
217
  dependencies
201
218
  end
202
- end
219
+ end
203
220
 
204
221
  def tests(dependencies) #:nodoc:
205
- filter_classes(dependencies,
222
+ filter_classes(dependencies,
206
223
  :interfaces => %w{junit.framework.TestCase},
207
224
  :class_annotations => %w{org.junit.runner.RunWith},
208
225
  :method_annotations => %w{org.junit.Test})
@@ -284,21 +301,21 @@ module Buildr
284
301
  def version
285
302
  Buildr.settings.build['testng'] || VERSION
286
303
  end
287
-
304
+
288
305
  def dependencies
289
306
  ["org.testng:testng:jar:jdk15:#{version}"]+ JMock.dependencies
290
- end
291
-
307
+ end
308
+
292
309
  private
293
310
  def const_missing(const)
294
311
  return super unless const == :REQUIRES # TODO: remove in 1.5
295
312
  Buildr.application.deprecated "Please use TestNG.dependencies/.version instead of TestNG::REQUIRES/VERSION"
296
313
  dependencies
297
314
  end
298
- end
315
+ end
299
316
 
300
317
  def tests(dependencies) #:nodoc:
301
- filter_classes(dependencies,
318
+ filter_classes(dependencies,
302
319
  :class_annotations => %w{org.testng.annotations.Test},
303
320
  :method_annotations => %w{org.testng.annotations.Test})
304
321
  end