buildr 1.4.12-java → 1.4.13-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +15 -0
  2. data/CHANGELOG +62 -0
  3. data/addon/buildr/checkstyle.rb +6 -4
  4. data/addon/buildr/gpg.rb +9 -2
  5. data/addon/buildr/gwt.rb +1 -0
  6. data/buildr.gemspec +18 -20
  7. data/doc/download.textile +30 -6
  8. data/doc/index.textile +21 -9
  9. data/doc/packaging.textile +29 -0
  10. data/lib/buildr.rb +3 -0
  11. data/lib/buildr/core/application.rb +24 -0
  12. data/lib/buildr/core/assets.rb +93 -0
  13. data/lib/buildr/core/build.rb +3 -2
  14. data/lib/buildr/core/common.rb +3 -2
  15. data/lib/buildr/core/compile.rb +0 -1
  16. data/lib/buildr/core/generate.rb +2 -2
  17. data/lib/buildr/core/project.rb +1 -1
  18. data/lib/buildr/core/shell.rb +1 -1
  19. data/lib/buildr/core/transports.rb +4 -1
  20. data/lib/buildr/core/util.rb +8 -0
  21. data/lib/buildr/ide/idea.rb +267 -114
  22. data/lib/buildr/java/commands.rb +16 -2
  23. data/lib/buildr/java/packaging.rb +6 -4
  24. data/lib/buildr/java/pom.rb +1 -1
  25. data/lib/buildr/java/tests.rb +3 -3
  26. data/lib/buildr/packaging/archive.rb +4 -3
  27. data/lib/buildr/packaging/package.rb +0 -2
  28. data/lib/buildr/packaging/ziptask.rb +1 -1
  29. data/lib/buildr/version.rb +2 -2
  30. data/rakelib/rspec.rake +5 -49
  31. data/rakelib/stage.rake +7 -5
  32. data/spec/addon/jaxb_xjc_spec.rb +2 -2
  33. data/spec/core/application_spec.rb +8 -8
  34. data/spec/core/build_spec.rb +41 -41
  35. data/spec/core/common_spec.rb +3 -2
  36. data/spec/core/test_spec.rb +34 -34
  37. data/spec/core/transport_spec.rb +21 -17
  38. data/spec/ide/idea_spec.rb +707 -4
  39. data/spec/java/packaging_spec.rb +20 -0
  40. data/spec/java/tests_spec.rb +2 -2
  41. data/spec/packaging/packaging_spec.rb +0 -22
  42. metadata +48 -84
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ODM3NGEzMmMwODFmNTVkYjI4MTdjNjRmMGU3N2U0NmQ1NmIwYWY4Yw==
5
+ data.tar.gz: !binary |-
6
+ MDUxNTgyODM1NTViNjM3Y2NkZmRmZjhlODUxMzJlMTkzN2FmMTBhYw==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ ZmE0MmVmNDFhZmM1NDYzNWRhODgwMWI3MmE2YWU2ZTZiYzEwODhkOTYwNzZk
10
+ MGI3NzBkYzYwNTg1MjY5ZTNhZGFmZjZhZDg5MWE1ODRlYTRjMjAyYTA0YzYz
11
+ ZTdiZDY1NTk4ZWY2YTA3N2MxYTc5MWQwMjE5YjY0NmU5ZmZlZDg=
12
+ data.tar.gz: !binary |-
13
+ NDQ3ODgwZTM1ZmI0M2NlNGQ2NzI1ZTBmY2YxNjllYjFhZDQzMThjYTVkMDlh
14
+ ODQzOTdkYWNlNzJmMjM3NjZlNzQwYTM3NmNkNWIxYWFiZDk4ZjkwNjg4ZjFm
15
+ MzNmODBlYjg2MDhiMDc1ZWQwMmZkY2QzYzNmOTFhZjc2MWY5N2I=
data/CHANGELOG CHANGED
@@ -1,3 +1,65 @@
1
+ 1.4.13 (2013-10-02)
2
+ * Fixed: BUILDR-439 - Fix java command under windows when supplied
3
+ with extremely long classpath. Submitted By Tammo van Lessen.
4
+ * Fixed: BUILDR-394 - Fix release task with standalone distribution.
5
+ Submitted By Tammo van Lessen.
6
+ * Added: BUILDR-678 - Improve support for gpg signing artifacts
7
+ using a single method.
8
+ * Fixed: BUILDR-677 - GPG addon hangs when .asc files are still in
9
+ target. Submitted By Tammo van Lessen.
10
+ * Added: Initial support for data source creation in Intellij IDEA
11
+ project files.
12
+ * Fixed: BUILDR-676 - Rework Java::Command:java so that it does not
13
+ reject the :dir option. Reported by John Roth.
14
+ * Added: Auto-detect jpa provider in Intellij IDEA facet generation if
15
+ persistence.xml file is present and provider not specified.
16
+ * Added: Auto-detect jruby version in Intellij IDEA facet generation if
17
+ .ruby-version file is present.
18
+ * Added: Improve support for auto-detection of ejb and web descriptors
19
+ within Intellij IDEA project generation.
20
+ * Change: Default to setting the "User-Agent" header to "Buildr-VERSION"
21
+ when accessing http resources. Maven Central rejects requests
22
+ without a User-Agent string.
23
+ * Change: Change default scope of dependencies to 'compile'. Submitted
24
+ by Ingo Schmidt.
25
+ * Change: BUILDR-675 - Set Cache-Control to 'no-cache' when downloading
26
+ artifacts. Submitted by Félix Enrique Llorente Pastora.
27
+ * Added: Initial support for simple integration of an asset pipeline.
28
+ See "Compiling Assets" section in the manual.
29
+ * Fixed: BUILDR-673 - Fix the option handling of the MultiTest test
30
+ framework to behave as documented. Only the framework specific
31
+ options are passed to the test. Submitted by John Roth.
32
+ * Added: BUILDR-672 - Persist the properties field in the checkstyle
33
+ addon so that they can be modified by the user. Submitted
34
+ by Wim C.
35
+ * Fixed: Make the package_as_* methods public so that the methods are
36
+ detected in Ruby >= 2.0.0 via the respond_to? method.
37
+ * Change: Updated dependency versions;
38
+ - rspec-expectations (2.14.3)
39
+ - rspec-mocks (2.14.3)
40
+ - rspec-core (2.14.5)
41
+ - rspec (2.14.1)
42
+ - minitar (0.5.4)
43
+ - ci_reporter (1.8.4)
44
+ - xml-simple (1.1.2)
45
+ - rjb (1.4.8)
46
+ - diff-lcs (1.2.4)
47
+ - builder (3.2.2)
48
+ - net-ssh (2.7.0)
49
+ - net-sftp (2.1.2)
50
+ - hoe (3.7.1)
51
+ - json_pure (1.8.0)
52
+ - highline (1.6.19)
53
+ * Fixed: BUILDR-668 - Specify File::FNM_EXTGLOB for include globs
54
+ where needed in Ruby >= 2.0.0. Reported by Yavor Nikolov.
55
+ * Fixed: Ensure generation of buildfiles from eclipse projects will
56
+ finds .project files in Ruby >= 2.0.0.
57
+ * Fixed: Patch Rake::FileList in Ruby >= 2.0.0 to match dot files if
58
+ a .* pattern is supplied as in earlier versions of ruby.
59
+ * Fixed: Make Archive-related operations (e.g. zip.merge) deterministic using
60
+ OrderedHash.
61
+ * Change: Update to TestNG 6.8.5.
62
+
1
63
  1.4.12 (2013-05-04)
