buildr 1.4.14-x86-mswin32 → 1.4.15-x86-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG +24 -0
- data/_buildr +0 -0
- data/_jbuildr +0 -0
- data/addon/buildr/bnd.rb +1 -1
- data/addon/buildr/git_auto_version.rb +1 -1
- data/addon/buildr/gpg.rb +1 -1
- data/addon/buildr/jaxb_xjc.rb +4 -2
- data/addon/buildr/package_as_nsis.rb +1 -1
- data/addon/buildr/sonar.rb +1 -1
- data/addon/buildr/top_level_generate_dir.rb +1 -1
- data/bin/buildr +0 -0
- data/buildr.gemspec +3 -1
- data/doc/download.textile +12 -0
- data/doc/index.textile +21 -0
- data/doc/packaging.textile +8 -0
- data/doc/scripts/buildr-git.rb +0 -0
- data/doc/scripts/gitflow.rb +0 -0
- data/doc/scripts/install-jruby.sh +0 -0
- data/doc/scripts/install-linux.sh +0 -0
- data/doc/scripts/install-osx.sh +0 -0
- data/doc/settings_profiles.textile +1 -0
- data/lib/buildr/core/application.rb +12 -0
- data/lib/buildr/core/assets.rb +7 -7
- data/lib/buildr/core/compile.rb +1 -1
- data/lib/buildr/core/console.rb +1 -1
- data/lib/buildr/core/progressbar.rb +1 -1
- data/lib/buildr/core/util.rb +1 -1
- data/lib/buildr/ide/idea.rb +10 -2
- data/lib/buildr/java/ecj.rb +1 -1
- data/lib/buildr/java/external.rb +1 -1
- data/lib/buildr/java/packaging.rb +4 -7
- data/lib/buildr/java/tests.rb +1 -1
- data/lib/buildr/packaging/archive.rb +2 -1
- data/lib/buildr/packaging/artifact.rb +51 -1
- data/lib/buildr/packaging/test_jar.rb +1 -1
- data/lib/buildr/version.rb +1 -1
- data/rakelib/doc.rake +7 -5
- data/rakelib/release.rake +11 -4
- data/rakelib/stage.rake +2 -2
- data/spec/addon/bnd_spec.rb +1 -1
- data/spec/addon/jaxb_xjc_spec.rb +4 -4
- data/spec/core/cc_spec.rb +2 -1
- data/spec/core/common_spec.rb +4 -4
- data/spec/core/compile_spec.rb +5 -5
- data/spec/core/console_spec.rb +2 -2
- data/spec/core/extension_spec.rb +0 -0
- data/spec/core/test_spec.rb +2 -2
- data/spec/core/transport_spec.rb +21 -19
- data/spec/ide/idea_spec.rb +25 -0
- data/spec/java/commands_spec.rb +1 -1
- data/spec/java/compiler_spec.rb +16 -0
- data/spec/java/ecj_spec.rb +2 -10
- data/spec/java/emma_spec.rb +1 -1
- data/spec/java/external_spec.rb +2 -1
- data/spec/java/java_spec.rb +1 -1
- data/spec/java/packaging_spec.rb +4 -5
- data/spec/java/pom_spec.rb +1 -1
- data/spec/java/test_coverage_helper.rb +2 -2
- data/spec/packaging/archive_spec.rb +22 -3
- data/spec/packaging/artifact_spec.rb +85 -1
- data/spec/sandbox.rb +1 -1
- data/spec/xpath_matchers.rb +1 -1
- metadata +4 -4
@@ -16,7 +16,7 @@
|
|
16
16
|
module Buildr #:nodoc:
|
17
17
|
module PackageAsTestJar
|
18
18
|
def package_as_test_jar_spec(spec) #:nodoc:
|
19
|
-
spec.merge(:type => :jar, :classifier => '
|
19
|
+
spec.merge(:type => :jar, :classifier => 'tests')
|
20
20
|
end
|
21
21
|
|
22
22
|
def package_as_test_jar(file_name) #:nodoc:
|
data/lib/buildr/version.rb
CHANGED
data/rakelib/doc.rake
CHANGED
@@ -125,15 +125,17 @@ task 'setup-local-site-svn' do
|
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
128
|
+
rescue Exception => e
|
129
|
+
# The doc tasks do not work on our CI infrastructure with jruby as the native libraries
|
130
|
+
# are not compatible with version of the C++ library we are running there
|
131
|
+
end
|
132
|
+
|
128
133
|
task 'clobber' do
|
134
|
+
rm_f 'rake/lib'
|
129
135
|
rm_rf 'rake'
|
136
|
+
rm_rf 'rdoc'
|
130
137
|
rm_rf 'site'
|
131
138
|
rm_rf '_site'
|
132
139
|
rm_f 'buildr.pdf'
|
133
140
|
rm_f 'prince_errors.log'
|
134
141
|
end
|
135
|
-
|
136
|
-
rescue Exception => e
|
137
|
-
# The doc tasks do not work on our CI infrastructure with jruby as the native libraries
|
138
|
-
# are not compatible with version of the C++ library we are running there
|
139
|
-
end
|
data/rakelib/release.rake
CHANGED
@@ -59,14 +59,21 @@ task 'release' => %w{setup-local-site-svn} do
|
|
59
59
|
puts "[X] Uploaded gems and source files to #{spec.name}.rubyforge.org"
|
60
60
|
end.call
|
61
61
|
|
62
|
-
# Push gems to Rubyforge.org
|
62
|
+
# Push gems to Rubyforge.org
|
63
63
|
lambda do
|
64
64
|
files = FileList["_release/#{spec.version}/dist/*.{gem}"]
|
65
65
|
files.each do |f|
|
66
|
-
puts "Push gem #{f} to RubyForge.org
|
67
|
-
|
66
|
+
puts "Push gem #{f} to RubyForge.org ... "
|
67
|
+
sh 'gem', 'push', f do |ok, res|
|
68
|
+
if ok
|
69
|
+
puts "[X] Pushed gem #{File.basename(f)} to Rubyforge.org"
|
70
|
+
else
|
71
|
+
puts 'Could not push gem, please do it yourself!'
|
72
|
+
puts %{ gem push #{f}}
|
73
|
+
end
|
74
|
+
end
|
68
75
|
end
|
69
|
-
puts '[X] Pushed gems to Rubyforge.org
|
76
|
+
puts '[X] Pushed gems to Rubyforge.org'
|
70
77
|
end.call
|
71
78
|
|
72
79
|
# Create an SVN tag for this release.
|
data/rakelib/stage.rake
CHANGED
@@ -19,7 +19,7 @@ require 'digest/sha1'
|
|
19
19
|
|
20
20
|
gpg_cmd = 'gpg2'
|
21
21
|
|
22
|
-
STAGE_DATE = Time.now.strftime('%Y-%m-%d')
|
22
|
+
STAGE_DATE = ENV['STAGE_DATE'] || Time.now.strftime('%Y-%m-%d')
|
23
23
|
|
24
24
|
task 'prepare' do |task, args|
|
25
25
|
gpg_arg = args.gpg || ENV['gpg']
|
@@ -93,7 +93,7 @@ task 'prepare' do |task, args|
|
|
93
93
|
rubyforge = RubyForge.new.configure
|
94
94
|
rubyforge.login
|
95
95
|
rubyforge.scrape_project(spec.name)
|
96
|
-
end.call
|
96
|
+
end.call if false
|
97
97
|
|
98
98
|
raise "Can not run stage process under jruby" if RUBY_PLATFORM[/java/]
|
99
99
|
raise "Can not run staging process under older rubies" unless RUBY_VERSION >= '1.9'
|
data/spec/addon/bnd_spec.rb
CHANGED
data/spec/addon/jaxb_xjc_spec.rb
CHANGED
@@ -110,10 +110,10 @@ describe Buildr::JaxbXjc do
|
|
110
110
|
end
|
111
111
|
|
112
112
|
it "produce .java files in the correct location" do
|
113
|
-
File.should be_exist(@foo._("target/generated/jaxb/org/foo/api/Agency.java"))
|
114
|
-
File.should be_exist(@foo._("target/generated/jaxb/org/foo/api/LatLongCoordinate.java"))
|
115
|
-
File.should be_exist(@foo._("target/generated/jaxb/org/foo/api/ObjectFactory.java"))
|
116
|
-
File.should be_exist(@foo._("target/generated/jaxb/org/foo/api/Wildfire.java"))
|
113
|
+
File.should be_exist(@foo._("target/generated/jaxb/main/java/org/foo/api/Agency.java"))
|
114
|
+
File.should be_exist(@foo._("target/generated/jaxb/main/java/org/foo/api/LatLongCoordinate.java"))
|
115
|
+
File.should be_exist(@foo._("target/generated/jaxb/main/java/org/foo/api/ObjectFactory.java"))
|
116
|
+
File.should be_exist(@foo._("target/generated/jaxb/main/java/org/foo/api/Wildfire.java"))
|
117
117
|
end
|
118
118
|
|
119
119
|
it "produce .class files in the correct location" do
|
data/spec/core/cc_spec.rb
CHANGED
@@ -171,7 +171,8 @@ describe Buildr::CCTask do
|
|
171
171
|
end
|
172
172
|
end
|
173
173
|
|
174
|
-
|
174
|
+
# Not sure why this intermittently fails
|
175
|
+
it 'should support parent and subprojects', :retry => 3 do |spec|
|
175
176
|
write 'foo/src/main/java/Example.java', "public class Example {}"
|
176
177
|
write 'foo/src/test/java/ExampleTest.java', "public class ExampleTest {}"
|
177
178
|
|
data/spec/core/common_spec.rb
CHANGED
@@ -97,7 +97,7 @@ end
|
|
97
97
|
describe Buildr.method(:download) do
|
98
98
|
before do
|
99
99
|
@content = 'we has download!'
|
100
|
-
@http =
|
100
|
+
@http = double('http')
|
101
101
|
@http.stub(:request).and_return(Net::HTTPNotModified.new(nil, nil, nil))
|
102
102
|
end
|
103
103
|
|
@@ -495,13 +495,13 @@ describe Buildr::Filter do
|
|
495
495
|
it 'should touch target directory' do
|
496
496
|
mkpath 'target' ; File.utime @early, @early, 'target'
|
497
497
|
@filter.from('src').into('target').run
|
498
|
-
File.stat('target').mtime.should
|
498
|
+
File.stat('target').mtime.should be_within(10).of(Time.now)
|
499
499
|
end
|
500
500
|
|
501
501
|
it 'should not touch target directory unless running' do
|
502
502
|
mkpath 'target' ; File.utime @early, @early, 'target'
|
503
503
|
@filter.from('src').into('target').exclude('*').run
|
504
|
-
File.mtime('target').should
|
504
|
+
File.mtime('target').should be_within(10).of(@early)
|
505
505
|
end
|
506
506
|
|
507
507
|
it 'should run only on new files' do
|
@@ -601,7 +601,7 @@ describe Buildr::Options, 'proxy.exclude' do
|
|
601
601
|
@uri = URI("http://#{@host}")
|
602
602
|
@no_proxy_args = [@host, 80]
|
603
603
|
@proxy_args = @no_proxy_args + ['myproxy', 8080, nil, nil]
|
604
|
-
@http =
|
604
|
+
@http = double('http')
|
605
605
|
@http.stub(:request).and_return(Net::HTTPNotModified.new(nil, nil, nil))
|
606
606
|
end
|
607
607
|
|
data/spec/core/compile_spec.rb
CHANGED
@@ -389,21 +389,21 @@ describe Buildr::CompileTask, '#invoke' do
|
|
389
389
|
time = now_at_fs_resolution - 10
|
390
390
|
mkpath compile_task.target.to_s
|
391
391
|
File.utime(time, time, compile_task.target.to_s)
|
392
|
-
compile_task.timestamp.should
|
392
|
+
compile_task.timestamp.should be_within(1).of(time)
|
393
393
|
end
|
394
394
|
|
395
395
|
it 'should touch target if anything compiled' do
|
396
396
|
mkpath compile_task.target.to_s
|
397
397
|
File.utime(now_at_fs_resolution - 10, now_at_fs_resolution - 10, compile_task.target.to_s)
|
398
398
|
compile_task.from(sources).invoke
|
399
|
-
File.stat(compile_task.target.to_s).mtime.should
|
399
|
+
File.stat(compile_task.target.to_s).mtime.should be_within(2).of(now_at_fs_resolution)
|
400
400
|
end
|
401
401
|
|
402
402
|
it 'should not touch target if nothing compiled' do
|
403
403
|
mkpath compile_task.target.to_s
|
404
404
|
File.utime(now_at_fs_resolution - 10, now_at_fs_resolution - 10, compile_task.target.to_s)
|
405
405
|
compile_task.invoke
|
406
|
-
File.stat(compile_task.target.to_s).mtime.should
|
406
|
+
File.stat(compile_task.target.to_s).mtime.should be_within(2).of(now_at_fs_resolution - 10)
|
407
407
|
end
|
408
408
|
|
409
409
|
it 'should not touch target if failed to compile' do
|
@@ -411,7 +411,7 @@ describe Buildr::CompileTask, '#invoke' do
|
|
411
411
|
File.utime(now_at_fs_resolution - 10, now_at_fs_resolution - 10, compile_task.target.to_s)
|
412
412
|
write 'failed.java', 'not a class'
|
413
413
|
suppress_stdout { compile_task.from('failed.java').invoke rescue nil }
|
414
|
-
File.stat(compile_task.target.to_s).mtime.should
|
414
|
+
File.stat(compile_task.target.to_s).mtime.should be_within(2).of(now_at_fs_resolution - 10)
|
415
415
|
end
|
416
416
|
|
417
417
|
it 'should complain if source directories and no compiler selected' do
|
@@ -429,7 +429,7 @@ describe Buildr::CompileTask, '#invoke' do
|
|
429
429
|
touch 'target/classes/foo/Foo.class'
|
430
430
|
File.utime(now_at_fs_resolution - 10, now_at_fs_resolution - 10, compile_task.target.to_s)
|
431
431
|
compile_task.invoke
|
432
|
-
File.stat(compile_task.target.to_s).mtime.should
|
432
|
+
File.stat(compile_task.target.to_s).mtime.should be_within(2).of(now_at_fs_resolution - 10)
|
433
433
|
end
|
434
434
|
end
|
435
435
|
|
data/spec/core/console_spec.rb
CHANGED
@@ -21,7 +21,7 @@ describe Buildr::Console do
|
|
21
21
|
|
22
22
|
it 'should return a value' do
|
23
23
|
Buildr::Console.console_dimensions.should_not be_nil
|
24
|
-
end if $stdout.isatty && !ENV["TRAVIS"]
|
24
|
+
end if $stdout.isatty && !ENV["TRAVIS"] && !Buildr::Util.win_os?
|
25
25
|
end
|
26
26
|
|
27
27
|
describe 'color' do
|
@@ -42,7 +42,7 @@ describe Buildr::Console do
|
|
42
42
|
it 'should emit blue code when asked' do
|
43
43
|
Buildr::Console.color('message', :blue).should eql("\e[34mmessage\e[0m")
|
44
44
|
end
|
45
|
-
end if $stdout.isatty
|
45
|
+
end if $stdout.isatty && !Buildr::Util.win_os?
|
46
46
|
|
47
47
|
describe ' use_color is false' do
|
48
48
|
before do
|
data/spec/core/extension_spec.rb
CHANGED
File without changes
|
data/spec/core/test_spec.rb
CHANGED
@@ -183,7 +183,7 @@ describe Buildr::TestTask do
|
|
183
183
|
end
|
184
184
|
|
185
185
|
it 'should execute setup task before running tests' do
|
186
|
-
mock =
|
186
|
+
mock = double('actions')
|
187
187
|
test_task.setup { mock.setup }
|
188
188
|
test_task.enhance { mock.tests }
|
189
189
|
mock.should_receive(:setup).ordered
|
@@ -192,7 +192,7 @@ describe Buildr::TestTask do
|
|
192
192
|
end
|
193
193
|
|
194
194
|
it 'should execute teardown task after running tests' do
|
195
|
-
mock =
|
195
|
+
mock = double('actions')
|
196
196
|
test_task.teardown { mock.teardown }
|
197
197
|
test_task.enhance { mock.tests }
|
198
198
|
mock.should_receive(:tests).ordered
|
data/spec/core/transport_spec.rb
CHANGED
@@ -19,9 +19,10 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers')
|
|
19
19
|
|
20
20
|
describe URI, '#download' do
|
21
21
|
before do
|
22
|
-
write @source = 'source', @content = '
|
23
|
-
@uri = URI(URI.escape("file://#{
|
24
|
-
@target = 'target'
|
22
|
+
write @source = File.expand_path('source'), @content = 'A file to download'
|
23
|
+
@uri = URI(URI.escape("file://#{@source}"))
|
24
|
+
@target = File.expand_path('target')
|
25
|
+
rm_f @target
|
25
26
|
end
|
26
27
|
|
27
28
|
it 'should download file if found' do
|
@@ -59,8 +60,9 @@ end
|
|
59
60
|
describe URI, '#upload' do
|
60
61
|
before do
|
61
62
|
write @source = 'source', @content = 'Just a file'
|
62
|
-
@target = 'target'
|
63
|
-
|
63
|
+
@target = File.expand_path('target')
|
64
|
+
rm_rf @target
|
65
|
+
@uri = URI(URI.escape("file://#{@target}"))
|
64
66
|
end
|
65
67
|
|
66
68
|
it 'should preserve file permissions if uploading to a file' do
|
@@ -237,7 +239,7 @@ describe URI::HTTP, '#read' do
|
|
237
239
|
@uri = URI("http://#{@host_domain}#{@path}#{@query}")
|
238
240
|
@no_proxy_args = [@host_domain, 80]
|
239
241
|
@proxy_args = @no_proxy_args + ['myproxy', 8080, 'john', 'smith']
|
240
|
-
@http =
|
242
|
+
@http = double('http')
|
241
243
|
@http.stub(:request).and_yield(Net::HTTPNotModified.new(nil, nil, nil))
|
242
244
|
end
|
243
245
|
|
@@ -318,7 +320,7 @@ describe URI::HTTP, '#read' do
|
|
318
320
|
|
319
321
|
it 'should use HTTP Basic authentication' do
|
320
322
|
Net::HTTP.should_receive(:new).and_return(@http)
|
321
|
-
request =
|
323
|
+
request = double('request')
|
322
324
|
Net::HTTP::Get.should_receive(:new).and_return(request)
|
323
325
|
request.should_receive(:basic_auth).with('john', 'secret')
|
324
326
|
URI("http://john:secret@#{@host_domain}").read
|
@@ -331,7 +333,7 @@ describe URI::HTTP, '#read' do
|
|
331
333
|
redirect = Net::HTTPRedirection.new(nil, nil, nil)
|
332
334
|
redirect['Location'] = "http://#{@host_domain}/asdf"
|
333
335
|
|
334
|
-
request1 =
|
336
|
+
request1 = double('request1')
|
335
337
|
Net::HTTP::Get.should_receive(:new).once.with('/', default_http_headers).and_return(request1)
|
336
338
|
request1.should_receive(:basic_auth).with('john', 'secret')
|
337
339
|
@http.should_receive(:request).with(request1).and_yield(redirect)
|
@@ -340,7 +342,7 @@ describe URI::HTTP, '#read' do
|
|
340
342
|
ok = Net::HTTPOK.new(nil, nil, nil)
|
341
343
|
ok.stub(:read_body)
|
342
344
|
|
343
|
-
request2 =
|
345
|
+
request2 = double('request2')
|
344
346
|
Net::HTTP::Get.should_receive(:new).once.with("/asdf", default_http_headers).and_return(request2)
|
345
347
|
request2.should_receive(:basic_auth).with('john', 'secret')
|
346
348
|
@http.should_receive(:request).with(request2).and_yield(ok)
|
@@ -362,7 +364,7 @@ describe URI::HTTP, '#write' do
|
|
362
364
|
before do
|
363
365
|
@content = 'Readme. Please!'
|
364
366
|
@uri = URI('http://john:secret@host.domain/foo/bar/baz.jar')
|
365
|
-
@http =
|
367
|
+
@http = double('Net::HTTP')
|
366
368
|
@http.stub(:request).and_return(Net::HTTPOK.new(nil, nil, nil))
|
367
369
|
Net::HTTP.stub(:new).and_return(@http)
|
368
370
|
end
|
@@ -438,9 +440,9 @@ describe URI::SFTP, '#read' do
|
|
438
440
|
@uri = URI('sftp://john:secret@localhost/root/path/readme')
|
439
441
|
@content = 'Readme. Please!'
|
440
442
|
|
441
|
-
@ssh_session =
|
442
|
-
@sftp_session =
|
443
|
-
@file_factory =
|
443
|
+
@ssh_session = double('Net::SSH::Session')
|
444
|
+
@sftp_session = double('Net::SFTP::Session')
|
445
|
+
@file_factory = double('Net::SFTP::Operations::FileFactory')
|
444
446
|
Net::SSH.stub(:start).with('localhost', 'john', :password=>'secret', :port=>22).and_return(@ssh_session) do
|
445
447
|
Net::SFTP::Session.should_receive(:new).with(@ssh_session).and_yield(@sftp_session).and_return(@sftp_session)
|
446
448
|
@sftp_session.should_receive(:connect!).and_return(@sftp_session)
|
@@ -462,14 +464,14 @@ describe URI::SFTP, '#read' do
|
|
462
464
|
end
|
463
465
|
|
464
466
|
it 'should read contents of file and return it' do
|
465
|
-
file =
|
467
|
+
file = double('Net::SFTP::Operations::File')
|
466
468
|
file.should_receive(:read).with(URI::RW_CHUNK_SIZE).once.and_return(@content)
|
467
469
|
@file_factory.should_receive(:open).with('/root/path/readme', 'r').and_yield(file)
|
468
470
|
@uri.read.should eql(@content)
|
469
471
|
end
|
470
472
|
|
471
473
|
it 'should read contents of file and pass it to block' do
|
472
|
-
file =
|
474
|
+
file = double('Net::SFTP::Operations::File')
|
473
475
|
file.should_receive(:read).with(URI::RW_CHUNK_SIZE).once.and_return(@content)
|
474
476
|
@file_factory.should_receive(:open).with('/root/path/readme', 'r').and_yield(file)
|
475
477
|
content = ''
|
@@ -486,9 +488,9 @@ describe URI::SFTP, '#write' do
|
|
486
488
|
@uri = URI('sftp://john:secret@localhost/root/path/readme')
|
487
489
|
@content = 'Readme. Please!'
|
488
490
|
|
489
|
-
@ssh_session =
|
490
|
-
@sftp_session =
|
491
|
-
@file_factory =
|
491
|
+
@ssh_session = double('Net::SSH::Session')
|
492
|
+
@sftp_session = double('Net::SFTP::Session')
|
493
|
+
@file_factory = double('Net::SFTP::Operations::FileFactory')
|
492
494
|
Net::SSH.stub(:start).with('localhost', 'john', :password=>'secret', :port=>22).and_return(@ssh_session) do
|
493
495
|
Net::SFTP::Session.should_receive(:new).with(@ssh_session).and_yield(@sftp_session).and_return(@sftp_session)
|
494
496
|
@sftp_session.should_receive(:connect!).and_return(@sftp_session)
|
@@ -539,7 +541,7 @@ describe URI::SFTP, '#write' do
|
|
539
541
|
end
|
540
542
|
|
541
543
|
it 'should write contents to file' do
|
542
|
-
file =
|
544
|
+
file = double('Net::SFTP::Operations::File')
|
543
545
|
file.should_receive(:write).with(@content)
|
544
546
|
@file_factory.should_receive(:open).with('/root/path/readme', 'w').and_yield(file)
|
545
547
|
@uri.write @content
|
data/spec/ide/idea_spec.rb
CHANGED
@@ -1076,6 +1076,31 @@ describe Buildr::IntellijIdea do
|
|
1076
1076
|
end
|
1077
1077
|
end
|
1078
1078
|
|
1079
|
+
describe "with default configuration added to root project" do
|
1080
|
+
before do
|
1081
|
+
@foo = define "foo" do
|
1082
|
+
ipr.add_default_configuration("GWT.ConfigurationType", "GWT Configuration") do |xml|
|
1083
|
+
xml.module(:name => project.iml.id)
|
1084
|
+
xml.option(:name => "RUN_PAGE", :value => "Planner.html")
|
1085
|
+
xml.option(:name => "compilerParameters", :value => "-draftCompile -localWorkers 2")
|
1086
|
+
xml.option(:name => "compilerMaxHeapSize", :value => "512")
|
1087
|
+
|
1088
|
+
xml.RunnerSettings(:RunnerId => "Run")
|
1089
|
+
xml.ConfigurationWrapper(:RunnerId => "Run")
|
1090
|
+
xml.tag! :method
|
1091
|
+
end
|
1092
|
+
end
|
1093
|
+
invoke_generate_task
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
it "generates an IPR with default configuration" do
|
1097
|
+
doc = xml_document(@foo._("foo.ipr"))
|
1098
|
+
facet_xpath = "/project/component[@name='ProjectRunConfigurationManager']/configuration"
|
1099
|
+
doc.should have_nodes(facet_xpath, 1)
|
1100
|
+
doc.should have_xpath("#{facet_xpath}[@type='GWT.ConfigurationType' AND @factoryName='GWT Configuration' AND @default='true']")
|
1101
|
+
end
|
1102
|
+
end
|
1103
|
+
|
1079
1104
|
describe "with iml.group specified" do
|
1080
1105
|
before do
|
1081
1106
|
@foo = define "foo" do
|
data/spec/java/commands_spec.rb
CHANGED
data/spec/java/compiler_spec.rb
CHANGED
@@ -61,6 +61,22 @@ describe 'javac compiler' do
|
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
64
|
+
it 'should accept a task to compile from' do
|
65
|
+
p = define 'foo' do
|
66
|
+
project.version = '1'
|
67
|
+
f = file(_(:target, :generated, 'myjava')) do
|
68
|
+
mkdir_p _(:target, :generated, 'myjava')
|
69
|
+
File.open("#{_(:target, :generated, 'myjava')}/Foo.java", "wb") do |f|
|
70
|
+
f.write "public class Foo {}"
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
compile.from(f)
|
75
|
+
package(:jar)
|
76
|
+
end.compile.invoke
|
77
|
+
file('target/classes/Foo.class').should exist
|
78
|
+
end
|
79
|
+
|
64
80
|
it 'should not change existing list of sources' do
|
65
81
|
define 'foo' do
|
66
82
|
compile.from('sources')
|
data/spec/java/ecj_spec.rb
CHANGED
@@ -15,21 +15,16 @@
|
|
15
15
|
|
16
16
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
|
17
17
|
|
18
|
-
|
19
|
-
|
20
18
|
describe Buildr::Compiler::Ecj do
|
21
19
|
|
22
20
|
before(:all) do
|
23
21
|
#Make ecj appear as a compiler that applies:
|
24
22
|
class Buildr::Compiler::Ecj
|
25
23
|
class << self
|
26
|
-
|
27
24
|
def applies_to?(project, task)
|
28
25
|
paths = task.sources + [sources].flatten.map { |src| Array(project.path_to(:source, task.usage, src.to_sym)) }
|
29
|
-
paths.flatten
|
30
|
-
|
31
|
-
|
32
|
-
paths.each { |path|
|
26
|
+
paths.flatten.each { |path|
|
27
|
+
path = path.to_s
|
33
28
|
Find.find(path) {|found|
|
34
29
|
if (!File.directory?(found)) && found.match(/.*\.#{Array(source_ext).join('|')}/)
|
35
30
|
return true
|
@@ -97,11 +92,8 @@ describe Buildr::Compiler::Ecj do
|
|
97
92
|
#Make ecj appear as a compiler that doesn't apply:
|
98
93
|
module Buildr
|
99
94
|
module Compiler
|
100
|
-
|
101
95
|
class Ecj
|
102
|
-
|
103
96
|
class << self
|
104
|
-
|
105
97
|
def applies_to?(project, task)
|
106
98
|
false
|
107
99
|
end
|