buildr 1.4.6-java → 1.4.7-java

Sign up to get free protection for your applications and to get access to all the features.
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 +499 -467
  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
@@ -74,7 +74,7 @@ module Java
74
74
 
75
75
  # On OS X we know where the default JDK is. We can try to guess for other OS.
76
76
  # We set JAVA_HOME early so we can use it without calling Java.load first.
77
- ENV['JAVA_HOME'] ||= '/System/Library/Frameworks/JavaVM.framework/Home' if Config::CONFIG['host_os'] =~ /darwin/i
77
+ ENV['JAVA_HOME'] ||= '/System/Library/Frameworks/JavaVM.framework/Home' if RbConfig::CONFIG['host_os'] =~ /darwin/i
78
78
 
79
79
  class << self
80
80
 
@@ -13,9 +13,8 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- # necessary to require YAML even if it is mentioned by autoload as it fails on some platforms.
16
+ # It is necessary to require these files here as the bdd plugin directly includes this file
17
17
  require 'yaml'
18
- require 'fileutils'
19
18
  require 'rspec/core/formatters/base_formatter'
20
19
 
21
20
  module Buildr #:nodoc:
@@ -1,3 +1,4 @@
1
+
1
2
  # Licensed to the Apache Software Foundation (ASF) under one or more
2
3
  # contributor license agreements. See the NOTICE file distributed with this
3
4
  # work for additional information regarding copyright ownership. The ASF
@@ -13,12 +14,6 @@
13
14
  # License for the specific language governing permissions and limitations under
14
15
  # the License.
15
16
 
16
-
17
- require 'buildr/core/build'
18
- require 'buildr/core/compile'
19
- require 'buildr/java/ant'
20
-
21
-
22
17
  module Buildr
23
18
 
24
19
  class TestFramework::Java < TestFramework::Base
@@ -328,6 +323,14 @@ module Buildr
328
323
  def run(tests, dependencies) #:nodoc:
329
324
  cmd_args = ['-log', '2', '-sourcedir', task.compile.sources.join(';'), '-suitename', task.project.id ]
330
325
  cmd_args << '-d' << task.report_to.to_s
326
+ exclude_args = options[:excludegroups] || []
327
+ if !exclude_args.empty?
328
+ cmd_args << '-excludegroups' << exclude_args.join(",")
329
+ end
330
+ groups_args = options[:groups] || []
331
+ if !groups_args.empty?
332
+ cmd_args << '-groups' << groups_args.join(",")
333
+ end
331
334
  # run all tests in the same suite
332
335
  cmd_args << '-testclass' << tests
333
336
 
@@ -355,8 +358,67 @@ module Buildr
355
358
 
356
359
  end
357
360
 
361
+ # A composite test framework that runs multiple other test frameworks.
362
+ #
363
+ # e.g.,
364
+ # test.using :multitest, :frameworks => [ Buildr::JUnit, Buildr::TestNG ], :options = {
365
+ # :junit => { :fork => true },
366
+ # :testng => { ... }
367
+ # }
368
+ #
369
+ class MultiTest < Buildr::TestFramework::Java
370
+ # TODO: Support multiple test report locations, one per framework
371
+
372
+ class << self
373
+ def applies_to?(project) #:nodoc:
374
+ false # no auto-detection, should be set explicitly
375
+ end
376
+ end
377
+
378
+ attr_accessor :frameworks
379
+
380
+ def initialize(task, options) #:nodoc:
381
+ super
382
+ fail "Missing :frameworks option" unless options[:frameworks]
383
+ @frameworks = options[:frameworks].map do |f|
384
+ framework_options = (options[:options] || {})[f.to_sym] || {}
385
+ f.new(task, options)
386
+ end
387
+ end
388
+
389
+ def dependencies #:nodoc:
390
+ unless @dependencies
391
+ @dependencies = TestFramework::Java.dependencies
392
+ @dependencies += @frameworks.map { |f| f.dependencies }.flatten
393
+ end
394
+ @dependencies
395
+ end
396
+
397
+
398
+ def tests(dependencies)
399
+ @frameworks.map { |f| f.tests(dependencies) }.flatten
400
+ end
401
+
402
+ def run(tests, dependencies) #:nodoc:
403
+ framework_for_test = @frameworks.inject({}) do |hash, f|
404
+ f.tests(dependencies).each { |t| hash[t] = f }
405
+ hash
406
+ end
407
+
408
+ tests_by_framework = tests.group_by { |t| framework_for_test[t] }
409
+
410
+ passed = []
411
+ tests_by_framework.each do |f, tests|
412
+ passed += f.run(tests, dependencies)
413
+ end
414
+ passed
415
+ end
416
+ end # MultiTest
417
+
358
418
  end # Buildr
