buildr 1.3.3-java → 1.3.4-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. data/CHANGELOG +76 -0
  2. data/NOTICE +1 -1
  3. data/README.rdoc +9 -21
  4. data/Rakefile +17 -34
  5. data/_buildr +3 -12
  6. data/{doc/print.toc.yaml → _jbuildr} +14 -14
  7. data/addon/buildr/cobertura.rb +5 -219
  8. data/addon/buildr/drb.rb +281 -0
  9. data/addon/buildr/emma.rb +5 -221
  10. data/addon/buildr/nailgun.rb +93 -689
  11. data/bin/buildr +0 -9
  12. data/buildr.buildfile +4 -4
  13. data/buildr.gemspec +27 -21
  14. data/doc/_layouts/default.html +82 -0
  15. data/doc/_layouts/preface.html +22 -0
  16. data/doc/{pages/artifacts.textile → artifacts.textile} +82 -42
  17. data/doc/{pages/building.textile → building.textile} +89 -47
  18. data/doc/{pages/contributing.textile → contributing.textile} +53 -45
  19. data/doc/css/default.css +6 -5
  20. data/doc/css/print.css +17 -24
  21. data/doc/css/syntax.css +7 -36
  22. data/doc/download.textile +68 -0
  23. data/doc/{pages/extending.textile → extending.textile} +45 -24
  24. data/doc/{pages/getting_started.textile → getting_started.textile} +158 -88
  25. data/doc/images/asf-logo.gif +0 -0
  26. data/doc/images/note.png +0 -0
  27. data/doc/index.textile +47 -0
  28. data/doc/{pages/languages.textile → languages.textile} +108 -54
  29. data/doc/mailing_lists.textile +25 -0
  30. data/doc/{pages/more_stuff.textile → more_stuff.textile} +152 -73
  31. data/doc/{pages/packaging.textile → packaging.textile} +181 -96
  32. data/doc/preface.textile +28 -0
  33. data/doc/{pages/projects.textile → projects.textile} +55 -40
  34. data/doc/scripts/buildr-git.rb +364 -264
  35. data/doc/scripts/gitflow.rb +296 -0
  36. data/doc/scripts/install-jruby.sh +2 -2
  37. data/doc/scripts/install-linux.sh +6 -6
  38. data/doc/scripts/install-osx.sh +2 -2
  39. data/doc/{pages/settings_profiles.textile → settings_profiles.textile} +83 -45
  40. data/doc/{pages/testing.textile → testing.textile} +77 -41
  41. data/lib/buildr.rb +5 -5
  42. data/lib/buildr/core.rb +2 -0
  43. data/lib/buildr/core/application.rb +321 -151
  44. data/lib/buildr/core/build.rb +298 -167
  45. data/lib/buildr/core/checks.rb +4 -132
  46. data/lib/buildr/core/common.rb +1 -5
  47. data/lib/buildr/core/compile.rb +3 -9
  48. data/lib/buildr/core/environment.rb +12 -3
  49. data/lib/buildr/core/filter.rb +20 -18
  50. data/lib/buildr/core/generate.rb +36 -36
  51. data/lib/buildr/core/help.rb +2 -1
  52. data/lib/buildr/core/osx.rb +46 -0
  53. data/lib/buildr/core/progressbar.rb +1 -1
  54. data/lib/buildr/core/project.rb +7 -34
  55. data/lib/buildr/core/test.rb +12 -6
  56. data/lib/buildr/core/transports.rb +13 -11
  57. data/lib/buildr/core/util.rb +14 -23
  58. data/lib/buildr/groovy/bdd.rb +3 -2
  59. data/lib/buildr/groovy/compiler.rb +1 -1
  60. data/lib/buildr/ide/eclipse.rb +31 -21
  61. data/lib/buildr/ide/idea.rb +3 -2
  62. data/lib/buildr/ide/idea7x.rb +6 -4
  63. data/lib/buildr/java/ant.rb +3 -1
  64. data/lib/buildr/java/bdd.rb +9 -7
  65. data/lib/buildr/java/cobertura.rb +243 -0
  66. data/lib/buildr/java/compiler.rb +5 -4
  67. data/lib/buildr/java/emma.rb +244 -0
  68. data/lib/buildr/java/packaging.rb +11 -8
  69. data/lib/buildr/java/pom.rb +0 -4
  70. data/lib/buildr/java/rjb.rb +1 -1
  71. data/lib/buildr/java/test_result.rb +5 -7
  72. data/lib/buildr/java/tests.rb +17 -11
  73. data/lib/buildr/packaging.rb +5 -2
  74. data/lib/buildr/packaging/archive.rb +488 -0
  75. data/lib/buildr/packaging/artifact.rb +48 -29
  76. data/lib/buildr/packaging/artifact_namespace.rb +6 -6
  77. data/lib/buildr/packaging/gems.rb +4 -4
  78. data/lib/buildr/packaging/package.rb +3 -2
  79. data/lib/buildr/packaging/tar.rb +85 -3
  80. data/lib/buildr/packaging/version_requirement.rb +172 -0
  81. data/lib/buildr/packaging/zip.rb +24 -682
  82. data/lib/buildr/packaging/ziptask.rb +313 -0
  83. data/lib/buildr/scala.rb +5 -0
  84. data/lib/buildr/scala/bdd.rb +100 -0
  85. data/lib/buildr/scala/compiler.rb +45 -4
  86. data/lib/buildr/scala/tests.rb +12 -59
  87. data/rakelib/checks.rake +57 -0
  88. data/rakelib/doc.rake +58 -68
  89. data/rakelib/jekylltask.rb +110 -0
  90. data/rakelib/package.rake +35 -37
  91. data/rakelib/release.rake +119 -35
  92. data/rakelib/rspec.rake +29 -39
  93. data/rakelib/setup.rake +21 -59
  94. data/rakelib/stage.rake +184 -26
  95. data/spec/addon/drb_spec.rb +328 -0
  96. data/spec/core/application_spec.rb +32 -25
  97. data/spec/core/build_spec.rb +336 -126
  98. data/spec/core/checks_spec.rb +292 -310
  99. data/spec/core/common_spec.rb +8 -2
  100. data/spec/core/compile_spec.rb +17 -1
  101. data/spec/core/generate_spec.rb +3 -3
  102. data/spec/core/project_spec.rb +18 -10
  103. data/spec/core/test_spec.rb +8 -1
  104. data/spec/core/transport_spec.rb +40 -3
  105. data/spec/core/util_spec.rb +67 -0
  106. data/spec/ide/eclipse_spec.rb +96 -28
  107. data/spec/ide/idea7x_spec.rb +84 -0
  108. data/spec/java/ant.rb +5 -0
  109. data/spec/java/bdd_spec.rb +12 -3
  110. data/spec/{addon → java}/cobertura_spec.rb +6 -6
  111. data/spec/{addon → java}/emma_spec.rb +5 -6
  112. data/spec/java/java_spec.rb +12 -2
  113. data/spec/java/packaging_spec.rb +31 -2
  114. data/spec/{addon → java}/test_coverage_spec.rb +3 -3
  115. data/spec/java/tests_spec.rb +5 -0
  116. data/spec/packaging/archive_spec.rb +11 -1
  117. data/spec/{core → packaging}/artifact_namespace_spec.rb +10 -2
  118. data/spec/packaging/artifact_spec.rb +44 -3
  119. data/spec/packaging/packaging_spec.rb +1 -1
  120. data/spec/sandbox.rb +17 -14
  121. data/spec/scala/bdd_spec.rb +150 -0
  122. data/spec/scala/compiler_spec.rb +27 -0
  123. data/spec/scala/scala.rb +38 -0
  124. data/spec/scala/tests_spec.rb +78 -33
  125. data/spec/spec_helpers.rb +29 -5
  126. data/spec/version_requirement_spec.rb +6 -0
  127. metadata +176 -172
  128. data/DISCLAIMER +0 -7
  129. data/doc/images/apache-incubator-logo.png +0 -0
  130. data/doc/pages/download.textile +0 -51
  131. data/doc/pages/index.textile +0 -42
  132. data/doc/pages/mailing_lists.textile +0 -17
  133. data/doc/pages/recipes.textile +0 -103
  134. data/doc/pages/troubleshooting.textile +0 -103
  135. data/doc/pages/whats_new.textile +0 -323
  136. data/doc/print.haml +0 -51
  137. data/doc/site.haml +0 -56
  138. data/doc/site.toc.yaml +0 -47
  139. data/etc/git-svn-authors +0 -16
  140. data/lib/buildr/core/application_cli.rb +0 -139
  141. data/rakelib/apache.rake +0 -191
  142. data/rakelib/changelog.rake +0 -57
  143. data/rakelib/rubyforge.rake +0 -53
  144. data/rakelib/scm.rake +0 -49
