buildr 1.4.6-x86-mswin32 → 1.4.7-x86-mswin32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. data/CHANGELOG +81 -0
  2. data/Rakefile +5 -2
  3. data/addon/buildr/antlr.rb +0 -4
  4. data/addon/buildr/bnd.rb +3 -1
  5. data/addon/buildr/checkstyle.rb +201 -0
  6. data/addon/buildr/cobertura.rb +0 -1
  7. data/addon/buildr/drb.rb +0 -2
  8. data/addon/buildr/emma.rb +0 -1
  9. data/addon/buildr/findbugs.rb +227 -0
  10. data/addon/buildr/gwt.rake +82 -0
  11. data/addon/buildr/hibernate.rb +0 -4
  12. data/addon/buildr/javacc.rb +0 -4
  13. data/addon/buildr/javancss.rb +155 -0
  14. data/addon/buildr/jdepend.rb +138 -24
  15. data/addon/buildr/jdepend.rb.orig +178 -0
  16. data/addon/buildr/jetty.rb +0 -5
  17. data/addon/buildr/jibx.rb +85 -86
  18. data/addon/buildr/nailgun.rb +2 -2
  19. data/addon/buildr/openjpa.rb +0 -4
  20. data/addon/buildr/pmd.rb +166 -0
  21. data/addon/buildr/protobuf.rb +0 -1
  22. data/addon/buildr/sonar.rb +142 -0
  23. data/addon/buildr/xmlbeans.rb +0 -5
  24. data/buildr.gemspec +36 -21
  25. data/doc/_layouts/default.html +1 -0
  26. data/doc/contributing.textile +11 -2
  27. data/doc/download.textile +17 -5
  28. data/doc/index.textile +21 -46
  29. data/doc/installing.textile +18 -8
  30. data/doc/installing.textile.orig +282 -0
  31. data/doc/languages.textile +0 -38
  32. data/doc/more_stuff.textile +199 -12
  33. data/doc/more_stuff.textile.orig +1004 -0
  34. data/doc/packaging.textile +10 -0
  35. data/doc/settings_profiles.textile +2 -2
  36. data/etc/KEYS +44 -0
  37. data/lib/buildr.rb +67 -4
  38. data/lib/buildr/clojure.rb +0 -2
  39. data/lib/buildr/core/application.rb +23 -32
  40. data/lib/buildr/core/build.rb +0 -7
  41. data/lib/buildr/core/cc.rb +0 -5
  42. data/lib/buildr/core/checks.rb +0 -4
  43. data/lib/buildr/core/common.rb +0 -5
  44. data/lib/buildr/core/compile.rb +5 -10
  45. data/lib/buildr/core/doc.rb +9 -3
  46. data/lib/buildr/core/environment.rb +0 -1
  47. data/lib/buildr/core/filter.rb +0 -5
  48. data/lib/buildr/core/generate.rb +2 -6
  49. data/lib/buildr/core/help.rb +1 -6
  50. data/lib/buildr/core/linux.rb +0 -1
  51. data/lib/buildr/core/osx.rb +0 -1
  52. data/lib/buildr/core/project.rb +0 -4
  53. data/lib/buildr/core/run.rb +1 -5
  54. data/lib/buildr/core/shell.rb +1 -6
  55. data/lib/buildr/core/test.rb +1 -7
  56. data/lib/buildr/core/transports.rb +4 -6
  57. data/lib/buildr/core/util.rb +2 -65
  58. data/lib/buildr/groovy/doc.rb +0 -3
  59. data/lib/buildr/groovy/shell.rb +0 -2
  60. data/lib/buildr/ide/eclipse.rb +4 -13
  61. data/lib/buildr/ide/eclipse/java.rb +0 -4
  62. data/lib/buildr/ide/eclipse/plugin.rb +0 -4
  63. data/lib/buildr/ide/eclipse/scala.rb +0 -4
  64. data/lib/buildr/ide/idea.rb +284 -52
  65. data/lib/buildr/java/ant.rb +2 -6
  66. data/lib/buildr/java/bdd.rb +5 -123
  67. data/lib/buildr/java/cobertura.rb +16 -10
  68. data/lib/buildr/java/commands.rb +33 -7
  69. data/lib/buildr/java/compiler.rb +0 -7
  70. data/lib/buildr/java/deprecated.rb +0 -4
  71. data/lib/buildr/java/doc.rb +0 -2
  72. data/lib/buildr/java/emma.rb +0 -4
  73. data/lib/buildr/java/jruby.rb +0 -2
  74. data/lib/buildr/java/packaging.rb +0 -4
  75. data/lib/buildr/java/pom.rb +24 -16
  76. data/lib/buildr/java/rjb.rb +1 -1
  77. data/lib/buildr/java/test_result.rb +1 -2
  78. data/lib/buildr/java/tests.rb +68 -6
  79. data/lib/buildr/packaging/archive.rb +0 -1
  80. data/lib/buildr/packaging/artifact.rb +19 -16
  81. data/lib/buildr/packaging/artifact_namespace.rb +51 -24
  82. data/lib/buildr/packaging/artifact_search.rb +1 -2
  83. data/lib/buildr/packaging/gems.rb +1 -13
  84. data/lib/buildr/packaging/package.rb +0 -6
  85. data/lib/buildr/packaging/tar.rb +2 -4
  86. data/lib/buildr/packaging/version_requirement.rb +1 -1
  87. data/lib/buildr/packaging/zip.rb +1 -2
  88. data/lib/buildr/packaging/ziptask.rb +0 -4
  89. data/lib/buildr/run.rb +3 -3
  90. data/lib/buildr/scala/bdd.rb +129 -11
  91. data/lib/buildr/scala/compiler.rb +53 -6
  92. data/lib/buildr/scala/doc.rb +6 -4
  93. data/lib/buildr/scala/org/apache/buildr/Specs2Runner.class +0 -0
  94. data/lib/buildr/scala/org/apache/buildr/Specs2Runner.java +38 -0
  95. data/lib/buildr/scala/shell.rb +0 -4
  96. data/lib/buildr/scala/tests.rb +15 -6
  97. data/lib/buildr/shell.rb +0 -1
  98. data/lib/buildr/version.rb +1 -1
  99. data/rakelib/all-in-one.rake +20 -11
  100. data/rakelib/checks.rake +0 -31
  101. data/rakelib/doc.rake +86 -100
  102. data/rakelib/package.rake +3 -3
  103. data/rakelib/release.rake +1 -1
  104. data/rakelib/rspec.rake +23 -7
  105. data/rakelib/stage.rake +18 -21
  106. data/spec/addon/bnd_spec.rb +2 -2
  107. data/spec/addon/jaxb_xjc_spec.rb +5 -0
  108. data/spec/core/application_spec.rb +11 -64
  109. data/spec/core/cc_spec.rb +12 -5
  110. data/spec/core/compile_spec.rb +11 -0
  111. data/spec/core/doc_spec.rb +1 -1
  112. data/spec/core/run_spec.rb +17 -4
  113. data/spec/core/test_spec.rb +5 -3
  114. data/spec/ide/idea_spec.rb +60 -0
  115. data/spec/java/bdd_spec.rb +8 -218
  116. data/spec/java/cobertura_spec.rb +4 -0
  117. data/spec/java/compiler_spec.rb +11 -8
  118. data/spec/java/emma_spec.rb +4 -1
  119. data/spec/java/java_spec.rb +1 -1
  120. data/spec/java/pom_spec.rb +125 -0
  121. data/spec/java/tests_spec.rb +185 -0
  122. data/spec/packaging/archive_spec.rb +1 -1
  123. data/spec/packaging/artifact_namespace_spec.rb +15 -0
  124. data/spec/packaging/artifact_spec.rb +26 -1
  125. data/spec/sandbox.rb +7 -1
  126. data/spec/scala/bdd_spec.rb +111 -8
  127. data/spec/scala/tests_spec.rb +5 -1
  128. data/spec/spec_helpers.rb +9 -4
  129. data/spec/version_requirement_spec.rb +2 -0
  130. metadata +570 -505
  131. data/lib/buildr/core.rb +0 -34
  132. data/lib/buildr/ide.rb +0 -19
  133. data/lib/buildr/java.rb +0 -25
  134. data/lib/buildr/java/jtestr_result.rb +0 -331
  135. data/lib/buildr/java/jtestr_runner.rb.erb +0 -116
  136. data/lib/buildr/packaging.rb +0 -25
  137. data/rakelib/setup.rake +0 -68