359
419
 
360
420
 
361
421
  Buildr::TestFramework << Buildr::JUnit
362
422
  Buildr::TestFramework << Buildr::TestNG
423
+ Buildr::TestFramework << Buildr::MultiTest
424
+
@@ -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
  # Base class for ZipTask, TarTask and other archives.
@@ -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/transports'
19
- require 'buildr/packaging/artifact_namespace'
20
- require 'fileutils'
21
-
22
-
23
16
  module Buildr
24
17
 
25
18
  desc 'Download all artifacts'
@@ -809,28 +802,38 @@ module Buildr
809
802
  when Struct
810
803
  set |= artifacts(spec.values)
811
804
  else
812
- fail "Invalid artifact specification in #{specs.inspect}"
805
+ if spec.respond_to? :to_spec
806
+ set |= artifacts(spec.to_spec)
807
+ else
808
+ fail "Invalid artifact specification in #{specs.inspect}"
809
+ end
813
810
  end
814
811
  end
815
812
  end
816
813
 
817
- def transitive(*specs)
818
- specs.flatten.inject([]) do |set, spec|
814
+ def transitive(*args)
815
+ options = Hash === args.last ? args.pop : {}
816
+ dep_opts = {
817
+ :scopes => options[:scopes] || [nil, "compile", "runtime", "provided"],
818
+ :optional => options[:optional]
819
+ }
820
+ specs = args.flatten
821
+ specs.inject([]) do |set, spec|
819
822
  case spec
820
823
  when /([^:]+:){2,4}/ # A spec as opposed to a file name.
821
824
  artifact = artifact(spec)
822
825
  set |= [artifact] unless artifact.type == :pom
823
- set |= POM.load(artifact.pom).dependencies.map { |spec| artifact(spec) }
826
+ set |= POM.load(artifact.pom).dependencies(dep_opts).map { |spec| artifact(spec) }
824
827
  when Hash
825
- set |= [transitive(spec)]
828
+ set |= [transitive(spec, options)]
826
829
  when String # Must always expand path.
827
- set |= transitive(file(File.expand_path(spec)))
830
+ set |= transitive(file(File.expand_path(spec)), options)
828
831
  when Project
829
- set |= transitive(spec.packages)
832
+ set |= transitive(spec.packages, options)
830
833
  when Rake::Task
831
- set |= spec.respond_to?(:to_spec) ? transitive(spec.to_spec) : [spec]
834
+ set |= spec.respond_to?(:to_spec) ? transitive(spec.to_spec, options) : [spec]
832
835
  when Struct
833
- set |= transitive(spec.values)
836
+ set |= transitive(spec.values, options)
834
837
  else
835
838
  fail "Invalid artifact specification in: #{specs.to_s}"
836
839
  end
@@ -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/packaging/version_requirement'
18
-
19
-
20
16
  module Buildr
21
17
 
22
18
  # An ArtifactNamespace is a hierarchical dictionary used to manage ArtifactRequirements.
@@ -224,6 +220,32 @@ module Buildr
224
220
  const_set(:ROOT, new('root'))
225
221
  end
226
222
 
223
+ # Differs from Artifact.to_hash in that 1) it does not choke when version isn't present
224
+ # and 2) it assumes that if an artifact spec ends with a colon, e.g. "org.example:library:jdk5:"
225
+ # it indicates the last segment ("jdk5") is a classifier.
226
+ def to_hash(spec)
227
+ if spec.respond_to?(:to_spec)
228
+ to_hash spec.to_spec
229
+ elsif Hash === spec
230
+ return spec
231
+ elsif String === spec || Symbol === spec
232
+ spec = spec.to_s
233
+ if spec[-1,1] == ':'
234
+ group, id, type, classifier, *rest = spec.split(':').map { |part| part.empty? ? nil : part }
235
+ else
236
+ group, id, type, version, *rest = spec.split(':').map { |part| part.empty? ? nil : part }
237
+ unless rest.empty?
238
+ # Optional classifier comes before version.
239
+ classifier, version = version, rest.shift
240
+ end
241
+ end
242
+ fail "Expecting <group:id:type:version> or <group:id:type:classifier:version>, found <#{spec}>" unless rest.empty?
243
+ { :group => group, :id => id, :type => type, :version => version, :classifier => classifier }.reject { |k,v| v == nil }
244
+ else
245
+ fail "Unexpected artifact spec: #{spec.inspect}"
246
+ end
247
+ end
248
+
227
249
  # Populate namespaces from a hash of hashes.
