buildr 1.4.11-x86-mswin32 → 1.4.12-x86-mswin32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. data/CHANGELOG +22 -0
  2. data/README.rdoc +2 -0
  3. data/addon/buildr/checkstyle.rb +1 -1
  4. data/addon/buildr/gwt.rb +127 -82
  5. data/addon/buildr/wsgen.rb +19 -1
  6. data/buildr.gemspec +3 -1
  7. data/doc/_layouts/default.html +1 -1
  8. data/doc/download.textile +18 -6
  9. data/doc/index.textile +9 -18
  10. data/lib/buildr.rb +1 -0
  11. data/lib/buildr/clojure.rb +1 -1
  12. data/lib/buildr/clojure/shell.rb +1 -1
  13. data/lib/buildr/core/application.rb +3 -2
  14. data/lib/buildr/core/build.rb +2 -3
  15. data/lib/buildr/core/cc.rb +1 -1
  16. data/lib/buildr/core/checks.rb +2 -3
  17. data/lib/buildr/core/common.rb +1 -1
  18. data/lib/buildr/core/compile.rb +1 -1
  19. data/lib/buildr/core/doc.rb +2 -3
  20. data/lib/buildr/core/environment.rb +1 -1
  21. data/lib/buildr/core/filter.rb +1 -1
  22. data/lib/buildr/core/generate.rb +1 -1
  23. data/lib/buildr/core/help.rb +1 -1
  24. data/lib/buildr/core/jrebel.rb +1 -1
  25. data/lib/buildr/core/progressbar.rb +1 -1
  26. data/lib/buildr/core/project.rb +1 -1
  27. data/lib/buildr/core/run.rb +2 -2
  28. data/lib/buildr/core/shell.rb +2 -3
  29. data/lib/buildr/core/test.rb +1 -1
  30. data/lib/buildr/core/util.rb +1 -1
  31. data/lib/buildr/groovy/bdd.rb +1 -1
  32. data/lib/buildr/groovy/compiler.rb +1 -0
  33. data/lib/buildr/groovy/doc.rb +4 -4
  34. data/lib/buildr/groovy/shell.rb +2 -2
  35. data/lib/buildr/ide/eclipse.rb +1 -1
  36. data/lib/buildr/ide/idea.rb +45 -14
  37. data/lib/buildr/java/ant.rb +1 -1
  38. data/lib/buildr/java/bdd.rb +1 -1
  39. data/lib/buildr/java/cobertura.rb +1 -1
  40. data/lib/buildr/java/compiler.rb +3 -3
  41. data/lib/buildr/java/deprecated.rb +1 -1
  42. data/lib/buildr/java/doc.rb +3 -3
  43. data/lib/buildr/java/ecj.rb +2 -2
  44. data/lib/buildr/java/emma.rb +1 -1
  45. data/lib/buildr/java/external.rb +2 -2
  46. data/lib/buildr/java/packaging.rb +2 -3
  47. data/lib/buildr/java/pom.rb +1 -0
  48. data/lib/buildr/java/rjb.rb +1 -2
  49. data/lib/buildr/java/test_result.rb +1 -1
  50. data/lib/buildr/java/tests.rb +1 -1
  51. data/lib/buildr/java/version_requirement.rb +1 -1
  52. data/lib/buildr/packaging/archive.rb +2 -2
  53. data/lib/buildr/packaging/artifact.rb +1 -1
  54. data/lib/buildr/packaging/artifact_namespace.rb +1 -1
  55. data/lib/buildr/packaging/artifact_search.rb +1 -2
  56. data/lib/buildr/packaging/gems.rb +1 -1
  57. data/lib/buildr/packaging/package.rb +1 -1
  58. data/lib/buildr/packaging/tar.rb +1 -1
  59. data/lib/buildr/packaging/test_jar.rb +32 -0
  60. data/lib/buildr/packaging/version_requirement.rb +1 -1
  61. data/lib/buildr/packaging/zip.rb +4 -1
  62. data/lib/buildr/packaging/ziptask.rb +1 -1
  63. data/lib/buildr/run.rb +1 -1
  64. data/lib/buildr/scala/bdd.rb +2 -2
  65. data/lib/buildr/scala/compiler.rb +2 -1
  66. data/lib/buildr/scala/doc.rb +5 -4
  67. data/lib/buildr/scala/shell.rb +2 -2
  68. data/lib/buildr/scala/tests.rb +2 -2
  69. data/lib/buildr/shell.rb +2 -2
  70. data/lib/buildr/version.rb +2 -2
  71. data/rakelib/doc.rake +4 -5
  72. data/rakelib/stage.rake +1 -1
  73. data/spec/core/build_spec.rb +15 -6
  74. data/spec/core/common_spec.rb +0 -1
  75. data/spec/core/compile_spec.rb +24 -17
  76. data/spec/java/bdd_spec.rb +23 -27
  77. data/spec/java/packaging_spec.rb +35 -0
  78. data/spec/scala/compiler_spec.rb +8 -6
  79. metadata +6 -2
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
  class CCTask < Rake::Task
18
18
  attr_accessor :delay