@@ -0,0 +1,281 @@
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
+ require 'delegate'
18
+ require 'drb/drb'
19
+
20
+
21
+ module Buildr
22
+
23
+ # This addon allows you start a DRb server hosting a buildfile, so that
24
+ # you can later invoke tasks on it without having to load
25
+ # the complete buildr runtime again.
26
+ #
27
+ # Usage:
28
+ #
29
+ # buildr -r buildr/drb drb:start
30
+ #
31
+ # Once the server has been started you can invoke tasks using a simple script:
32
+ #
33
+ # #!/usr/bin/env ruby
34
+ # require 'rubygems'
35
+ # require 'buildr/drb'
36
+ # Buildr::DRbApplication.run
37
+ #
38
+ # Save this script as 'dbuildr', make it executable and use it to invoke tasks.
39
+ #
40
+ # dbuildr clean compile
41
+ #
42
+ # The dbuildr script will run as the server if there isn't one already running.
43
+ # Subsequent calls to dbuildr will act as the client and invoke the tasks you
44
+ # provide in the server.
45
+ # If the buildfile has been modified it will be reloaded on the BuildrServer.
46
+ #
47
+ # JRuby users can use a nailgun client to invoke tasks as fast as possible
48
+ # without having to incur JVM startup time.
49
+ # See the documentation for buildr/nailgun.
50
+ module DRbApplication
51
+
52
+ port = ENV['DRB_PORT'] || 2111
53
+ PORT = port.to_i
54
+
55
+ class SavedTask #:nodoc:
56
+
57
+ def initialize(original)
58
+ @original = original.clone
59
+ @prerequisites = original.prerequisites.clone if original.respond_to?(:prerequisites)
60
+ @actions = original.actions.clone if original.respond_to?(:actions)
61
+ end
62
+
63
+ def name
64
+ @original.name
65
+ end
66
+
67
+ def actions
68
+ @actions ||= []
69
+ end
70
+
71
+ def prerequisites
72
+ @prerequisites ||= []
73
+ end
74
+
75
+ def define!
76
+ @original.class.send(:define_task, @original.name => prerequisites).tap do |task|
77
+ task.comment = @original.comment
78
+ actions.each { |action| task.enhance &action }
79
+ end
80
+ end
81
+ end # SavedTask
82
+
83
+ class Snapshot #:nodoc:
84
+
85
+ attr_accessor :projects, :tasks, :rules, :layout, :options
86
+
87
+ # save the tasks,rules,layout defined by buildr
88
+ def initialize
89
+ @rules = Buildr.application.instance_eval { @rules || [] }.clone
90
+ @options = Buildr.application.options.clone
91
+ @options.rakelib ||= ['tasks']
92
+ @layout = Layout.default.clone
93
+ @projects = Project.instance_eval { @projects || {} }.clone
94
+ @tasks = Buildr.application.tasks.inject({}) do |hash, original|
95
+ unless projects.key? original.name # don't save project definitions
96
+ hash.update original.name => SavedTask.new(original)
97
+ end
98
+ hash
99
+ end
100
+ end
101
+
102
+ end # Snapshot
103
+
104
+ class << self
105
+
106
+ attr_accessor :original, :snapshot
107
+
108
+ def run
109
+ begin
110
+ client = connect
111
+ rescue DRb::DRbConnError => e
112
+ run_server!
113
+ else
114
+ run_client(client)
115
+ end
116
+ end
117
+
118
+ def client_uri
119
+ "druby://:#{PORT + 1}"
120
+ end
121
+
122
+ def remote_run(cfg)
123
+ with_config(cfg) { Buildr.application.remote_run(self) }
124
+ rescue => e
125
+ cfg[:err].puts e.message
126
+ e.backtrace.each { |b| cfg[:err].puts "\tfrom #{b}" }
127
+ raise e
128
+ end
129
+
130
+ def save_snapshot(app)
131
+ if app.instance_eval { @rakefile }
132
+ @snapshot = self::Snapshot.new
133
+ app.buildfile_reloaded!
134
+ end
135
+ end
136
+
137
+ private
138
+
139
+ def server_uri
140
+ "druby://:#{PORT}"
141
+ end
142
+
143
+ def connect
144
+ buildr = DRbObject.new(nil, server_uri)
145
+ uri = buildr.client_uri # obtain our uri from the server
146
+ DRb.start_service(uri)
147
+ buildr
148
+ end
149
+
150
+ def run_client(client)
151
+ client.remote_run :dir => Dir.pwd, :argv => ARGV,
152
+ :in => $stdin, :out => $stdout, :err => $stderr
153
+ end
154
+
155
+ def setup
156
+ unless original
157
+ # Create the stdio delegator that can be cached (eg by fileutils)
158
+ delegate_stdio
159
+
160
+ # Lazily load buildr the first time it's needed
161
+ require 'buildr'
162
+
163
+ # Save the tasks,rules,layout defined by buildr
164
+ # before loading any project
165
+ @original = self::Snapshot.new
166
+
167
+ Buildr.application.extend self
168
+ save_snapshot(Buildr.application)
169
+ end
170
+ end
171
+
172
+ def run_server
173
+ setup
174
+ DRb.start_service(server_uri, self)
175
+ puts "#{self} waiting on #{server_uri}"
176
+ end
177
+
178
+ def run_server!
179
+ setup
180
+ if RUBY_PLATFORM[/java/]
181
+ require 'buildr/nailgun'
182
+ Buildr.application['nailgun:drb'].invoke
183
+ else
184
+ run_server
185
+ DRb.thread.join
186
+ end
187
+ end
188
+
189
+ def delegate_stdio
190
+ $stdin = SimpleDelegator.new($stdin)
191
+ $stdout = SimpleDelegator.new($stdout)
192
+ $stderr = SimpleDelegator.new($stderr)
193
+ end
194
+
195
+ def with_config(remote)
196
+ @invoked = true
197
+ set = lambda do |env|
198
+ ARGV.replace env[:argv]
199
+ $stdin.__setobj__(env[:in])
200
+ $stdout.__setobj__(env[:out])
201
+ $stderr.__setobj__(env[:err])
202
+ Buildr.application.instance_variable_set :@original_dir, env[:dir]
203
+ end
204
+ original = {
205
+ :dir => Buildr.application.instance_variable_get(:@original_dir),
206
+ :argv => ARGV,
207
+ :in => $stdin.__getobj__,
208
+ :out => $stdout.__getobj__,
209
+ :err => $stderr.__getobj__
210
+ }
211
+ begin
212
+ set[remote]
213
+ yield
214
+ ensure
215
+ set[original]
216
+ end
217
+ end
218
+
219
+ end # class << DRbApplication
220
+
221
+ def remote_run(server)
222
+ @options = server.original.options.clone
223
+ init 'Distributed Buildr'
224
+ if @rakefile
225
+ if buildfile_needs_reload?
226
+ reload_buildfile(server, server.original)
227
+ else
228
+ clear_invoked_tasks(server.snapshot || server.original)
229
+ end
230
+ else
231
+ reload_buildfile(server, server.original)
232
+ end
233
+ top_level
234
+ end
235
+
236
+ def buildfile_reloaded!
237
+ @last_loaded = buildfile.timestamp if @rakefile
238
+ end
239
+
240
+ private
241
+
242
+ def buildfile_needs_reload?
243
+ !@last_loaded || @last_loaded < buildfile.timestamp
244
+ end
245
+
246
+ def reload_buildfile(server, snapshot)
247
+ clear_for_reload(snapshot)
248
+ load_buildfile
249
+ server.save_snapshot(self)
250
+ end
251
+
252
+ def clear_for_reload(snapshot)
253
+ Project.clear
254
+ @tasks = {}
255
+ @rules = snapshot.rules.clone
256
+ snapshot.tasks.each_pair { |name, saved| saved.define! }
257
+ Layout.default = snapshot.layout.clone
258
+ end
259
+
260
+ def clear_invoked_tasks(snapshot)
261
+ @rules = snapshot.rules.clone
262
+ (@tasks.keys - snapshot.projects.keys).each do |name|
263
+ if saved = snapshot.tasks[name]
264
+ # reenable this task, restoring its actions/prereqs
265
+ task = @tasks[name]
266
+ task.reenable
267
+ task.prerequisites.replace saved.prerequisites.clone
268
+ task.actions.replace saved.actions.clone
269
+ else
270
+ # tasks generated at runtime, drop it
271
+ @tasks.delete(name)
272
+ end
273
+ end
274
+ end
275
+
276
+ task('drb:start') { run_server! } if Buildr.respond_to?(:application)
277
+
278
+ end # DRbApplication
279
+
280
+ end
281
+
@@ -14,225 +14,9 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require 'buildr/java'
18
-
19
-
20
- module Buildr
21
-
22
- # Provides the <code>emma:html</code> and <code>emma:xml</code> tasks.
23
- # Require explicitly using <code>require "buildr/emma"</code>.
24
- #
25
- # You can generate emma reports for a single project
26
- # using the project name as prefix:
27
- #
28
- # project_name:emma:html
29
- #
30
- # You can also specify which classes to include/exclude from instrumentation by
31
- # passing a class name regexp to the <code>emma.include</code> or
32
- # <code>emma.exclude</code> methods.
33
- #
34
- # define 'someModule' do
35
- # emma.include 'some.package.*'
36
- # emma.exclude 'some.foo.util.SimpleUtil'
37
- # end
38
- module Emma
39
-
40
- class << self
41
-
42
- REQUIRES = ['emma:emma_ant:jar:2.0.5312', 'emma:emma:jar:2.0.5312'] unless const_defined?('REQUIRES')
43
-
44
- def requires()
45
- @requires ||= Buildr.artifacts(REQUIRES).each(&:invoke).map(&:to_s)
46
- end
47
-
48
- def report_to format=nil
49
- File.expand_path('reports/emma')
50
- end
51
-
52
- def data_file()
53
- File.join(report_to, 'coverage.es')
54
- end
55
-
56
- def ant
57
- Buildr.ant 'emma' do |ant|
58
- ant.taskdef :classpath=>requires.join(File::PATH_SEPARATOR), :resource=>'emma_ant.properties'
59
- ant.emma :verbosity=>(Buildr.application.options.trace ? 'verbose' : 'warning') do
60
- yield ant
61
- end
62
- end
63
- end
64
- end
65
-
66
- class EmmaConfig # :nodoc:
67
-
68
- def initialize(project)
69
- @project = project
70
- end
71
-
72
- attr_reader :project
73
- private :project
74
-
75
- attr_writer :metadata_file, :coverage_file, :instrumented_dir, :report_dir
76
-
77
- def coverage_file
78
- @coverage_file ||= File.join(report_dir, 'coverage.ec')
79
- end
80
-
81
- def metadata_file
82
- @metadata_file ||= File.join(report_dir, 'coverage.em')
83
- end
84
-
85
- def instrumented_dir
86
- @instrumented_dir ||= project.path_to(:target, :instrumented, :classes)
87
- end
88
-
89
- def report_dir
90
- @report_dir ||= project.path_to(:reports, :emma)
91
- end
92
-
93
- def report_to format
94
- report_dir
95
- end
96
-
97
- # :call-seq:
98
- # project.emma.include(*classPatterns)
99
- #
100
- def include(*classPatterns)
101
- includes.push(*classPatterns)
102
- self
103
- end
104
-
105
- def includes
106
- @includeClasses ||= []
107
- end
108
-
109
- # :call-seq:
110
- # project.emma.exclude(*classPatterns)
111
- #
112
- def exclude(*classPatterns)
113
- excludes.push(*classPatterns)
114
- self
115
- end
116
-
117
- def excludes
118
- @excludeClasses ||= []
119
- end
120
-
121
- def sources
122
- project.compile.sources
123
- end
124
- end
125
-
126
- module EmmaExtension # :nodoc:
127
- include Buildr::Extension
128
-
129
- def emma
130
- @emma_config ||= EmmaConfig.new(self)
131
- end
132
-
133
- after_define do |project|
134
- emma = project.emma
135
-
136
- namespace 'emma' do
137
- unless project.compile.target.nil?
138
- # Instrumented bytecode goes in a different directory. This task creates before running the test
139
- # cases and monitors for changes in the generate bytecode.
140
- instrumented = project.file(emma.instrumented_dir => project.compile.target) do |task|
141
- unless project.compile.sources.empty?
142
- info "Instrumenting classes with emma metadata file #{emma.metadata_file}"
143
- Emma.ant do |ant|
144
- ant.instr :instrpath=>project.compile.target.to_s, :destdir=>task.to_s, :metadatafile=>emma.metadata_file do
145
- ant.filter :includes=>emma.includes.join(', ') unless emma.includes.empty?
146
- ant.filter :excludes=>emma.excludes.join(', ') unless emma.excludes.empty?
147
- end
148
- end
149
- touch task.to_s, :verbose=>false
150
- end
151
- end
152
-
153
- task 'instrument' => instrumented
154
-
155
- # We now have two target directories with bytecode.
156
- project.test.dependencies.unshift emma.instrumented_dir
157
- project.test.with Emma.requires
158
- project.test.options[:properties]["emma.coverage.out.file"] = emma.coverage_file
159
-
160
- [:xml, :html].each do |format|
161
- task format => ['instrument', 'test'] do
162
- missing_required_files = [emma.metadata_file, emma.coverage_file].reject { |f| File.exist?(f) }
163
- if missing_required_files.empty?
164
- info "Creating test coverage reports in #{emma.report_dir}"
165
- mkdir_p emma.report_dir, :verbose=>false
166
- Emma.ant do |ant|
167
- ant.report do
168
- ant.infileset :file=>emma.metadata_file
169
- ant.infileset :file=>emma.coverage_file
170
- ant.send format, :outfile=>File.join(emma.report_to(format),"coverage.#{format}")
171
- ant.sourcepath do
172
- emma.sources.flatten.each do |src|
173
- ant.dirset(:dir=>src.to_s) if File.exist?(src.to_s)
174
- end
175
- end
176
- end
177
- end
178
- else
179
- info "No test coverage report for #{project}. Missing: #{missing_required_files.join(', ')}"
180
- end
181
- end
182
- end
183
- end
184
- end
185
-
186
- project.clean do
187
- rm_rf [emma.report_dir, emma.coverage_file, emma.metadata_file, emma.instrumented_dir], :verbose=>false
188
- end
189
-
190
- end
191
-
192
- end
193
-
194
- class Buildr::Project
195
- include EmmaExtension
196
- end
197
-
198
- namespace "emma" do
199
-
200
- Project.local_task('instrument') { |name| "Instrumenting #{name}" }
201
-
202
- [:xml, :html].each do |format|
203
- desc "Run the test cases and produce code coverage reports in #{format}"
204
- task format => ['instrument', 'test'] do
205
- info "Creating test coverage reports in #{format}"
206
- mkdir_p report_to(format), :verbose=>false
207
- Emma.ant do |ant|
208
- ant.merge :outfile=>data_file do
209
- Buildr.projects.each do |project|
210
- [project.emma.metadata_file, project.emma.coverage_file].each do |data_file|
211
- ant.fileset :file=>data_file if File.exist?(data_file)
212
- end
213
- end
214
- end
215
- ant.report do
216
- ant.infileset :file=>data_file
217
- ant.send format, :outfile=>File.join(report_to(format), "coverage.#{format}")
218
- ant.sourcepath do
219
- Buildr.projects.map(&:emma).map(&:sources).flatten.map(&:to_s).each do |src|
220
- ant.dirset :dir=>src if File.exist?(src)
221
- end
222
- end
223
- end
224
- end
225
- end
226
- end
227
-
228
- task :clean do
229
- rm_rf [report_to, data_file], :verbose=>false
230
- end
231
- end
232
-
233
- task :clean do
234
- task('emma:clean').invoke if Dir.pwd == Rake.application.original_dir
235
- end
236
-
237
- end
17
+ if Buildr::VERSION < '1.5'
18
+ Buildr.application.deprecated "'buildr/emma', use 'buildr/java/emma' instead"
19
+ require 'buildr/java/emma'
20
+ else
21
+ raise "#{__FILE__} should be removed since its use is deprecated since version 1.3.4"
238
22
  end