@@ -581,6 +581,16 @@ task 'upload'=>'docs' do
581
581
  end
582
582
  {% endhighlight %}
583
583
 
584
+ h3(#uploading-options). Uploading Options
585
+
586
+ For convenience, you can also pass "any option of Net::SSH":http://net-ssh.github.com/ssh/v2/api/classes/Net/SSH.html#M000002 when configuring the remote repository.
587
+
588
+ If you need to enforce to use password-only authentication for example, you can set this option:
589
+
590
+ {% highlight ruby %}
591
+ # Set password authentication only
592
+ repositories.release_to[:options] = {:ssh_options=>{:auth_methods=> 'password'}}
593
+ {% endhighlight %}
584
594
 
585
595
  h2(#source_javadoc). Packaging Sources and JavaDocs
586
596
 
@@ -81,7 +81,7 @@ repositories:
81
81
  - https://intra.net/maven2
82
82
  - http://example.com
83
83
 
84
- relase_to:
84
+ release_to:
85
85
  url: http://intra.net/maven2
86
86
  username: john
87
87
  password: secret
@@ -97,7 +97,7 @@ im:
97
97
  Later your buildfile or addons can reference user preferences using the hash returned by the @Buildr.settings.user@ accessor.
98
98
 
99
99
  {% highlight ruby %}
100
- task 'relase-notification' do
100
+ task 'release-notification' do
101
101
  usr, pwd, server = settings.user['im'].values_at('usr', 'pwd', 'server')
102
102
  jabber = JabberAPI.new(server, usr, pwd)
103
103
  jabber.msg("We are pleased to announce the last stable version #{VERSION}")
data/etc/KEYS CHANGED
@@ -187,3 +187,47 @@ sIHg4pUCB3Z7wT6vvSs/eQ3jARt7mok3JE56JL0sV2+Z2SePiFUn/ixKdn1lKP8d
187
187
  +THIYJ/ZdpxUZeNKy7f1djoctqAk5T7ujVJh2d6xRXwqvQcJKoeW
188
188
  =6E9O
189
189
  -----END PGP PUBLIC KEY BLOCK-----
190
+ pub 2048R/C694390E 2012-05-19 [expires: 2016-05-19]
191
+ uid Peter Donald <peter.j.donald@gmail.com>
192
+ sig 3 C694390E 2012-05-19 Peter Donald <peter.j.donald@gmail.com>
193
+ sub 2048R/0C53F414 2012-05-19 [expires: 2016-05-19]
194
+ sig C694390E 2012-05-19 Peter Donald <peter.j.donald@gmail.com>
195
+
196
+ -----BEGIN PGP PUBLIC KEY BLOCK-----
197
+ Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
198
+ Comment: GPGTools - http://gpgtools.org
199
+
200
+ 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
231
+ IAU=
232
+ =dNyx
233
+ -----END PGP PUBLIC KEY BLOCK-----
data/lib/buildr.rb CHANGED
@@ -17,12 +17,75 @@ unless defined?(Buildr::VERSION)
17
17
  require 'buildr/version'
18
18
  end
19
19
 
20
- require 'buildr/core'
21
- require 'buildr/packaging'
22
- require 'buildr/java'
23
- require 'buildr/ide'
20
+ require 'rake'
21
+ include Rake::DSL
22
+ Rake::TaskManager.record_task_metadata = true
23
+
24
+ require 'rbconfig'
25
+ require 'pathname'
26
+ autoload :Tempfile, 'tempfile'
27
+ autoload :YAML, 'yaml'
28
+ autoload :REXML, 'rexml/document'
29
+ autoload :XmlSimple, 'xmlsimple'
30
+ autoload :Builder, 'builder' # A different kind of buildr, one we use to create XML.
31
+ require 'highline/import'
32
+ autoload :RSpec, 'rspec'
33
+ require 'erb'
34
+ require 'find'
35
+ require 'uri'
36
+ require 'stringio'
37
+ require 'fileutils'
38
+
39
+ require 'buildr/core/util'
40
+ require 'buildr/core/common'
41
+ require 'buildr/core/application'
42
+ require 'buildr/core/jrebel'
43
+ require 'buildr/core/project'
44
+ require 'buildr/core/environment'
45
+ require 'buildr/core/help'
46
+ require 'buildr/core/checks'
47
+ require 'buildr/core/build'
48
+ require 'buildr/core/filter'
49
+ require 'buildr/core/compile'
50
+ require 'buildr/core/test'
24
51
  require 'buildr/shell'
52
+ require 'buildr/java/commands'
53
+ require 'buildr/core/shell'
25
54
  require 'buildr/run'
55
+ require 'buildr/core/run'
56
+ require 'buildr/core/transports'
57
+ require 'buildr/java/pom'
58
+ require 'buildr/core/generate'
59
+ require 'buildr/core/cc'
60
+ require 'buildr/core/doc'
61
+ require 'buildr/core/osx' if RUBY_PLATFORM =~ /darwin/
62
+ require 'buildr/core/linux' if RUBY_PLATFORM =~ /linux/
63
+ require 'buildr/packaging/version_requirement'
64
+ require 'buildr/packaging/artifact_namespace'
65
+ require 'buildr/packaging/artifact'
66
+ require 'buildr/packaging/package'
67
+ require 'buildr/packaging/archive'
68
+ require 'buildr/packaging/ziptask'
69
+ require 'buildr/packaging/tar'
70
+ require 'buildr/packaging/gems'
71
+ require 'buildr/packaging/zip'
72
+ require RUBY_PLATFORM == 'java' ? 'buildr/java/jruby' : 'buildr/java/rjb'
73
+ require 'buildr/java/ant'
74
+ require 'buildr/java/compiler'
75
+ require 'buildr/java/external'
76
+ require 'buildr/java/tests'
77
+ require 'buildr/java/test_result'
78
+ require 'buildr/java/bdd'
79
+ require 'buildr/java/packaging'
80
+ require 'buildr/java/commands'
81
+ require 'buildr/java/doc'
82
+ require 'buildr/java/deprecated'
83
+ require 'buildr/ide/idea'
84
+ require 'buildr/ide/eclipse'
85
+ # Order is significant for auto-detection, from most specific to least
86
+ require 'buildr/ide/eclipse/plugin'
87
+ require 'buildr/ide/eclipse/scala'
88
+ require 'buildr/ide/eclipse/java'
26
89
 
27
90
  # Methods defined in Buildr are both instance methods (e.g. when included in Project)
28
91
  # and class methods when invoked like Buildr.artifacts().
@@ -14,8 +14,6 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require 'buildr/core/util'
18
-
19
17
  module Buildr::Clojure
20
18
 
21
19
  REQUIRES = ArtifactNamespace.for(self) do |ns|
@@ -36,18 +36,10 @@
36
36
  # SOFTWARE.
37
37
 
38
38
 
39
- require 'rake'
40
- require 'highline/import'
41
- require 'rubygems/source_info_cache' if Gem::VERSION =~ /1.[0-4]/
42
- require 'buildr/core/util'
43
- Gem.autoload :SourceInfoCache, 'rubygems/source_info_cache' if Gem::VERSION =~ /1.[0-4]/
44
-
45
-
46
39
  # Gem::user_home is nice, but ENV['HOME'] lets you override from the environment.
47
40
  ENV['HOME'] ||= File.expand_path(Gem::user_home)
48
41
  ENV['BUILDR_ENV'] ||= 'development'
49
42
 
50
-
51
43
  module Buildr
52
44
 
53
45
  # Provide settings that come from three sources.
@@ -428,36 +420,35 @@ module Buildr
428
420
 
429
421
  # Load/install all Gems specified in build.yaml file.
430
422
  def load_gems #:nodoc:
431
- missing_deps, installed = listed_gems.partition { |gem| gem.is_a?(Gem::Dependency) }
423
+ installed, missing_deps = listed_gems
432
424
  unless missing_deps.empty?
433
- newly_installed = Util::Gems.install(*missing_deps)
434
- installed += newly_installed
435
- end
436
- installed.each do |spec|
437
- if gem(spec.name, spec.version.to_s)
438
- # TODO: is this intended to load rake tasks from the installed gems?
439
- # We should use a convention like .. if the gem has a _buildr.rb file, load it.
440
-
441
- #FileList[spec.require_paths.map { |path| File.expand_path("#{path}/*.rb", spec.full_gem_path) }].
442
- # map { |path| File.basename(path) }.each { |file| require file }
443
- #FileList[File.expand_path('tasks/*.rake', spec.full_gem_path)].each do |file|
444
- # Buildr.application.add_import file
445
- #end
446
- end
425
+ fail Gem::LoadError, "Build requires the gems #{missing_deps.join(', ')}, which cannot be found in the local repository. Please install the gems before attempting to build project."
447
426
  end
427
+ installed.each { |spec| spec.activate }
448
428
  @gems = installed
449
429
  end
450
430
 
451
- # Returns Gem::Specification for every listed and installed Gem, Gem::Dependency
452
- # for listed and uninstalled Gem, which is the installed before loading the buildfile.
431
+ # Returns two lists. The first contains a Gem::Specification for every listed and installed
432
+ # Gem, the second contains a Gem::Dependency for every listed and uninstalled Gem.
453
433
  def listed_gems #:nodoc:
454
- Array(settings.build['gems']).map do |dep|
455
- name, trail = dep.scan(/^\s*(\S*)\s*(.*)\s*$/).first
456
- versions = trail.scan(/[=><~!]{0,2}\s*[\d\.]+/)
457
- versions = ['>= 0'] if versions.empty?
458
- dep = Gem::Dependency.new(name, versions)
459
- Gem::SourceIndex.from_installed_gems.search(dep).last || dep
434
+ found = []
435
+ missing = []
436
+ Array(settings.build['gems']).each do |dep|
437
+ name, versions = parse_gem_dependency(dep)
438
+ begin
439
+ found << Gem::Specification.find_by_name(name, versions)
440
+ rescue Exception
441
+ missing << Gem::Dependency.new(name, versions)
442
+ end
460
443
  end
444
+ return [found, missing]
445
+ end
446
+
447
+ def parse_gem_dependency(dep) #:nodoc:
448
+ name, trail = dep.scan(/^\s*(\S*)\s*(.*)\s*$/).first
449
+ versions = trail.scan(/[=><~!]{0,2}\s*[\d\.]+/)
450
+ versions = ['>= 0'] if versions.empty?
451
+ return name, versions
461
452
  end
462
453
 
463
454
  # Load artifact specs from the build.yaml file, making them available
@@ -637,7 +628,7 @@ def trace?(*category)
637
628
  options = Buildr.application.options
638
629
  return options.trace if category.empty?
639
630
  return true if options.trace_all
640
- return false unless Buildr.application.options.trace_categories
631
+ return false unless options.trace_categories
641
632
  options.trace_categories.include?(category.first)
642
633
  end
643
634
 
@@ -13,13 +13,6 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
-
17
- require 'buildr/core/project'
18
- require 'buildr/core/common'
19
- require 'buildr/core/checks'
20
- require 'buildr/core/environment'
21
-
22
-
23
16
  module Buildr
24
17
 
25
18
  class Options
@@ -13,11 +13,6 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- require 'buildr/core/common'
17
- require 'buildr/core/project'
18
- require 'buildr/core/build'
19
- require 'buildr/core/compile'
20
-
21
16
  module Buildr
22
17
  class CCTask < Rake::Task
23
18
  attr_accessor :delay
@@ -13,10 +13,6 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
-
17
- require 'buildr/core/project'
18
- autoload :RSpec, 'rspec'
19
-
20
16
  module Buildr
21
17
  # Methods added to Project to allow checking the build.
22
18
  module Checks
@@ -13,11 +13,6 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
-
17
- require 'rake'
18
- require 'buildr/core/util'
19
-
20
-
21
16
  module Buildr
22
17
 
23
18
  # :call-seq:
@@ -13,11 +13,6 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
-
17
- require 'buildr/core/common'
18
- require 'find'
19
-
20
-
21
16
  module Buildr
22
17
 
23
18
  # The underlying compiler used by CompileTask.
@@ -51,9 +46,9 @@ module Buildr
51
46
  def compilers
52
47
  @compilers ||= []
53
48
  end
54
-
49
+
55
50
  private
56
-
51
+
57
52
  # Only used by our specs.
58
53
  def compilers=(compilers)
59
54
  @compilers = compilers
@@ -92,8 +87,8 @@ module Buildr
92
87
  paths = task.sources + [sources].flatten.map { |src| Array(project.path_to(:source, task.usage, src.to_sym)) }
93
88
  paths.flatten!
94
89
  ext_glob = Array(source_ext).join(',')
95
-
96
- paths.each { |path|
90
+
91
+ paths.each { |path|
97
92
  Find.find(path) {|found|
98
93
  if (!File.directory?(found)) && found.match(/.*\.#{Array(source_ext).join('|')}/)
99
94
  return true
@@ -192,7 +187,7 @@ module Buildr
192
187
  else
193
188
  # try to extract package name from .java or .scala files
194
189
  if ['.java', '.scala', '.groovy'].include? File.extname(source)
195
- package = findFirst(source, /^\s*package\s+(\S+)\s*;?\s*$/)
190
+ package = findFirst(source, /^\s*package\s+([^\s;]+)\s*;?\s*/)
196
191
  map[source] = package ? File.join(target, package[1].gsub('.', '/'), File.basename(source).ext(target_ext)) : target
197
192
  elsif
198
193
  map[source] = target
@@ -112,7 +112,13 @@ module Buildr
112
112
  # Includes additional source files and directories when generating the documentation
113
113
  # and returns self. When specifying a directory, includes all source files in that directory.
114
114
  def include(*files)
115
- @files.include *files.flatten.compact
115
+ files.each do |file|
116
+ if file.respond_to? :to_ary
117
+ include(*file.to_ary)
118
+ else
119
+ @files.include *files.flatten.compact.collect { |f| File.expand_path(f.to_s) }
120
+ end
121
+ end
116
122
  self
117
123
  end
118
124
 
@@ -121,7 +127,7 @@ module Buildr
121
127
  #
122
128
  # Excludes source files and directories from generating the documentation.
123
129
  def exclude(*files)
124
- @files.exclude *files
130
+ @files.exclude *files.collect{|f|File.expand_path(f)}
125
131
  self
126
132
  end
127
133
 
@@ -205,7 +211,7 @@ module Buildr
205
211
  def source_files #:nodoc:
206
212
  @source_files ||= @files.map(&:to_s).map do |file|
207
213
  Array(engine.class.source_ext).map do |ext|
208
- File.directory?(file) ? FileList[File.join(file, "**/*.#{ext}")] : file
214
+ File.directory?(file) ? FileList[File.join(file, "**/*.#{ext}")] : File.expand_path(file)
209
215
  end
210
216
  end.flatten.reject { |file| @files.exclude?(file) }
211
217
  end
@@ -13,7 +13,6 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
-
17
16
  module Buildr
18
17
 
19
18
  # Collection of options for controlling Buildr.
@@ -13,10 +13,6 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
-
17
- require 'erb'
18
-
19
-
20
16
  module Buildr
21
17
 
22
18
  # A filter knows how to copy files from one directory to another, applying mappings to the
@@ -364,7 +360,6 @@ module Buildr
364
360
  else
365
361
  bnd = config.instance_eval { binding }
366
362
  end
367
- require 'erb'
368
363
  ERB.new(content).result(bnd)
369
364
  end
370
365
 
@@ -13,10 +13,6 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
-
17
- require 'buildr/java/pom'
18
-
19
-
20
16
  module Buildr
21
17
  module Generate #:nodoc:
22
18
 
@@ -56,7 +52,7 @@ GROUP = "#{name}"
56
52
  COPYRIGHT = ""
57
53
 
58
54
  # Specify Maven 2.0 remote repositories here, like this:
59
- repositories.remote << "http://www.ibiblio.org/maven2/"
55
+ repositories.remote << "http://repo1.maven.org/maven2"
60
56
 
61
57
  desc "The #{name.capitalize} project"
62
58
  define "#{name}" do
@@ -126,7 +122,7 @@ define "#{name}" do
126
122
  legacy = repository["layout"].to_s =~ /legacy/
127
123
  !legacy
128
124
  } rescue nil
129
- repositories = [{"name" => "Standard maven2 repository", "url" => "http://www.ibiblio.org/maven2"}] if repositories.nil? || repositories.empty?
125
+ repositories = [{"name" => "Standard maven2 repository", "url" => "http://repo1.maven.org/maven2"}] if repositories.nil? || repositories.empty?
130
126
  repositories.each do |repository|
131
127
  name, url = repository["name"], repository["url"]
132
128
  script << "# #{name}"