buildr 1.4.13 → 1.4.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDUzNzk1MTNjYmQ2MzBlNDVkZDIwNmYzZGU4YTY5ZmUxNDgwZDI5ZA==
4
+ NWYyYTQ1NDRhZjI2NTBiYmEyYzA4MTBjNDIxYjk5ZDBlYzQzZGY4MA==
5
5
  data.tar.gz: !binary |-
6
- MzgyNzFmZDQwODAxNDlhODM3MDdmZjJlZDkxNzQ1YTQ1NjA3YjgwMQ==
6
+ YTJiMGJjZDg4NDkyNWNkZDFmYjFiOTFiOTIwZjc5NTcwYzBhN2U3ZA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- ZDUwYmVkOWFiMDgxMTE3ZWZkZjliMDJkMjdjNTU4MmI0YWM0ZDYwODhkMjQy
10
- YWFjNGRkYjcxZTNiYjdjNWZjNzNhYmIzNGEzMzg3YzQ4NzQyMDNjYjk1YzZm
11
- Mzc2ZjdhNDA2ZGU5NjRkYTc0NWE1NWY0MDI1YWFiMjRiZGRhMjU=
9
+ NGNiMWI1YzM1MDU1NWY5OWM1OGVkNTE4OWRiM2FmZTU4NjZlNWI0YzY0YmY3
10
+ NzJkMDgzNDBkNTE2Y2U3YTJjMWE2YTBjZGFiYWYxYmUxZDlkOGVjMzM0ODY4
11
+ MzNmODBiODRhMDQ1MzFlYWExYjJmYTA3YzZmMmZiYzY2ZmRkYTI=
12
12
  data.tar.gz: !binary |-
13
- YmQwOGViMjQ2YmUxOGNhNTU0MDEyOWM5MmQwYzdkZmZlYjk4OGVmMjUzNjM4
14
- Njg1NmQ3ODY5MzQ0NDFhYmE4ZTJkNDk1MTI1ZmE0OTZjNGMwMjhkOGVjNzA5
15
- MDVjZjg3OWU4NzBiYTk2ZWYzYmIzNTA2Njc5MTIzOTRhMjdmNDA=
13
+ N2RjNTVkZjExMDY1YmU4ODdmMGVlNDg5NjEyNzRhMmM4MWE0NjY5ODk3NWQ0
14
+ YTE1Y2ExZWJiNzliMDcwMTIyOWNiMGE5ZDI3ZjExN2NiNzljY2FhOGNhYzky
15
+ ZGQxMWRjMjU1N2YwYjk0MTQyNmIzZDlkZTJmZmZlMjQyMTFlNjg=
data/CHANGELOG CHANGED
@@ -1,3 +1,25 @@
1
+ 1.4.14 (2013-10-11)
2
+ * Change: Remove highline dependency.
3
+ * Fixed: BUILDR-682 - Fix the documentation for releasing using
4
+ your own versioning scheme. Submitted by Jean-Philippe
5
+ Caruana.
6
+ * Fixed: BUILDR-681 - Stop empty projects creating target/webapp.
7
+ * Change: Add dependency from generated jws client source directory
8
+ to the source wsdl in the wsgen addon.
9
+ * Fixed: Fixed regression in gwt addon due to "pathing_jar"
10
+ functionality in Java::Commands.java.
11
+ * Change: Support disabling the new "pathing_jar" functionality in
12
+ Java::Commands.java utility method. Required for tools
13
+ that introspect the classpath.
14
+ * Change: Update wsgen addon to generate source into a directory
15
+ hierarchy based on maven conventions.
16
+ * Fixed: Fixed regression using transitive dependencies due to
17
+ presence of :scope option in Artifacts.to_hash.
18
+ * Fixed: Fixed bug in GWT addon that required that the user supply
19
+ the :dependencies option.
20
+ * Fixed: Fixed bug in Intellij project file generation when adding
21
+ a web facet.
22
+
1
23
  1.4.13 (2013-10-02)
2
24
  * Fixed: BUILDR-439 - Fix java command under windows when supplied
3
25
  with extremely long classpath. Submitted By Tammo van Lessen.
@@ -60,7 +60,7 @@ module Buildr
60
60
  properties["gwt.persistentunitcache"] = "true"
61
61
  properties["gwt.persistentunitcachedir"] = unit_cache_dir
62
62
 
63
- Java::Commands.java 'com.google.gwt.dev.Compiler', *(args + [{:classpath => cp, :properties => properties, :java_args => options[:java_args]}])
63
+ Java::Commands.java 'com.google.gwt.dev.Compiler', *(args + [{:classpath => cp, :properties => properties, :java_args => options[:java_args], :pathing_jar => false}])
64
64
  end
65
65
 
66
66
  def superdev_dependencies
@@ -83,7 +83,7 @@ module Buildr
83
83
 
84
84
  java_args = options[:java_args] ? options[:java_args].dup : {}
85
85
 
86
- Java::Commands.java 'com.google.gwt.dev.codeserver.CodeServer', *(args + [{:classpath => cp, :properties => properties, :java_args => java_args}])
86
+ Java::Commands.java 'com.google.gwt.dev.codeserver.CodeServer', *(args + [{:classpath => cp, :properties => properties, :java_args => java_args, :pathing_jar => false}])
87
87
  end
88
88
  end
89
89
 
@@ -96,11 +96,11 @@ module Buildr
96
96
  artifacts = (project.compile.sources + project.resources.sources).collect do |a|
97
97
  a.is_a?(String) ? file(a) : a
98
98
  end
99
- dependencies = artifacts(options[:dependencies]) || project.compile.dependencies
99
+ dependencies = options[:dependencies] ? artifacts(options[:dependencies]) : project.compile.dependencies
100
100
 
101
101
  unit_cache_dir = project._(:target, :gwt, :unit_cache_dir, output_key)
102
102
 
103
- task = file(output_dir) do
103
+ task = project.file(output_dir) do
104
104
  Buildr::GWT.gwtc_main(module_names, dependencies + artifacts, output_dir, unit_cache_dir, options.dup)
105
105
  end
106
106
  task.enhance(dependencies)
@@ -131,7 +131,7 @@ module Buildr
131
131
  desc "Generate java from wsdl"