19
19
  attr_reader :project
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
  # Methods added to Project to allow checking the build.
18
18
  module Checks
19
19
 
@@ -243,7 +243,6 @@ module Rake #:nodoc:
243
243
  end
244
244
  end
245
245
 
246
-
247
- class Buildr::Project
246
+ class Buildr::Project #:nodoc:
248
247
  include Buildr::Checks
249
248
  end
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
 
18
18
  # :call-seq:
19
19
  # struct(hash) => Struct
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
 
18
18
  # The underlying compiler used by CompileTask.
19
19
  # To add a new compiler, extend Compiler::Base and add your compiler using:
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
  module Doc
18
18
  include Extension
19
19
 
@@ -275,8 +275,7 @@ module Buildr
275
275
  end
276
276
  end
277
277
 
278
-
279
- class Project
278
+ class Project #:nodoc:
280
279
  include Doc
281
280
  end
282
281
  end
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
 
18
18
  # Collection of options for controlling Buildr.
19
19
  class Options
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
 
18
18
  # A filter knows how to copy files from one directory to another, applying mappings to the
19
19
  # contents of these files.
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
  module Generate #:nodoc:
18
18
 
19
19
  task 'generate' do
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
 
18
18
  module Help #:nodoc:
19
19
  class << self
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
  module JRebel
18
18
  def jrebel_home
19
19
  unless @jrebel_home
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
-
16
+ #
17
17
  class ProgressBar
18
18
 
19
19
  class << self
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
 
18
18
  # Symbolic mapping for directory layout. Used for both the default and custom layouts.
19
19
  #
@@ -13,8 +13,8 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
17
- module Run
16
+ module Buildr #:nodoc:
17
+ module Run #:nodoc:
18
18
 
19
19
  class JavaRunner < Base
20
20
  include Buildr::JRebel
@@ -13,9 +13,8 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
17
-
18
- module Shell
16
+ module Buildr #:nodoc:
17
+ module Shell #:nodoc:
19
18
 
20
19
  class BeanShell < Base
21
20
  include Buildr::JRebel
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
 
18
18
  # The underlying test framework used by TestTask.
19
19
  # To add a new test framework, extend TestFramework::Base and add your framework using:
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
 
18
18
  module Util
19
19
  extend self
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
-
16
+ # The Groovy module
17
17
  module Buildr::Groovy
18
18
 
19
19
  # EasyB is a Groovy based BDD framework.
@@ -14,6 +14,7 @@
14
14
  # the License.
15
15
 
16
16
 
17
+ #
17
18
  module Buildr::Groovy
18
19
 
19
20
  REQUIRES = ArtifactNamespace.for(self) do |ns|
@@ -13,10 +13,10 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
17
- module Doc
16
+ module Buildr #:nodoc:
17
+ module Doc #:nodoc:
18
18
 
19
- module GroovydocDefaults
19
+ module GroovydocDefaults #:nodoc:
20
20
  include Extension
21
21
 
22
22
  # Default groovydoc -doc-title to project's comment or name
@@ -64,7 +64,7 @@ module Buildr
64
64
  end
65
65
  end
66
66
 
67
- class Project
67
+ class Project #:nodoc:
68
68
  include GroovydocDefaults
69
69
  end
70
70
  end
@@ -13,8 +13,8 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
17
- module Groovy
16
+ module Buildr #:nodoc:
17
+ module Groovy #:nodoc:
18
18
  class GroovySH < Buildr::Shell::Base
19
19
  include JRebel
20
20
 
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
  module Eclipse #:nodoc:
18
18
  include Extension
19
19
 
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
  module IntellijIdea
18
18
  def self.new_document(value)
19
19
  REXML::Document.new(value, :attribute_quote => :quote)
@@ -253,15 +253,35 @@ module Buildr
253
253
 
254
254
  def add_gwt_facet(modules = {}, options = {})
255
255
  name = options[:name] || "GWT"
256
+ detected_gwt_version = nil
257
+ if options[:gwt_dev_artifact]
258
+ a = Buildr.artifact(options[:gwt_dev_artifact])
259
+ a.invoke
260
+ detected_gwt_version = a.to_s
261
+ end
262
+
256
263
  settings =
257
264
  {
258
265
  :webFacet => "Web",
259
266
  :compilerMaxHeapSize => "512",
260
267
  :compilerParameters => "-draftCompile -localWorkers 2 -strict",
261
- :gwtSdkUrl => "file://$GWT_TOOLS$",
262
268
  :gwtScriptOutputStyle => "PRETTY"
263
269
  }.merge(options[:settings] || {})
264
270
 
271
+ buildr_project.compile.dependencies.each do |d|
272
+ if d.to_s =~ /\/com\/google\/gwt\/gwt-dev\/(.*)\//
273
+ detected_gwt_version = d.to_s
274
+ break
275
+ end
276
+ end unless detected_gwt_version
277
+
278
+ if detected_gwt_version
279
+ settings[:gwtSdkUrl] = resolve_path(File.dirname(detected_gwt_version))
280
+ settings[:gwtSdkType] = "maven"
281
+ else
282
+ settings[:gwtSdkUrl] = "file://$GWT_TOOLS$"
283
+ end
284
+
265
285
  add_facet(name, "gwt") do |f|