2
64
  * Added: BUILDR-648 Add new package(:test_jar) packaging type.
3
65
  Submitted by Mike Pettypiece.
@@ -130,10 +130,12 @@ module Buildr
130
130
  end
131
131
 
132
132
  def properties
133
- properties = {:basedir => self.project.base_dir}
134
- properties['checkstyle.suppressions.file'] = self.suppressions_file if File.exist?(self.suppressions_file)
135
- properties['checkstyle.import-control.file'] = self.import_control_file if File.exist?(self.import_control_file)
136
- properties
133
+ unless @properties
134
+ @properties = {:basedir => self.project.base_dir}
135
+ @properties['checkstyle.suppressions.file'] = self.suppressions_file if File.exist?(self.suppressions_file)
136
+ @properties['checkstyle.import-control.file'] = self.import_control_file if File.exist?(self.import_control_file)
137
+ end
138
+ @properties
137
139
  end
138
140
 
139
141
  def source_paths
@@ -29,6 +29,7 @@ module Buildr
29
29
  def sign_task(pkg)
30
30
  raise "ENV['GPG_USER'] not specified" unless ENV['GPG_USER']
31
31
  asc_filename = pkg.to_s + '.asc'
32
+ return if file(asc_filename).prerequisites.include?(pkg.to_s)
32
33
  file(asc_filename => [pkg.to_s]) do