132
132
  project.task("wsdl2java")
133
133
 
134
- ws_dir = File.expand_path(options[:output_dir] || project._(:target, :generated, "main/ws"))
134
+ ws_dir = File.expand_path(options[:output_dir] || project._(:target, :generated, "ws/main/java"))
135
135
  project.file(ws_dir)
136
136
  project.task('wsdl2java').enhance([ws_dir])
137
137
 
@@ -142,7 +142,7 @@ module Buildr
142
142
  service = config[:service] || File.basename(wsdl_file, '.wsdl')
143
143
  wsdl_location = config[:wsdl_location]
144
144
  java_file = "#{ws_dir}/#{pkg.gsub('.', '/')}/#{service}.java"
145
- project.file(java_file) do
145
+ project.file(java_file => [project.file(wsdl_file)]) do
146
146
  mkdir_p ws_dir
147
147
  command = []
148
148
  command << "wsimport"
@@ -172,6 +172,8 @@ module Buildr
172
172
  project.compile.from ws_dir
173
173
  project.iml.main_source_directories << ws_dir if project.iml?
174
174
  project.compile.enhance(['wsdl2java'])
175
+
176
+ ws_dir
175
177
  end
176
178
  end
177
179
  end
data/bin/buildr CHANGED
File without changes
@@ -59,7 +59,6 @@ for those one-off tasks, with a language that's a joy to use.
59
59
  spec.add_dependency 'net-ssh', '2.7.0'
60
60
  spec.add_dependency 'net-sftp', '2.1.2'
61
61
  spec.add_dependency 'rubyzip', '0.9.9'
62
- spec.add_dependency 'highline', '1.6.19'
63
62
  spec.add_dependency 'json_pure', '1.8.0'
64
63
  spec.add_dependency 'rubyforge', '2.0.4'
65
64
  spec.add_dependency 'hoe', '3.7.1'
@@ -75,6 +74,7 @@ for those one-off tasks, with a language that's a joy to use.
75
74
  spec.add_dependency 'jruby-openssl', '~> 0.8.2' if $platform.to_s == 'java'
76
75
  spec.add_dependency 'bundler'
77
76
  spec.add_dependency 'orderedhash'
77
+ spec.add_dependency 'win32console' '1.3.2' if $platform.to_s == 'x86-mswin32'
78
78
 
79
79
  # Unable to get this consistently working under jruby on windows
80
80
  unless $platform.to_s == 'java'
@@ -84,13 +84,8 @@ for those one-off tasks, with a language that's a joy to use.
84
84
  spec.add_development_dependency 'rdoc', '4.0.1'
85
85
  end
86
86
 
87
+ spec.add_development_dependency 'rspec-retry', '0.2.1'
87
88
  spec.add_development_dependency 'ci_reporter', '1.9.0'
88
-
89
- # NOTE: Must update all-in-one.rake if this is updated
90
- # ffi-ncurses Fails on several varieties of Ubuntu due to being unable to locate ncursesw library
91
- # Should be able to just disable it
92
- #spec.add_development_dependency 'ffi-ncurses', '0.4.0' if $platform.to_s == 'java'
93
- spec.add_development_dependency 'win32console' if $platform.to_s == 'x86-mswin32'
94
89
  # Ideally we would depend on psych when the platform has >= 1.9.2 support and jruby platform version > 1.6.6
95
90
  #spec.add_development_dependency 'psych' if RUBY_VERSION >= '1.9.2'
96
91
  spec.add_development_dependency 'pygmentize', '0.0.3'