266
286
  f.configuration do |c|
267
287
  settings.each_pair do |k, v|
@@ -531,7 +551,6 @@ module Buildr
531
551
 
532
552
  # IdeaModule represents an .ipr file
533
553
  class IdeaProject < IdeaFile
534
- attr_accessor :vcs
535
554
  attr_accessor :extra_modules
536
555
  attr_accessor :artifacts
537
556
  attr_accessor :configurations
@@ -540,7 +559,6 @@ module Buildr
540
559
  def initialize(buildr_project)
541
560
  super()
542
561
  @buildr_project = buildr_project
543
- @vcs = detect_vcs
544
562
  @extra_modules = []
545
563
  @artifacts = []
546
564
  @configurations = []
@@ -719,14 +737,6 @@ module Buildr
719
737
  "ipr"
720
738
  end
721
739
 
722
- def detect_vcs
723
- if File.directory?(buildr_project._('.svn'))
724
- "svn"
725
- elsif File.directory?(buildr_project._('.git'))
726
- "Git"
727
- end
728
- end
729
-
730
740
  def base_document
731
741
  target = StringIO.new
732
742
  Builder::XmlMarkup.new(:target => target).project(:version => "4")
@@ -802,9 +812,30 @@ module Buildr
802
812
  end
803
813
 
804
814
  def vcs_component
805
- if vcs
815
+ project_directories = buildr_project.projects.select { |p| p.iml? }.collect { |p| p.base_dir }
816
+ project_directories << buildr_project.base_dir
817
+ # Guess the iml file is in the same dir as base dir
818
+ project_directories += self.extra_modules.collect { |p| File.dirname(p) }
819
+
820
+ project_directories = project_directories.sort.uniq
821
+
822
+ mappings = {}
823
+
824
+ project_directories.each do |dir|
825
+ if File.directory?("#{dir}/.git")
826
+ mappings[dir] = "Git"
827
+ elsif File.directory?("#{dir}/.svn")
828
+ mappings[dir] = "svn"
829
+ end
830
+ end
831
+
832
+ if mappings.size > 1
806
833
  create_component("VcsDirectoryMappings") do |xml|
807
- xml.mapping :directory => "", :vcs => vcs
834
+ mappings.each_pair do |dir, vcs_type|
835
+ resolved_dir = resolve_path(dir)
836
+ mapped_dir = resolved_dir == '$PROJECT_DIR$/.' ? buildr_project.base_dir : resolved_dir
837
+ xml.mapping :directory => mapped_dir, :vcs => vcs_type
838
+ end
808
839
  end
809
840
  end
810
841
  end
@@ -18,7 +18,7 @@ gem 'atoulme-Antwrap'
18
18
  autoload :Antwrap, 'antwrap'
19
19
  autoload :Logger, 'logger'
20
20
 
21
- module Buildr
21
+ module Buildr #:nodoc:
22
22
  module Ant
23
23
 
24
24
  # Which version of Ant we're using by default.
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
 
18
18
  # Mixin for test frameworks using src/spec/{lang}
19
19
  class TestFramework::JavaBDD < TestFramework::Java #:nodoc:
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
16
+ module Buildr #:nodoc:
17
17
 
18
18
  # Provides the <code>cobertura:html</code>, <code>cobertura:xml</code> and <code>cobertura:check</code> tasks.
19
19
  # Require explicitly using <code>require "buildr/java/cobertura"</code>.
@@ -13,8 +13,8 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
17
- module Compiler
16
+ module Buildr #:nodoc:
17
+ module Compiler #:nodoc:
18
18
 
19
19
  # Javac compiler:
20
20
  # compile.using(:javac)
@@ -123,6 +123,6 @@ module Buildr
123
123
  end
124
124
 
125
125
  Buildr::Compiler << Buildr::Compiler::Javac
126
- class Buildr::Project
126
+ class Buildr::Project #:nodoc:
127
127
  include Buildr::Apt
128
128
  end
@@ -13,7 +13,7 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Java
16
+ module Java #:nodoc:
17
17
 
18
18
  # *Deprecated:* In earlier versions, Java.wrapper served as a wrapper around RJB/JRuby.
19
19
  # From this version forward, we apply with JRuby style for importing Java classes:
@@ -13,8 +13,8 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
17
- module Doc
16
+ module Buildr #:nodoc:
17
+ module Doc #:nodoc:
18
18
 
19
19
  module JavadocDefaults
20
20
  include Extension
@@ -76,7 +76,7 @@ module Buildr
76
76
  end
77
77
  end
78
78
 
79
- class Project
79
+ class Project #:nodoc:
80
80
  include JavadocDefaults
81
81
  end
82
82
  end
@@ -13,8 +13,8 @@
13
13
  # License for the specific language governing permissions and limitations under
14
14
  # the License.
15
15
 
16
- module Buildr
17
- module Compiler
16
+ module Buildr #:nodoc:
17
+ module Compiler #:nodoc:
18
18
 
19
19
  class Ecj < Javac
20
20