33
34
  info "GPG signing #{pkg.to_spec}"
34
35
 
@@ -44,6 +45,8 @@ module Buildr
44
45
  cmd << ENV['GPG_PASS']
45
46
  end
46
47
  cmd << '--detach-sig'
48
+ cmd << '--batch'
49
+ cmd << '--yes'
47
50
  cmd << pkg
48
51
  trace(cmd.join(' '))
49
52
  `#{cmd.join(' ')}`
@@ -59,14 +62,18 @@ module Buildr
59
62
  artifact.upload
60
63
  end
61
64
  end
65
+
66
+ def sign_and_upload_all_packages(project)
67
+ project.packages.each { |pkg| Buildr::GPG.sign_and_upload(project, pkg) }
68
+ project.packages.map { |pkg| pkg.pom }.uniq.each { |pom| Buildr::GPG.sign_and_upload(project, pom) }
69
+ end
62
70
  end
63
71
 
64
72
  module ProjectExtension
65
73
  include Extension
66
74
 
67
75
  after_define do |project|
68
- project.packages.each { |pkg| Buildr::GPG.sign_and_upload(project, pkg) }
69
- project.packages.map { |pkg| pkg.pom }.uniq.each { |pom| Buildr::GPG.sign_and_upload(project, pom) }
76
+ Buildr::GPG.sign_and_upload_all_packages(project)
70
77
  end
71
78
  end
72
79
  end
@@ -105,6 +105,7 @@ module Buildr
105
105
  end
106
106
  task.enhance(dependencies)
107
107
  task.enhance([project.compile])
108
+ project.assets.paths << task
108
109
  task
109
110
  end
110
111
 
@@ -55,38 +55,36 @@ for those one-off tasks, with a language that's a joy to use.
55
55
 
56
56
  # Tested against these dependencies.
57
57
  spec.add_dependency 'rake', '0.9.2.2'
58
- spec.add_dependency 'builder', '3.1.3'
59
- spec.add_dependency 'net-ssh', '2.6.0'
60
- spec.add_dependency 'net-sftp', '2.0.5'
58
+ spec.add_dependency 'builder', '3.2.2'
59
+ spec.add_dependency 'net-ssh', '2.7.0'
60
+ spec.add_dependency 'net-sftp', '2.1.2'
61
61
  spec.add_dependency 'rubyzip', '0.9.9'
62
- # Highline 1.6.15 does not seem to work on windows. We should
63
- # investigate the root cause at a later stage before upgrading
64
- spec.add_dependency 'highline', '1.6.2'
65
- spec.add_dependency 'json_pure', '1.7.5'
62
+ spec.add_dependency 'highline', '1.6.19'
63
+ spec.add_dependency 'json_pure', '1.8.0'
66
64
  spec.add_dependency 'rubyforge', '2.0.4'
67
- spec.add_dependency 'hoe', '3.1.0'
68
- spec.add_dependency 'rjb', '1.4.2' if ($platform.to_s == 'x86-mswin32' || $platform.to_s == 'ruby')
65
+ spec.add_dependency 'hoe', '3.7.1'
66
+ spec.add_dependency 'rjb', '1.4.8' if ($platform.to_s == 'x86-mswin32' || $platform.to_s == 'ruby')
69
67
  spec.add_dependency 'atoulme-Antwrap', '~> 0.7.4'
70
- spec.add_dependency 'diff-lcs', '1.1.3'
71
- spec.add_dependency 'rspec-expectations', '2.11.3'
72
- spec.add_dependency 'rspec-mocks', '2.11.3'
73
- spec.add_dependency 'rspec-core', '2.11.1'
74
- spec.add_dependency 'rspec', '2.11.0'
75
- spec.add_dependency 'xml-simple', '1.1.1'
76
- spec.add_dependency 'minitar', '0.5.3'
68
+ spec.add_dependency 'diff-lcs', '1.2.4'
69
+ spec.add_dependency 'rspec-expectations', '2.14.3'
70
+ spec.add_dependency 'rspec-mocks', '2.14.3'
71
+ spec.add_dependency 'rspec-core', '2.14.5'
72
+ spec.add_dependency 'rspec', '2.14.1'
73
+ spec.add_dependency 'xml-simple', '1.1.2'
74
+ spec.add_dependency 'minitar', '0.5.4'
77
75
  spec.add_dependency 'jruby-openssl', '~> 0.8.2' if $platform.to_s == 'java'
78
76
  spec.add_dependency 'bundler'