@@ -23,13 +23,13 @@ h2(#dist). Binaries and Source Code
23
23
  h3. buildr 1.4.13 (2013-10-02)
24
24
 
25
25
  |_. Package |_. MD5 Checksum |_. PGP |
26
- | "buildr-1.4.13-java.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.13/buildr-1.4.13-java.gem | "ffcc5a2de357ca7bd6b1e0f9b6b03726":http://www.apache.org/dist/buildr/1.4.13/buildr-1.4.13-java.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.13/buildr-1.4.13-java.gem.asc |
27
- | "buildr-1.4.13-x86-mswin32.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.13/buildr-1.4.13-x86-mswin32.gem | "8ddd577888adde3de0dfb446dd2ded20":http://www.apache.org/dist/buildr/1.4.13/buildr-1.4.13-x86-mswin32.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.13/buildr-1.4.13-x86-mswin32.gem.asc |
28
- | "buildr-1.4.13.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.13/buildr-1.4.13.gem | "b55c573116d8ea444c71c3eadff52c46":http://www.apache.org/dist/buildr/1.4.13/buildr-1.4.13.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.13/buildr-1.4.13.gem.asc |
29
- | "buildr-1.4.13.tgz":http://www.apache.org/dyn/closer.cgi/buildr/1.4.13/buildr-1.4.13.tgz | "b3a4c8f22d56e043df8b7a7b862af0e0":http://www.apache.org/dist/buildr/1.4.13/buildr-1.4.13.tgz.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.13/buildr-1.4.13.tgz.asc |
30
- | "buildr-1.4.13.zip":http://www.apache.org/dyn/closer.cgi/buildr/1.4.13/buildr-1.4.13.zip | "58365ecd0fa7f3ec81d2009ffb045505":http://www.apache.org/dist/buildr/1.4.13/buildr-1.4.13.zip.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.13/buildr-1.4.13.zip.asc |
26
+ | "buildr-1.4.13-java.gem":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13-java.gem | "ffcc5a2de357ca7bd6b1e0f9b6b03726":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13-java.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13-java.gem.asc |
27
+ | "buildr-1.4.13-x86-mswin32.gem":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13-x86-mswin32.gem | "8ddd577888adde3de0dfb446dd2ded20":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13-x86-mswin32.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13-x86-mswin32.gem.asc |
28
+ | "buildr-1.4.13.gem":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13.gem | "b55c573116d8ea444c71c3eadff52c46":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13.gem.asc |
29
+ | "buildr-1.4.13.tgz":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13.tgz | "b3a4c8f22d56e043df8b7a7b862af0e0":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13.tgz.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13.tgz.asc |
30
+ | "buildr-1.4.13.zip":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13.zip | "58365ecd0fa7f3ec81d2009ffb045505":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13.zip.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.13/buildr-1.4.13.zip.asc |
31
31
 
32
- p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.4.13/KEYS)
32
+ p>. ("Release signing keys":http://archive.apache.org/dist/buildr/1.4.13/KEYS)
33
33
 
34
34
 
35
35
  h3. buildr 1.4.12 (2013-05-04)
@@ -46,6 +46,14 @@ So let's get started. You can "read the documentation online":quick_start.html,
46
46
 
47
47
  h2(#news). What's New
48
48
 
49
+ Highlights from Buildr 1.4.14 (2013-10-11)
50
+ * Fixed: Fixed regression in gwt addon.
51
+ * Fixed: Fixed regression using transitive dependencies due to
52
+ presence of :scope option in Artifacts.to_hash.
53
+ * Fixed: BUILDR-681 - Stop empty projects creating target/webapp.
54
+ * Fixed: Fixed several regressions in in the Intellij IDE
55
+ project file generation.
56
+
49
57
  Highlights from Buildr 1.4.13 (2013-10-02)
50
58
 
51
59
  * Fixed: Upgrade rjb dependency so that you can change JVMs by
@@ -66,11 +66,13 @@ THIS_VERSION = "1.0.0-SNAPSHOT"
66
66
  # a string
67
67
  Release.next_version = "2.0.0-SNAPSHOT"
68
68
 
69
- # or a proc
70
- Release.next_version = lambda do |this_version| # 1.0.0-SNAPSHOT
71
- new_version = @THIS_VERSION@.split(/\./)
72
- new_version[0] = new_version[0] + 1
73
- new_version
69
+ # or a proc - equivalent result
70
+ Release.next_version = lambda do |this_version| # 2.0.0-SNAPSHOT
71
+ new_version = THIS_VERSION.split /\./
72
+ new_version[0] = new_version[0].to_i + 1
73
+ new_version[1] = 0
74
+ new_version[2] = '0-SNAPSHOT'
75
+ new_version.join '.'
74
76
  end
75
77
 
76
78
  define 'killer-app' do
@@ -28,7 +28,6 @@ autoload :YAML, 'yaml'
28
28
  autoload :REXML, 'rexml/document'
29
29
  autoload :XmlSimple, 'xmlsimple'
30
30
  autoload :Builder, 'builder' # A different kind of buildr, one we use to create XML.
31
- require 'highline/import'
32
31
  autoload :RSpec, 'rspec'
33
32
  require 'erb'
34
33
  require 'find'
@@ -39,6 +38,7 @@ require 'orderedhash'
39
38
  require 'securerandom'
40
39
 
41
40
  require 'buildr/core/util'
41
+ require 'buildr/core/console'
42
42
  require 'buildr/core/common'
43
43
  require 'buildr/core/application'
44
44
  require 'buildr/core/jrebel'
@@ -105,3 +105,6 @@ class Object #:nodoc:
105
105
  end
106
106
  end
107
107
 
108
+ # Need to set this again as jruby was not correctly
109
+ # initialized, the first time it was called
110
+ Buildr::Console.use_color = $stdout.isatty
@@ -242,7 +242,7 @@ module Buildr
242
242
  real << ('%ih' % (elapsed / 3600)) if elapsed >= 3600
243
243
  real << ('%im' % ((elapsed / 60) % 60)) if elapsed >= 60
244
244
  real << ('%.3fs' % (elapsed % 60))
245
- puts $terminal.color("Completed in #{real.join}", :green)
245
+ puts Buildr::Console.color("Completed in #{real.join}", :green)
246
246
  end
247
247
  # On OS X this will load Cocoa and Growl which takes half a second we
248
248
  # don't want to measure, so put this after the console message.
@@ -387,25 +387,25 @@ module Buildr
387
387
  end
388
388
 
389
389
  def ask_generate_buildfile
390
- source, fromEclipse = choose do |menu|
391
- menu.header = "To use Buildr you need a buildfile. Do you want me to create one?"
392
- menu.choice("From eclipse .project files") { [Dir.pwd, true] } if Generate.has_eclipse_project?
393
- menu.choice("From Maven2 POM file") { ['pom.xml', false] } if File.exist?('pom.xml')
394
- menu.choice("From directory structure") { [Dir.pwd, false] }
395
- menu.choice("Cancel") {}
396
- end
390
+ header = "To use Buildr you need a buildfile. Do you want me to create one?"
391
+ options = {}
392
+ options["From eclipse .project files"] = [Dir.pwd, true] if Generate.has_eclipse_project?
393
+ options["From Maven2 POM file"] = ['pom.xml', false] if File.exist?('pom.xml')
394
+ options["From directory structure"] = [Dir.pwd, false]
395
+ options["Cancel"]= nil
396
+ source, from_eclipse = Buildr::Console.present_menu(header, options)
397
397
  if source
398
- buildfile = raw_generate_buildfile(source, fromEclipse)
398
+ buildfile = raw_generate_buildfile(source, from_eclipse)
399
399
  [buildfile, File.dirname(buildfile)]
400
400
  end
401
401
  end
402
402
 
403
- def raw_generate_buildfile(source, fromEclipse=Generate.has_eclipse_project?)
403
+ def raw_generate_buildfile(source, from_eclipse=Generate.has_eclipse_project?)
404
404
  # We need rakefile to be known, for settings.build to be accessible.
405
405
  @rakefile = File.expand_path(DEFAULT_BUILDFILES.first)
406
- fail "Buildfile already exists" if File.exist?(@rakefile) && !(tty_output? && agree('Buildfile exists, overwrite?'))
406
+ fail "Buildfile already exists" if File.exist?(@rakefile) && !(tty_output? && Buildr::Console.agree?('Buildfile exists, overwrite?'))
407
407
  script = nil
408
- if fromEclipse
408
+ if from_eclipse
409
409
  script = Generate.from_eclipse(source)
410
410
  elsif File.directory?(source)
411
411
  script = Generate.from_directory(source)
@@ -537,7 +537,7 @@ module Buildr
537
537
  # Exit silently with current status
538
538
  exit(ex.status)
539
539
  rescue OptionParser::ParseError => ex
540
- $stderr.puts $terminal.color(ex.message, :red)
540
+ $stderr.puts Buildr::Console.color(ex.message, :red)
541
541
  exit(1)
542
542
  rescue Exception => ex
543
543
  ex_msg = ex.class.name == "Exception" ? ex.message : "#{ex.class.name} : #{ex.message}"
@@ -545,11 +545,11 @@ module Buildr
545
545
  build_failed(title, message, ex)
546
546
  # Exit with error message
547
547
  $stderr.puts "Buildr aborted!"
548
- $stderr.puts $terminal.color(ex_msg, :red)
548
+ $stderr.puts Buildr::Console.color(ex_msg, :red)
549
549
  if options.trace
550
550
  $stderr.puts ex.backtrace.join("\n")
551
551
  else
552
- $stderr.puts ex.backtrace.select { |str| str =~ /#{rakefile}/ }.map { |line| $terminal.color(line, :red) }.join("\n") if rakefile
552
+ $stderr.puts ex.backtrace.select { |str| str =~ /#{rakefile}/ }.map { |line| Buildr::Console.color(line, :red) }.join("\n") if rakefile
553
553
  $stderr.puts "(See full trace by running task with --trace)"
554
554
  end
555
555
  exit(1)
@@ -597,29 +597,17 @@ module Buildr
597
597
 
598
598
  end
599
599
 
600
-
601
- # Add a touch of color when available and running in terminal.
602
- HighLine.use_color = false
603
- if $stdout.isatty
604
- begin
605
- require 'Win32/Console/ANSI' if RbConfig::CONFIG['host_os'] =~ /mswin|win32|dos|cygwin|mingw/i
606
- HighLine.use_color = true
607
- rescue LoadError
608
- end
609
- end
610
-
611
-
612
600
  alias :warn_without_color :warn
613
601
 
614
602
  # Show warning message.
615
603
  def warn(message)
616
- warn_without_color $terminal.color(message.to_s, :blue) if verbose
604
+ warn_without_color Buildr::Console.color(message.to_s, :blue) if verbose
617
605
  end
618
606
 
619
607
  # Show error message. Use this when you need to show an error message and not throwing
620
608
  # an exception that will stop the build.
621
609
  def error(message)
622
- puts $terminal.color(message.to_s, :red)
610
+ puts Buildr::Console.color(message.to_s, :red)
623
611
  end
624
612
 
625
613
  # Show optional information. The message is printed only when running in verbose
@@ -41,13 +41,16 @@ module Buildr #:nodoc:
41
41
  def initialize(*args) #:nodoc:
42
42
  super
43
43
  enhance do
44
- mkdir_p name
45
- self.paths.flatten.compact.collect do |a|
46
- a.is_a?(String) ? project.file(a) : a
47
- end.each do |a|
48
- a.invoke if a.respond_to?(:invoke)
49
- end.each do |asset|
50
- cp_r Dir["#{asset}/*"], "#{name}/"
44
+ paths = self.paths.flatten.compact
45
+ if paths.size > 0
46
+ mkdir_p name
47
+ paths.collect do |a|
48
+ a.is_a?(String) ? project.file(a) : a
49
+ end.each do |a|
50
+ a.invoke if a.respond_to?(:invoke)
51
+ end.each do |asset|
52
+ cp_r Dir["#{asset}/*"], "#{name}/"
53
+ end
51
54
  end
52
55
  end
53
56
  end
@@ -47,7 +47,7 @@ module Buildr #:nodoc:
47
47
  each_project { |p| p.test.compile.invoke }
48
48
  build_completed(project)
49
49
  rescue Exception => ex
50
- $stderr.puts $terminal.color(ex.message, :red)
50
+ $stderr.puts Buildr::Console.color(ex.message, :red)
51
51
  $stderr.puts
52
52
 
53
53
  build_failed(project, ex)
@@ -108,12 +108,12 @@ module Buildr #:nodoc:
108
108
  each_project { |p| p.test.compile.invoke }
109
109
  build_completed(project)
110
110
  rescue Exception => ex
111
- $stderr.puts $terminal.color(ex.message, :red)
111
+ $stderr.puts Buildr::Console.color(ex.message, :red)
112
112
  build_failed(project, ex)
113
113
  successful = false
114
114
  end
115
115
 
116
- puts $terminal.color("Build complete", :green) if successful
116
+ puts Buildr::Console.color("Build complete", :green) if successful
117
117
  end
118
118
  end
119
119
  end
@@ -0,0 +1,216 @@
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 #nodoc
17
+
18
+ # A utility class that helps with colorizing output for interactive shells where appropriate
19
+ class Console
20
+ class << self
21
+ def use_color
22
+ @use_color.nil? ? false : @use_color
23
+ end
24
+
25
+ def use_color=(use_color)
26
+ return if use_color && !setup_support
27
+ @use_color = use_color
28
+ end
29
+
30
+ # Emit message with color at the start of the message and the clear color command at the end of the sequence.
31
+ def color(message, color)
32
+ raise "Unknown color #{color.inspect}" unless [:green, :red, :blue].include?(color)
33
+ return message unless use_color
34
+ constants = {:green => "\e[32m", :red => "\e[31m", :blue => "\e[34m"}
35
+ @java_console.putString("#{constants[color]}#{message}\e[0m") if @java_console
36
+ "#{constants[color]}#{message}\e[0m"
37
+ end
38
+
39
+ # Return the [rows, columns] of a console or nil if unknown
40
+ def console_dimensions
41
+ return nil unless setup_support
42
+
43
+ begin
44
+ if Buildr::Util.win_os?
45
+ if Buildr::Util.java_platform?
46
+ if JRUBY_VERSION =~ /^1.7/
47
+ [@java_terminal.get_width, @java_terminal.get_height]
48
+ else
49
+ [@java_terminal.getTerminalWidth, @java_terminal.getTerminalHeight]
50
+ end
51
+ else
52
+ Win32::Console.new(Win32::Console::STD_OUTPUT_HANDLE).MaxWindow
53
+ end
54
+ elsif $stdout.isatty
55
+ if /solaris/ =~ RUBY_PLATFORM and
56
+ `stty` =~ /\brows = (\d+).*\bcolumns = (\d+)/
57
+ [$2, $1].map { |c| x.to_i }
58
+ else
59
+ `stty size 2> /dev/null`.split.map { |x| x.to_i }.reverse
60
+ end
61
+ else
62
+ nil
63
+ end
64
+ rescue => e
65
+ nil
66
+ end
67
+ end
68
+
69
+ # Return the number of columns in console or nil if unknown
70
+ def output_cols
71
+ d = console_dimensions
72
+ d ? d[0] : nil
73
+ end
74
+
75
+ def agree?(message)
76
+ puts "#{message} (Y or N)"
77
+ :agree == ask('Y' => :agree, 'N' => :disagree)
78
+ end
79
+
80
+ def ask_password(prompt)
81
+ puts prompt
82
+ begin
83
+ set_no_echo_mode
84
+ password = $stdin.readline
85
+ return password.chomp
86
+ ensure
87
+ reset_mode
88
+ end
89
+ end
90
+
91
+ def present_menu(header, options)
92
+ puts header
93
+ question_options = {}
94
+ count = 1
95
+ options.each_pair do |message, result|
96
+ puts "#{count}. #{message}"
97
+ question_options[count.to_s] = result
98
+ count += 1
99
+ end
100
+ ask(question_options)
101
+ end
102
+
103
+ private
104
+
105
+ def set_no_echo_mode
106
+ return unless setup_support
107
+ if Buildr::Util.win_os?
108
+ if Buildr::Util.java_platform?
109
+ if @java_console
110
+ @state = @java_console.getEchoCharacter
111
+ @java_console.setEchoCharacter 0
112
+ end
113
+ else
114
+ c = Win32::Console.new(Win32::Console::STD_OUTPUT_HANDLE)
115
+ c.Echo(false) rescue Exception
116
+ end
117
+ else
118
+ @state = `stty -g 2>/dev/null`
119
+ `stty -echo -icanon 2>/dev/null`
120
+ end
121
+ end
122
+
123
+ def reset_mode
124
+ return unless setup_support
125
+ if Buildr::Util.win_os?
126
+ if Buildr::Util.java_platform?
127
+ if @java_console
128
+ @java_console.setEchoCharacter @state
129
+ end
130
+ else
131
+ c = Win32::Console.new(Win32::Console::STD_OUTPUT_HANDLE)
132
+ c.Echo(true) rescue Exception
133
+ end
134
+ else
135
+ `stty #{@state} 2>/dev/null`
136
+ end
137
+ @state = nil
138
+ end
139
+
140
+ def ask(options)
141
+ keys = options.keys
142
+ keys_downcased = keys.collect { |k| k.downcase }
143
+ result = nil
144
+ show_prompt = false
145
+ until keys_downcased.include?(result)
146
+ puts "Invalid response. Valid responses include: #{keys.join(', ')}\n" if show_prompt
147
+ show_prompt = true
148
+ result = $stdin.readline
149
+ result = result.strip.downcase if result
150
+ end
151
+ options.each_pair do |key, value|
152
+ if key.downcase == result
153
+ return value.is_a?(Proc) ? value.call : value
154
+ end
155
+ end
156
+ return nil
157
+ end
158
+
159
+ def setup_support
160
+ return @initialized unless @initialized.nil?
161
+ @initialized = false
162
+ begin
163
+ if Buildr::Util.win_os?
164
+ if Buildr::Util.java_platform?
165
+ require 'java'
166
+ require 'readline'
167
+ begin
168
+ # Attempt jline1
169
+ java_import 'java.io.OutputStreamWriter'
170
+ java_import 'java.nio.channels.Channels'
171
+ java_import 'jline.ConsoleReader'
172
+ java_import 'jline.Terminal'
173
+
174
+ @java_input = Java::JavaNioChannels::Channels.newInputStream($stdin.to_channel)
175
+ @java_output = Java::JavaIo.OutputStreamWriter.new(Java::JavaNioChannels::Channels.newOutputStream($stdout.to_channel))
176
+ @java_terminal = Java::Jline::Terminal.getTerminal
177
+ @java_console = Java::Jline::ConsoleReader.new(@java_input, @java_output)
178
+ @java_console.setUseHistory(false)
179
+ @java_console.set_bell_enabled(true)
180
+ @java_console.setUsePagination(false)
181
+
182
+ rescue Exception
183
+ # attempt jline 2
184
+ java_import 'jline.console.ConsoleReader'
185
+
186
+ @java_console = ConsoleReader.new($stdin.to_inputstream, $stdout.to_outputstream)
187
+ @java_console.set_history_enabled(false)
188
+ @java_console.set_bell_enabled(true)
189
+ @java_console.set_pagination_enabled(false)
190
+ @java_terminal = @java_console.getTerminal
191
+ end
192
+ return false
193
+ else
194
+ require 'Win32/Console/ANSI'
195
+ end
196
+ end
197
+ rescue Java::JavaLang::IncompatibleClassChangeError
198
+ # Unfortunately we have multiple incompatible jline libraries
199
+ # in the classpath. This is probably because we are using jruby
200
+ # 1.7.5 with a library like scala and both use incompatible jline
201
+ # implementations
202
+ return false
203
+ rescue NameError
204
+ return false
205
+ rescue LoadError
206
+ return false
207
+ end
208
+ @initialized = true
209
+ return true
210
+ end
211
+
212
+ end
213
+ end
214
+ end
215
+
216
+ Buildr::Console.use_color = $stdout.isatty
@@ -17,15 +17,18 @@ module Buildr #:nodoc:
17
17
  module Generate #:nodoc:
18
18
 
19
19
  task 'generate' do
20
- script = nil
21
- choose do |menu|
22
- menu.header = "To use Buildr you need a buildfile. Do you want me to create one?"
23
- menu.choice("From eclipse .project files") { script = Generate.from_eclipse(Dir.pwd).join("\n") } if has_eclipse_project?
24
- menu.choice("From maven2 pom file") { script = Generate.from_maven2_pom('pom.xml').join("\n") } if File.exists?("pom.xml")
25
- menu.choice("From directory structure") { script = Generate.from_directory(Dir.pwd).join("\n") }
26
- menu.choice("Skip") { }
27
- end
28
20
 
21
+ header = "To use Buildr you need a buildfile. Do you want me to create one?"
22
+ options = {}
23
+ if Generate.has_eclipse_project?
24
+ options["From eclipse .project files"] = Proc.new { Generate.from_eclipse(Dir.pwd).join("\n") }
25
+ end
26
+ if File.exist?('pom.xml')
27
+ options["From Maven2 POM file"] = Proc.new { Generate.from_maven2_pom('pom.xml').join("\n") }
28
+ end
29
+ options["From directory structure"] = Proc.new { Generate.from_directory(Dir.pwd).join("\n") }
30
+ options["Skip"]= nil
31
+ script = Buildr::Console.present_menu(header, options)
29
32
  if script
30
33
  buildfile = File.expand_path(Buildr::Application::DEFAULT_BUILDFILES.first)
31
34
  File.open(buildfile, "w") { |file| file.write script }
@@ -23,7 +23,7 @@ class ProgressBar
23
23
  end
24
24
 
25
25
  def width
26
- @width ||= $terminal.output_cols || 0
26
+ @width ||= Buildr::Console.output_cols || 0
27
27
  end
28
28
 
29
29
  end
@@ -422,7 +422,7 @@ module URI
422
422
  rescue Net::SSH::AuthenticationFailed=>ex
423
423
  # Only if running with console, prompt for password.
424
424
  if !ssh_options[:password] && $stdout.isatty
425
- password = ask("Password for #{host}:") { |q| q.echo = '*' }
425
+ password = Buildr::Console.ask_password("Password for #{host}:") { |q| q.echo = '*' }
426
426
  ssh_options[:password] = password
427
427
  retry
428
428
  end
@@ -465,7 +465,7 @@ module URI
465
465
  rescue Net::SSH::AuthenticationFailed=>ex
466
466
  # Only if running with console, prompt for password.
467
467
  if !ssh_options[:password] && $stdout.isatty
468
- password = ask("Password for #{host}:") { |q| q.echo = '*' }
468
+ password = Buildr::Console.ask_password("Password for #{host}:") { |q| q.echo = '*' }
469
469
  ssh_options[:password] = password
470
470
  retry
471
471
  end
@@ -19,7 +19,7 @@ module Buildr #:nodoc:
19
19
  extend self
20
20
 
21
21
  def java_platform?
22
- RUBY_PLATFORM =~ /java/
22
+ !!(RUBY_PLATFORM =~ /java/)
23
23
  end
24
24
 
25
25
  # In order to determine if we are running on a windows OS,
@@ -32,7 +32,7 @@ module Buildr #:nodoc:
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
- RbConfig::CONFIG['host_os'] =~ /windows|cygwin|bccwin|cygwin|djgpp|mingw|mswin|wince/i
35
+ !!(RbConfig::CONFIG['host_os'] =~ /windows|cygwin|bccwin|cygwin|djgpp|mingw|mswin|mswin32|wince/i)
36
36
  end
37
37
 
38
38
  # Runs Ruby with these command line arguments. The last argument may be a hash,
@@ -328,7 +328,7 @@ module Buildr #:nodoc:
328
328
  end
329
329
  end
330
330
  end
331
- default_enable_jsf = webroots.select{|webroot| File.exist?("#{webroot}/WEB-INF/faces-config.xml")}
331
+ default_enable_jsf = webroots.keys.any?{|webroot| File.exist?("#{webroot}/WEB-INF/faces-config.xml")}
332
332
  enable_jsf = options[:enable_jsf].nil? ? default_enable_jsf : options[:enable_jsf]
333
333
  enable_jsf = false if root_project.ipr? && root_project.ipr.version >= '13'
334
334
  f.facet(:type => 'jsf', :name => 'JSF') do |jsf|
@@ -128,9 +128,9 @@ module Buildr #:nodoc:
128
128
  unless jruby_installed?
129
129
  jruby_artifact = Buildr.artifact(TestFramework::JRubyBased.jruby_artifact)
130
130
  msg = "JRUBY_HOME is not correctly set or points to an invalid JRuby installation: #{jruby_home}"
131
- say msg
132
- say ''
133
- say "You need to install JRuby version #{jruby_artifact.version} using your system package manager."
131
+ puts msg
132
+ puts ''
133
+ puts "You need to install JRuby version #{jruby_artifact.version} using your system package manager."
134
134
 
135
135
  fail msg unless jruby_installed?
136
136
  end
@@ -40,10 +40,13 @@ module Java
40
40
  # * :properties -- Hash of system properties (e.g. 'path'=>base_dir).
41
41
  # * :name -- Shows this name, otherwise shows the first argument (the class name).
42
42
  # * :verbose -- If true, prints the command and all its argument.
43
+ # * :pathing_jar -- If true, forces the use of a "pathing" jar, false disables. Nil
44
+ # will default to using a "pathing" jar under windows with long classpaths.
45
+ # See http://stackoverflow.com/questions/201816/how-to-set-a-long-java-classpath-in-msdos-windows
43
46
  def java(*args, &block)
44
47
  options = Hash === args.last ? args.pop : {}
45
48
  options[:verbose] ||= trace?(:java)
46
- rake_check_options options, :classpath, :java_args, :properties, :name, :verbose, :dir
49
+ rake_check_options options, :classpath, :java_args, :properties, :name, :verbose, :dir, :pathing_jar
47
50
 
48
51
  name = options[:name]
49
52
  if name.nil?
@@ -63,21 +66,27 @@ module Java
63
66
  end
64
67
  cmd_args << path_to_bin('java')
65
68
  cp = classpath_from(options)
66
- paths = cp.map do |c|
67
- path = File.directory?(c) && !c.end_with?('/') ? "#{c}/" : c.to_s
68
- Buildr::Util.win_os? ? "/#{path}" : path
69
- end
70
- manifest = Buildr::Packaging::Java::Manifest.new([{'Class-Path' => paths.join(" ")}])
71
69
 
72
- tjar = Tempfile.new(['javacmd', '.jar'])
73
- Zip::ZipOutputStream.open(tjar.path) do |zos|
74
- zos.put_next_entry('META-INF/MANIFEST.MF')
75
- zos.write manifest.to_s
76
- zos.write "\n"
77
- end
78
- tjar.close
70
+ unless cp.empty?
71
+ if options[:pathing_jar] == true || (options[:pathing_jar].nil? && Util.win_os? && cp.join(':').size > 2048)
72
+ paths = cp.map do |c|
73
+ path = File.directory?(c) && !c.end_with?('/') ? "#{c}/" : c.to_s
74
+ Buildr::Util.win_os? ? "/#{path}" : path
75
+ end
76
+ manifest = Buildr::Packaging::Java::Manifest.new([{'Class-Path' => paths.join(" ")}])
77
+ tjar = Tempfile.new(['javacmd', '.jar'])
78
+ Zip::ZipOutputStream.open(tjar.path) do |zos|
79
+ zos.put_next_entry('META-INF/MANIFEST.MF')
80
+ zos.write manifest.to_s
81
+ zos.write "\n"
82
+ end
83
+ tjar.close
79
84
 
80
- cmd_args << '-classpath' << tjar.path
85
+ cmd_args << '-classpath' << tjar.path
86
+ else
87
+ cmd_args << '-classpath' << cp.join(File::PATH_SEPARATOR)
88
+ end
89
+ end
81
90
  options[:properties].each { |k, v| cmd_args << "-D#{k}=#{v}" } if options[:properties]
82
91
  cmd_args += (options[:java_args] || (ENV['JAVA_OPTS'] || ENV['JAVA_OPTIONS']).to_s.split).flatten
83
92
  cmd_args += args.flatten.compact
@@ -112,6 +112,12 @@ module Java
112
112
  classpath.map! { |path| Proc === path ? path.call : path }
113
113
  cp = Buildr.artifacts(classpath).map(&:to_s).each { |path| file(path).invoke }
114
114
  java_opts = (ENV['JAVA_OPTS'] || ENV['JAVA_OPTIONS']).to_s.split
115
+
116
+ # Prepend the JDK bin directory to the path under windows as RJB can have issues if it picks
117
+ # up jvm dependencies from other products installed on the system
118
+ if Buildr::Util.win_os?
119
+ ENV["PATH"] = "#{ENV['JAVA_HOME']}#{File::SEPARATOR}bin#{File::PATH_SEPARATOR}#{ENV["PATH"]}"
120
+ end
115
121
  ::Rjb.load cp.join(File::PATH_SEPARATOR), java_opts
116
122
 
117
123
  props = ::Rjb.import('java.lang.System').getProperties
@@ -293,7 +293,7 @@ module Buildr #:nodoc:
293
293
  if spec.respond_to?(:to_spec)
294
294
  to_hash spec.to_spec
295
295
  elsif Hash === spec
296
- rake_check_options spec, :id, :group, :type, :classifier, :version
296
+ rake_check_options spec, :id, :group, :type, :classifier, :version, :scope
297
297
  # Sanitize the hash and check it's valid.
298
298
  spec = ARTIFACT_ATTRIBUTES.inject({}) { |h, k| h[k] = spec[k].to_s if spec[k] ; h }
299
299
  fail "Missing group identifier for #{spec.inspect}" unless spec[:group]
@@ -14,5 +14,5 @@
14
14
  # the License.
15
15
 
16
16
  module Buildr #:nodoc:
17
- VERSION = '1.4.13'.freeze
17
+ VERSION = '1.4.14'.freeze
18
18
  end
@@ -109,7 +109,9 @@ task 'publish-doc' => %w(buildr.pdf _site setup-local-site-svn) do
109
109
  end
110
110
 
111
111
  task 'publish-site-svn' do
112
- sh 'svn', 'add', '--force', 'site'
112
+ cd 'site'
113
+ sh 'svn', 'add', '--force', '.'
114
+ cd '..'
113
115
  sh 'svn', 'commit', 'site', '-m', 'Publish latest site'
114
116
  end
115
117
 
@@ -124,6 +126,8 @@ task 'setup-local-site-svn' do
124
126
  end
125
127
 
126
128
  task 'clobber' do
129
+ rm_rf 'rake'
130
+ rm_rf 'site'
127
131
  rm_rf '_site'
128
132
  rm_f 'buildr.pdf'
129
133
  rm_f 'prince_errors.log'
@@ -15,7 +15,7 @@
15
15
 
16
16
  require 'rubygems/package_task'
17
17
 
18
- package = Gem::PackageTask.new(spec) do |pkg|
18
+ Gem::PackageTask.new(spec) do |pkg|
19
19
  pkg.need_tar = true
20
20
  pkg.need_zip = true
21
21
  end
@@ -167,3 +167,4 @@ The Apache Buildr Team
167
167
  end
168
168
 
169
169
  task('clobber') { rm_rf '_release' }
170
+ task('clobber') { rm_rf 'announce-email.txt' }
@@ -56,4 +56,5 @@ task 'ci' => %w(clobber load_ci_reporter spec)
56
56
  task 'clobber' do
57
57
  rm_f 'failed'
58
58
  rm_rf '_reports'
59
+ rm_rf 'tmp'
59
60
  end
@@ -19,7 +19,7 @@ require 'digest/sha1'
19
19
 
20
20
  gpg_cmd = 'gpg2'
21
21
 
22
- STAGE_DATE = '2013-10-02'
22
+ 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']
@@ -231,3 +231,4 @@ The following changes were made since #{previous_version}:
231
231
  end
232
232
 
233
233
  task('clobber') { rm_rf '_staged' }
234
+ task('clobber') { rm_rf 'vote-email.txt' }
@@ -113,7 +113,8 @@ describe Buildr::CCTask do
113
113
  thread.exit
114
114
  end
115
115
 
116
- it 'should support subprojects' do |spec|
116
+ # Not sure why this intermittently fails
117
+ it 'should support subprojects', :retry => 3 do |spec|
117
118
  write 'foo/src/main/java/Example.java', "public class Example {}"
118
119
  write 'foo/src/test/java/ExampleTest.java', "public class ExampleTest {}"
119
120
 
@@ -0,0 +1,66 @@
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
+ require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helpers'))
17
+
18
+ describe Buildr::Console do
19
+
20
+ describe 'console_dimensions' do
21
+
22
+ it 'should return a value' do
23
+ Buildr::Console.console_dimensions.should_not be_nil
24
+ end if $stdout.isatty && !ENV["TRAVIS"]
25
+ end
26
+
27
+ describe 'color' do
28
+
29
+ describe 'when use_color is true' do
30
+ before do
31
+ Buildr::Console.use_color = true
32
+ end
33
+
34
+ it 'should emit red code when asked' do
35
+ Buildr::Console.color('message', :red).should eql("\e[31mmessage\e[0m")
36
+ end
37
+
38
+ it 'should emit green code when asked' do
39
+ Buildr::Console.color('message', :green).should eql("\e[32mmessage\e[0m")
40
+ end
41
+
42
+ it 'should emit blue code when asked' do
43
+ Buildr::Console.color('message', :blue).should eql("\e[34mmessage\e[0m")
44
+ end
45
+ end if $stdout.isatty
46
+
47
+ describe ' use_color is false' do
48
+ before do
49
+ Buildr::Console.use_color = false
50
+ end
51
+
52
+ it 'should not emit red code when asked' do
53
+ Buildr::Console.color('message', :red).should eql("message")
54
+ end
55
+
56
+ it 'should not emit green code when asked' do
57
+ Buildr::Console.color('message', :green).should eql("message")
58
+ end
59
+
60
+ it 'should not emit blue code when asked' do
61
+ Buildr::Console.color('message', :blue).should eql("message")
62
+ end
63
+ end
64
+ end
65
+ end
66
+
@@ -672,7 +672,7 @@ describe Project, '#task' do
672
672
  project('foo').task('bar').name.should eql('foo:bar')
673
673
  end
674
674
 
675
- it 'should ignore namespace if starting with color' do
675
+ it 'should ignore namespace if starting with colon' do
676
676
  define 'foo' do
677
677
  task(':bar').name.should == 'bar'
678
678
  end
@@ -547,6 +547,10 @@ MANIFEST
547
547
  end
548
548
  end
549
549
 
550
+ after do
551
+ rm_rf '../libs'
552
+ end
553
+
550
554
  it 'supports generating library paths with classpath variables' do
551
555
  classpath_xml_elements.collect("classpathentry[@kind='var']") { |n| n.attributes['path'] }.
552
556
  should include('LIBS/some-local.jar')
@@ -406,6 +406,23 @@ describe Buildr::IntellijIdea do
406
406
  end
407
407
  end
408
408
 
409
+ describe "using add_web_facet should default to no jsf" do
410
+ before do
411
+ write "src/main/webapp/WEB-INF/web.xml"
412
+
413
+ @foo = define "foo" do
414
+ iml.add_web_facet
415
+ end
416
+ invoke_generate_task
417
+ end
418
+
419
+ it "does not generate a web facet with jsf facet" do
420
+ doc = xml_document(@foo._("foo.iml"))
421
+ web_facet_xpath = ensure_facet_xpath(doc, 'web', 'Web')
422
+ doc.should_not have_xpath("#{web_facet_xpath}/facet[@type='jsf', @name='JSF']")
423
+ end
424
+ end
425
+
409
426
  describe "using add_web_facet with jsf and idea version 13" do
410
427
  before do
411
428
  write "src/main/webapp/WEB-INF/web.xml"
@@ -308,7 +308,8 @@ describe Buildr::JUnit, 'report' do
308
308
  lambda { task('junit:report').invoke }.should change { File.exist?(JUnit.report.target) }.to(true)
309
309
  end
310
310
 
311
- it 'should clean after itself' do
311
+ # for some reason this will intermittently fail under windows
312
+ it 'should clean after itself', :retry => (Buildr::Util.win_os? ? 4 : 1) do
312
313
  mkpath JUnit.report.target
313
314
  lambda { task('clean').invoke }.should change { File.exist?(JUnit.report.target) }.to(false)
314
315
  end
@@ -28,6 +28,11 @@ module Buildr::Scala
28
28
  end
29
29
  Buildr.settings.build['scala.version'] = Buildr::Scala::SCALA_VERSION_FOR_SPECS
30
30
 
31
+ require 'rspec/retry'
32
+ RSpec.configure do |config|
33
+ config.verbose_retry = true # show retry status in spec process
34
+ end
35
+
31
36
  # Add a 'require' here only for optional extensions, not for extensions that should be loaded by default.
32
37
  require 'buildr/clojure'
33
38
  require 'buildr/groovy'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buildr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.13
4
+ version: 1.4.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apache Buildr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-03 00:00:00.000000000 Z
11
+ date: 2013-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.9.9
83
- - !ruby/object:Gem::Dependency
84
- name: highline
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '='
88
- - !ruby/object:Gem::Version
89
- version: 1.6.19
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '='
95
- - !ruby/object:Gem::Version
96
- version: 1.6.19
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: json_pure
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -346,6 +332,20 @@ dependencies:
346
332
  - - '='
347
333
  - !ruby/object:Gem::Version
348
334
  version: 4.0.1
335
+ - !ruby/object:Gem::Dependency
336
+ name: rspec-retry
337
+ requirement: !ruby/object:Gem::Requirement
338
+ requirements:
339
+ - - '='
340
+ - !ruby/object:Gem::Version
341
+ version: 0.2.1
342
+ type: :development
343
+ prerelease: false
344
+ version_requirements: !ruby/object:Gem::Requirement
345
+ requirements:
346
+ - - '='
347
+ - !ruby/object:Gem::Version
348
+ version: 0.2.1
349
349
  - !ruby/object:Gem::Dependency
350
350
  name: ci_reporter
351
351
  requirement: !ruby/object:Gem::Requirement
@@ -510,6 +510,7 @@ files:
510
510
  - lib/buildr/core/checks.rb
511
511
  - lib/buildr/core/common.rb
512
512
  - lib/buildr/core/compile.rb
513
+ - lib/buildr/core/console.rb
513
514
  - lib/buildr/core/doc.rb
514
515
  - lib/buildr/core/environment.rb
515
516
  - lib/buildr/core/filter.rb
@@ -597,6 +598,7 @@ files:
597
598
  - spec/core/checks_spec.rb
598
599
  - spec/core/common_spec.rb
599
600
  - spec/core/compile_spec.rb
601
+ - spec/core/console_spec.rb
600
602
  - spec/core/doc_spec.rb
601
603
  - spec/core/extension_spec.rb
602
604
  - spec/core/generate_from_eclipse_spec.rb