228
250
  # The following example uses the profiles yaml to achieve this.
229
251
  #
@@ -400,13 +422,19 @@ module Buildr
400
422
  copy_attrs(spec)
401
423
  else
402
424
  spec = requirement_hash(spec)
403
- apply_spec(spec[:spec])
425
+ apply_spec_no_validation(spec[:spec])
404
426
  self.name = spec[:name]
405
427
  @requirement = spec[:requirement]
406
428
  @version = @requirement.default if VersionRequirement.requirement?(@version)
407
429
  end
408
430
  end
409
431
 
432
+ def apply_spec_no_validation(spec)
433
+ spec = ArtifactNamespace.to_hash(spec)
434
+ ActsAsArtifact::ARTIFACT_ATTRIBUTES.each { |key| instance_variable_set("@#{key}", spec[key]) }
435
+ self
436
+ end
437
+
410
438
  # Copy attributes from other to this object
411
439
  def copy_attrs(other)
412
440
  (ActsAsArtifact::ARTIFACT_ATTRIBUTES + [:name, :requirement]).each do |attr|
@@ -433,22 +461,22 @@ module Buildr
433
461
  parts = spec.split(/\s*->\s*/, 3).map(&:strip)
434
462
  case parts.size
435
463
  when 1
436
- result[:spec] = Artifact.to_hash(parts.first)
464
+ result[:spec] = ArtifactNamespace.to_hash(parts.first)
437
465
  when 2
438
466
  if /^\w+$/ === parts.first
439
467
  result[:name] = parts.first
440
- result[:spec] = Artifact.to_hash(parts.last)
468
+ result[:spec] = ArtifactNamespace.to_hash(parts.last)
441
469
  else
442
- result[:spec] = Artifact.to_hash(parts.first)
470
+ result[:spec] = ArtifactNamespace.to_hash(parts.first)
443
471
  result[:requirement] = VersionRequirement.create(parts.last)
444
472
  end
445
473
  when 3
446
474
  result[:name] = parts.first
447
- result[:spec] = Artifact.to_hash(parts[1])
475
+ result[:spec] = ArtifactNamespace.to_hash(parts[1])
448
476
  result[:requirement] = VersionRequirement.create(parts.last)
449
477
  end
450
478
  else
451
- result[:spec] = Artifact.to_hash(spec)
479
+ result[:spec] = ArtifactNamespace.to_hash(spec)
452
480
  end
453
481
  result[:name] ||= result[:spec][:id].to_s.to_sym
454
482
  result[:requirement] ||= VersionRequirement.create(result[:spec][:version])
@@ -458,7 +486,7 @@ module Buildr
458
486
  # Test if this requirement is satisfied by an artifact spec.
459
487
  def satisfied_by?(spec)
460
488
  return false unless requirement
461
- spec = Artifact.to_hash(spec)
489
+ spec = ArtifactNamespace.to_hash(spec)
462
490
  hash = to_spec_hash
463
491
  hash.delete(:version)
464
492
  version = spec.delete(:version)
@@ -499,24 +527,23 @@ module Buildr
499
527
 
500
528
  # Return an artifact spec without the version part.
501
529
  def unversioned_spec
502
- str = to_spec
503
- return nil if str =~ /^:+/
504
- ary = str.split(':')
505
- ary = ary[0...-1] if ary.size > 3
506
- ary.join(':')
530
+ hash = to_spec_hash
531
+ return nil if hash.values.compact.length <= 1
532
+ if hash[:classifier]
533
+ "#{hash[:group]}:#{hash[:id]}:#{hash[:type]}:#{hash[:classifier]}:"
534
+ else
535
+ "#{hash[:group]}:#{hash[:id]}:#{hash[:type]}"
536
+ end
507
537
  end