77
+ spec.add_dependency 'orderedhash'
79
78
 
80
79
  # Unable to get this consistently working under jruby on windows
81
80
  unless $platform.to_s == 'java'
82
- spec.add_development_dependency 'jekyll', '0.11.2'
81
+ spec.add_development_dependency 'jekyll', '1.2.1'
83
82
  spec.add_development_dependency 'RedCloth', '4.2.9'
84
83
  spec.add_development_dependency 'jekylltask', '1.1.0'
85
- spec.add_development_dependency 'rdoc', '3.12'
86
- spec.add_development_dependency 'rcov', '0.9.9'
84
+ spec.add_development_dependency 'rdoc', '4.0.1'
87
85
  end
88
86
 
89
- spec.add_development_dependency 'ci_reporter', '1.7.2'
87
+ spec.add_development_dependency 'ci_reporter', '1.9.0'
90
88
 
91
89
  # NOTE: Must update all-in-one.rake if this is updated
92
90
  # ffi-ncurses Fails on several varieties of Ubuntu due to being unable to locate ncursesw library
@@ -20,16 +20,40 @@ The source code is included in both source and binary distribution, the Gem dist
20
20
 
21
21
  h2(#dist). Binaries and Source Code
22
22
 
23
+ h3. buildr 1.4.13 (2013-10-02)
24
+
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 |
31
+
32
+ p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.4.13/KEYS)
33
+
34
+
35
+ h3. buildr 1.4.12 (2013-05-04)
36
+
37
+ |_. Package |_. MD5 Checksum |_. PGP |
38
+ | "buildr-1.4.12-java.gem":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12-java.gem | "c4e4587a6c908dd3036ef8df785a3428":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12-java.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12-java.gem.asc |
39
+ | "buildr-1.4.12-x86-mswin32.gem":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12-x86-mswin32.gem | "afba0a6b9a41db270540eea611863a57":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12-x86-mswin32.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12-x86-mswin32.gem.asc |
40
+ | "buildr-1.4.12.gem":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12.gem | "6c2fe37ef05705d4419e0ba1922df658":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12.gem.asc |
41
+ | "buildr-1.4.12.tgz":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12.tgz | "eda08e0ec89713d67a065a3c22110065":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12.tgz.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12.tgz.asc |
42
+ | "buildr-1.4.12.zip":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12.zip | "b23f65c57f0aa148044e7ce1b1718bca":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12.zip.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.12/buildr-1.4.12.zip.asc |
43
+
44
+ p>. ("Release signing keys":http://archive.apache.org/dist/buildr/1.4.12/KEYS)
45
+
46
+
23
47
  h3. buildr 1.4.11 (2013-03-14)
24
48
 
25
49
  |_. Package |_. MD5 Checksum |_. PGP |
26
- | "buildr-1.4.11-java.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.11/buildr-1.4.11-java.gem | "2ad2134527b9fc7f4726a7b2350318c0":http://www.apache.org/dist/buildr/1.4.11/buildr-1.4.11-java.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.11/buildr-1.4.11-java.gem.asc |
27
- | "buildr-1.4.11-x86-mswin32.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.11/buildr-1.4.11-x86-mswin32.gem | "ada93b14069c418d727c7f225e02b082":http://www.apache.org/dist/buildr/1.4.11/buildr-1.4.11-x86-mswin32.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.11/buildr-1.4.11-x86-mswin32.gem.asc |
28
- | "buildr-1.4.11.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.4.11/buildr-1.4.11.gem | "89c09e4bfdbbd571d76e4b6f41c30ece":http://www.apache.org/dist/buildr/1.4.11/buildr-1.4.11.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.11/buildr-1.4.11.gem.asc |
29
- | "buildr-1.4.11.tgz":http://www.apache.org/dyn/closer.cgi/buildr/1.4.11/buildr-1.4.11.tgz | "ca7b4812001388883923b86caedbf16c":http://www.apache.org/dist/buildr/1.4.11/buildr-1.4.11.tgz.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.11/buildr-1.4.11.tgz.asc |
30
- | "buildr-1.4.11.zip":http://www.apache.org/dyn/closer.cgi/buildr/1.4.11/buildr-1.4.11.zip | "d8e2cb88e0c365fb226404d2d9de3dfc":http://www.apache.org/dist/buildr/1.4.11/buildr-1.4.11.zip.md5 | "Sig":http://www.apache.org/dist/buildr/1.4.11/buildr-1.4.11.zip.asc |
50
+ | "buildr-1.4.11-java.gem":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11-java.gem | "2ad2134527b9fc7f4726a7b2350318c0":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11-java.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11-java.gem.asc |
51
+ | "buildr-1.4.11-x86-mswin32.gem":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11-x86-mswin32.gem | "ada93b14069c418d727c7f225e02b082":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11-x86-mswin32.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11-x86-mswin32.gem.asc |
52
+ | "buildr-1.4.11.gem":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11.gem | "89c09e4bfdbbd571d76e4b6f41c30ece":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11.gem.asc |
53
+ | "buildr-1.4.11.tgz":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11.tgz | "ca7b4812001388883923b86caedbf16c":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11.tgz.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11.tgz.asc |
54
+ | "buildr-1.4.11.zip":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11.zip | "d8e2cb88e0c365fb226404d2d9de3dfc":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11.zip.md5 | "Sig":http://archive.apache.org/dist/buildr/1.4.11/buildr-1.4.11.zip.asc |
31
55
 
32
- p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.4.11/KEYS)
56
+ p>. ("Release signing keys":http://archive.apache.org/dist/buildr/1.4.11/KEYS)
33
57
 
34
58
 
35
59
  h3. buildr 1.4.10 (2013-02-17)
@@ -46,15 +46,27 @@ 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.12 (2013-05-04)
50
-
51
- * Added: BUILDR-648 Add new package(:test_jar) packaging type. Submitted by Mike Pettypiece.
52
- * Fixed: BUILDR-666 ZipFile.open modifies file regardless of usage. Reported by Pepijn Van Eeckhoudt, fix by Alex Boisvert.
53
- * Change: Moved to using TravisCI to test the Linux variants.
54
- * Added: Make the location of the wsdl in generated source configurable in the wsgen addon.
55
- * Added: Added support for SuperDevMode in gwt addon and upgraded to GWT 2.5.1 by default.
56
- * Change: BUILDR-664 Update Checkstyle addon so that extra_dependencies is empty by default. Submitted by Dieter Vrancken.
57
- * Fixed: BUILDR-663 require 'buildr' fails for Ruby 2.0.0.
49
+ Highlights from Buildr 1.4.13 (2013-10-02)
50
+
51
+ * Fixed: Upgrade rjb dependency so that you can change JVMs by
52
+ modifying JAVA_HOME rather than recompiling rjb.
53
+ * Change: Update to TestNG 6.8.5.
54
+ * Fixed: Several Ruby 2.0.0 failures have been addressed.
55
+ * Fixed: Make archive-related operations use a deterministic ordering.
56
+ * Added: Initial support for simple integration of an asset pipeline.
57
+ See "Compiling Assets" section in the manual.
58
+ * Change: Improve the Intellij IDEA plugin substantially.
59
+ * Change: Improve the gpg addon.
60
+ * Fixed: BUILDR-676 - Support the :dir option in Java::Command:java.
61
+ Reported by John Roth.
62
+ * Fixed: Improve downloading from Maven Central to avoid caching and
63
+ set the "User-Agent" http header.
64
+ * Change: Change default scope of dependencies to 'compile'. Submitted
65
+ by Ingo Schmidt.
66
+ * Fixed: BUILDR-673 - Fix the option handling of the MultiTest test
67
+ framework to behave as documented. Submitted by John Roth.
68
+ * Added: BUILDR-672 - Allow the user to modify the properties field in
69
+ the checkstyle addon. Submitted by Wim C.
58
70
 
59
71
  This is a partial list -- see the "CHANGELOG":CHANGELOG for full details.
60
72
 
@@ -235,6 +235,35 @@ puts 'Artifacts included in WAR package:'
235
235
  puts package(:war).libs.map(&:to_spec)
236
236
  {% endhighlight %}
237
237
 
238
+ h3(#war_extra_assets). Compiling Assets
239
+
240
+ In modern web applications, it is common to use tools that compile and compress assets. i.e. "Coffeescript":http://coffeescript.org/ is compiled into javascript and "Sass":http://sass-lang.com/ compiles into CSS. Buildr provides support using a simple @assets@ abstraction. Directory or file tasks can be added to the @assets.paths@ configuration variable for a project and the contents will be included in the package.
241
+
242
+ h4(#coffeescript). Integrating CoffeeScript
243
+
244
+ {% highlight ruby %}
245
+ target_dir = _(:target, :generated, "coffee/main/webapp")
246
+ source_dir = _(:source, :main, :coffee)
247
+
248
+ assets.paths << file(target_dir => [FileList["#{source_dir}/**/*.coffee"]]) do
249
+ puts "Compiling coffeescript"
250
+ sh "coffee --bare --compile --output #{target_dir} #{source_dir}"
251
+ touch target_dir
252
+ end
253
+ {% endhighlight %}
254
+
255
+ h4(#sass). Integrating Sass
256
+
257
+ {% highlight ruby %}
258
+ target_dir = _(:target, :generated, "sass/main/webapp")
259
+ source_dir = _(:source, :main, :sass)
260
+
261
+ assets.paths << file(target_dir => [FileList["#{source_dir}/**/*.scss"]]) do
262
+ puts "Compiling scss"
263
+ sh "scss -q --update #{source_dir}:#{target_dir}"
264
+ touch target_dir
265
+ end
266
+ {% endhighlight %}
238
267
 
239
268
  h2(#aar). Packaging AARs
240
269
 
@@ -35,12 +35,15 @@ require 'find'
35
35
  require 'uri'
36
36
  require 'stringio'
37
37
  require 'fileutils'
38
+ require 'orderedhash'
39
+ require 'securerandom'
38
40
 
39
41
  require 'buildr/core/util'
40
42
  require 'buildr/core/common'
41
43
  require 'buildr/core/application'
42
44
  require 'buildr/core/jrebel'
43
45
  require 'buildr/core/project'
46
+ require 'buildr/core/assets'
44
47
  require 'buildr/core/environment'
45
48
  require 'buildr/core/help'
46
49
  require 'buildr/core/checks'
@@ -693,3 +693,27 @@ module FileUtils
693
693
  module_function :fu_output_message
694
694
  private_class_method :fu_output_message
695
695
  end
696
+
697
+ module ::Rake
698
+ class FileList
699
+ # Add matching glob patterns.
700
+ def add_matching(pattern)
701
+ # Patch to use File::FNM_DOTMATCH where appropriate
702
+ flags = 0
703
+ args = [pattern]
704
+ flags |= File::FNM_DOTMATCH if pattern =~ /\.\*/
705
+ flags |= File::FNM_EXTGLOB if pattern =~ /[^\\]\{.*\}/
706
+ args << flags unless 0 == flags
707
+ FileList.glob(*args).each do |fn|
708
+ self << fn unless exclude?(fn)
709
+ end
710
+ end
711
+ private :add_matching
712
+
713
+ class << self
714
+ def glob(pattern, *args)
715
+ Dir.glob(pattern, *args).sort
716
+ end
717
+ end
718
+ end
719
+ end if RUBY_VERSION >= "2.0.0"
@@ -0,0 +1,93 @@
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
+ module Assets #:nodoc:
19
+
20
+ # The base assets task that is responsible for
21
+ # collecting all of the assets into a single output
22
+ # directory
23
+ class AssetsTask < Rake::FileTask
24
+ attr_reader :project
25
+
26
+ def project=(project)
27
+ @project = project
28
+ end
29
+
30
+ # The list of input paths to add to output directory
31
+ def paths
32
+ unless @paths
33
+ @paths = []
34
+ @paths << project._(:source, :main, :webapp) if File.exist?(project._(:source, :main, :webapp))
35
+ end
36
+ @paths
37
+ end
38
+
39
+ protected
40
+
41
+ def initialize(*args) #:nodoc:
42
+ super
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}/"
51
+ end
52
+ end
53
+ end
54
+
55
+ private
56
+
57
+ def out_of_date?(stamp)
58
+ super ||
59
+ self.paths.any? { |n| n.respond_to?(:needed?) && n.needed? }
60
+ end
61
+
62
+ end
63
+
64
+ module ProjectExtension
65
+ include Extension
66
+
67
+ first_time do
68
+ desc "Prepare the assets"
69
+ Project.local_task("assets")
70
+ end
71
+
72
+ # Access the asset task
73
+ def assets
74
+ if @assets.nil?
75
+ @assets = AssetsTask.define_task(project._(:target, :main, :webapp) => [])
76
+ @assets.project = self
77
+ project.task('assets').enhance([@assets])
78
+ project.build.enhance([@assets])
79
+ end
80
+ @assets
81
+ end
82
+
83
+ after_define do |project|
84
+ # Force construction
85
+ project.assets
86
+ end
87
+ end
88
+ end
89
+ end
90
+
91
+ class Buildr::Project #:nodoc:
92
+ include ::Buildr::Assets::ProjectExtension
93
+ end