508
538
 
509
539
  class << self
510
- # Return an artifact spec without the version part.
511
540
  def unversioned_spec(spec)
512
- str = spec.to_s
513
- return nil if str =~ /^:+/
514
- ary = str.split(':')
515
- ary = ary[0...-1] if ary.size > 3
516
- if ary.size > 2
517
- ary.join(':')
541
+ hash = ArtifactNamespace.to_hash(spec)
542
+ return nil if hash.values.compact.length <= 1
543
+ if hash[:classifier]
544
+ "#{hash[:group]}:#{hash[:id]}:#{hash[:type]}:#{hash[:classifier]}:"
518
545
  else
519
- new(spec).unversioned_spec
546
+ "#{hash[:group]}:#{hash[:id]}:#{hash[:type]}"
520
547
  end
521
548
  end
522
549
  end
@@ -14,8 +14,7 @@
14
14
  # the License.
15
15
 
16
16
 
17
- require 'hpricot'
18
-
17
+ autoload :Hpricot, 'hpricot'
19
18
 
20
19
  module Buildr
21
20
 
@@ -13,13 +13,9 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
-
17
- require 'buildr/packaging/package'
18
- require 'buildr/packaging/archive'
19
- gem 'rubyforge' ; autoload :RubyForge, 'rubyforge'
16
+ autoload :RubyForge, 'rubyforge'
20
17
  Gem.autoload :Package, 'rubygems/package'
21
18
 
22
-
23
19
  module Buildr
24
20
 
25
21
  class PackageGemTask < ArchiveTask
@@ -39,14 +35,6 @@ module Buildr
39
35
  @spec
40
36
  end
41
37
 
42
- def install
43
- Util::Gems.command 'install', name
44
- end
45
-
46
- def uninstall
47
- Util::Gems.command 'uninstall', spec.name, '-v', spec.version.to_s
48
- end
49
-
50
38
  def upload
51
39
  rubyforge = RubyForge.new
52
40
  rubyforge.login
@@ -13,12 +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/compile'
19
- require 'buildr/packaging/artifact'
20
-
21
-
22
16
  module Buildr
23
17
  # Methods added to Project to support packaging and tasks for packaging,
24
18
  # installing and uploading packages.
@@ -13,10 +13,8 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
-
17
- require 'buildr/packaging/archive'
18
- gem 'minitar' ; autoload :Archive, 'archive/tar/minitar'
19
-
16
+ autoload :Archive, 'archive/tar/minitar'
17
+ autoload :Zlib, 'zlib'
20
18
 
21
19
  module Buildr
22
20
 
@@ -49,7 +49,7 @@ module Buildr
49
49
  class << self
50
50
  # is +str+ a version string?
51
51
  def version?(str)
52
- /^\s*\d[#{VER_CHARS}]*\s*$/ === str
52
+ /^\s*r?\d[#{VER_CHARS}]*\s*$/ === str
53
53
  end
54
54
 
55
55
  # is +str+ a version requirement?
@@ -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
  if RUBY_VERSION >= '1.9.0' # Required to properly load RubyZip under Ruby 1.9
18
17
  $LOADED_FEATURES.unshift 'ftools'
19
18
  require 'fileutils'
@@ -178,7 +177,7 @@ module Zip #:nodoc:
178
177
 
179
178
  class ZipEntrySet
180
179
  def <<(entry)
181
- @entrySet[entry.to_s] = entry if entry != nil
180
+ @entrySet[entry.name.to_s] = entry if entry != nil
182
181
  end
183
182
  end
184
183
  end
@@ -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/packaging/archive'
18
-
19
-
20
16
  module Buildr
21
17
 
22
18
  # The ZipTask creates a new Zip file. You can include any number of files and and directories,
@@ -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
  module Run
19
18
  include Extension
@@ -172,8 +171,9 @@ module Buildr
172
171
  end
173
172
 
174
173
  after_define(:run => :test) do |project|
175
- project.run.with project.test.compile.dependencies
176
- project.run.with project.test.compile.target if project.test.compile.target
174
+ project.run.with project.compile.dependencies
175
+ project.run.with project.resources.target if project.resources.target
176
+ project.run.with project.compile.target if project.compile.target
177
177
  end
178
178
 
179
179
  # :call-seq: