buildr 1.5.5 → 1.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b7fe7866eae3c276dfde297a3183dd542e813f8
4
- data.tar.gz: 5e5537588c34603d72407fb0d18da6da29c083de
3
+ metadata.gz: 5793f6715926b79b32bc1180ee678793f5c74381
4
+ data.tar.gz: 8b9eeca272be9fbae824af95f337351fff00e918
5
5
  SHA512:
6
- metadata.gz: 57e9c4e7f777a8061f6448a230620190e419aa0cd419d49b673a5d04e5e8851e8b0ac4ac187f978cbcd47f079cf59a438889aa85778fb60aa7e6797c63081c05
7
- data.tar.gz: 1dca7a5b35e702635a9aaf66d40823c09dde7cf4b6c0653fb38e8d034f7741d05175ecf183563b25a2c12c3fc311870111cd68e3f7374820852c9211cc2c856d
6
+ metadata.gz: 920e4c8172dba2e8ffaf171ca9f0796f2f69922ebc8604537df9d608d8369f78df06fdf6354ede65c13dab29a8fa09360874e66b5f09da8e0d5da52dfc00d007
7
+ data.tar.gz: 84bab48c5276a0f9203b3748dab5ff3b144dc25deb33b2436fd99103767c7e5f5b77101c37305512c91bd838516487a6525799cad020343dc561307e7a2e4809
data/CHANGELOG CHANGED
@@ -1,3 +1,41 @@
1
+ 1.5.6 (2018-05-10)
2
+ * Fixed: Ensure that the username and passwords declared for repositories are correctly url encoded for
3
+ the upload repositories when converted to a URL. (i.e. Ensure `Buildr.repositories.release_to`
4
+ and `Buildr.repositories.snapshot_to` settings can have usernames and passwords with special
5
+ characters).
6
+ * Added: Add support for allowing some dependencies to include transitive dependencies via the
7
+ `pom.include_transitive_dependencies` configuration setting.
8
+ * Added: Add support for adding dependencies to the pom via the `pom.additional_dependencies` configuration
9
+ setting. These dependencies are `compile` scope and are in addition to any derived from the normal
10
+ compile dependencies.
11
+ * Fixed: GWT Addon: Use version `1.0.2` of the `com.google.jsinterop:jsinterop-annotations:jar` artifact
12
+ when using GWT 2.8.2 to align with version shipped with GWT.
13
+ * Fixed: Dependencies added as `pom.provided_dependencies` or `pom.runtime_dependencies` and not included
14
+ as compile dependencies were incorrectly omitted from pom.
15
+ * Fixed: Dependencies added as `pom.provided_dependencies` and `pom.runtime_dependencies` were being
16
+ incorrectly duplicated within the pom dependencies section. Now provided dependency scope takes
17
+ precedence over runtime scoped dependency.
18
+ * Fixed: Dependencies added to POMs will specify the classifier unless it is the default value.
19
+ * Added: Add the `project.pom.dependency_filter` configuration property that can be set to a proc. The proc
20
+ accepts a dependency and returns a boolean that determines whether the dependency is included in
21
+ the generated pom or not.
22
+ * Fixed: POMs generated by Buildr use the parent pom `org.sonatype.oss:oss-parent:pom:7` but this
23
+ generates a warning in the latest version of Maven. Modern versions of Maven would thus
24
+ ignore transitive dependencies declared in the pom. The parent pom has now been upgraded
25
+ to `org.sonatype.oss:oss-parent:pom:8` which will result in modern Maven correctly picking
26
+ up transitive dependencies.
27
+ * Change: JaCoCo Addon: Update JaCoCo version to 0.8.0 which in turns supports Java9.
28
+ * Added: GWT Addon: Added support for `:gwtc_args` parameter to supply arbitrary parameters to
29
+ the GWT compiler.
30
+ * Added: Add support for sha512 digests to be generated for files during the upload. This is typically
31
+ configured by adding `sha512` to the list of digests via a line such as:
32
+ `repositories.release_to[:options] = {:digests => [:md5, :sha1, :sha512]}`
33
+ * Fixed: The default upload tasks would often get a ReadTimeout when uploading using http to a remote
34
+ server that did not have `KeepAlive` socket option enabled and the upload took more than 60
35
+ seconds (the default socket read timeout). Some commercial maven repositories could trigger
36
+ this scenario during upload of even modest size artifacts. Default the read_timeout to 10 minutes
37
+ when during upload to work address this issue.
38
+
1
39
  1.5.5 (2017-12-06)
2
40
  * Fixed: The concatenation extension released as part of 1.5.4 changed the way zip archives were
3
41
  constructed so that entries for some intermediate directories were elided. For most consumers
@@ -66,10 +66,7 @@ When prompted for a platform, select mswin32.
66
66
 
67
67
  On Linux/BSD/Cygwin, use your default package manager, for example, for Ubuntu:
68
68
 
69
- $ sudo apt-get install ruby
70
- $ sudo apt-get install ruby1.8-dev
71
- $ sudo apt-get install build-essential
72
- $ sudo apt-get install libopenssl-ruby
69
+ $ sudo apt-get install ruby ruby1.8-dev build-essential libopenssl-ruby
73
70
 
74
71
  Before installing Buildr, please set the JAVA_HOME environment variable to
75
72
  point to your JDK distribution. Next, use Ruby Gem to install Buildr:
@@ -112,8 +112,8 @@ module Buildr
112
112
  ) + validation_deps
113
113
  elsif v == '2.8.2'
114
114
  %w(
115
- com.google.jsinterop:jsinterop-annotations:jar:1.0.1
116
- com.google.jsinterop:jsinterop-annotations:jar:sources:1.0.1
115
+ com.google.jsinterop:jsinterop-annotations:jar:1.0.2
116
+ com.google.jsinterop:jsinterop-annotations:jar:sources:1.0.2
117
117
  org.w3c.css:sac:jar:1.3
118
118
  com.google.gwt:gwt-dev:jar:2.8.2
119
119
  com.google.gwt:gwt-user:jar:2.8.2
@@ -181,6 +181,9 @@ module Buildr
181
181
  if options[:draft_compile]
182
182
  args << '-draftCompile'
183
183
  end
184
+ if options[:gwtc_args]
185
+ args += options[:gwtc_args]
186
+ end
184
187
 
185
188
  if options[:enable_closure_compiler] && options[:version] == '2.7.0'
186
189
  args << '-XenableClosureCompiler'
@@ -18,7 +18,7 @@ module Buildr
18
18
  # WARNING: Experimental and may change radically.
19
19
  module JaCoCo
20
20
  class << self
21
- VERSION = '0.7.9'
21
+ VERSION = '0.8.0'
22
22
 
23
23
  def version
24
24
  @version || Buildr.settings.build['jacoco'] || VERSION
@@ -37,7 +37,11 @@ module Buildr
37
37
  "org.jacoco:org.jacoco.report:jar:#{version}",
38
38
  "org.jacoco:org.jacoco.core:jar:#{version}",
39
39
  "org.jacoco:org.jacoco.ant:jar:#{version}",
40
- 'org.ow2.asm:asm-debug-all:jar:5.2'
40
+ 'org.ow2.asm:asm:jar:6.0',
41
+ 'org.ow2.asm:asm-commons:jar:6.0',
42
+ 'org.ow2.asm:asm-tree:jar:6.0',
43
+ 'org.ow2.asm:asm-analysis:jar:6.0',
44
+ 'org.ow2.asm:asm-util:jar:6.0',
41
45
  ]
42
46
  end
43
47
  end
@@ -18,16 +18,28 @@ The source code is included in both source and binary distribution, the Gem dist
18
18
 
19
19
  h2(#dist). Binaries and Source Code
20
20
 
21
+ h3. buildr 1.5.5 (2017-12-06)
22
+
23
+ |_. Package |_. MD5 Checksum |_. PGP |
24
+ | "buildr-1.5.5.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.5.5/buildr-1.5.5.gem | "8bd720d1c4c96f5904c09b70c95aede3":http://www.apache.org/dist/buildr/1.5.5/buildr-1.5.5.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.5/buildr-1.5.5.gem.asc |
25
+ | "buildr-1.5.5-java.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.5.5/buildr-1.5.5-java.gem | "8c009622ed7c9b1bbc576c5df298d9df":http://www.apache.org/dist/buildr/1.5.5/buildr-1.5.5-java.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.5/buildr-1.5.5-java.gem.asc |
26
+ | "buildr-1.5.5-x86-mswin32.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.5.5/buildr-1.5.5-x86-mswin32.gem | "04f7af088b3ec99cdf72c58ea7c3ee67":http://www.apache.org/dist/buildr/1.5.5/buildr-1.5.5-x86-mswin32.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.5/buildr-1.5.5-x86-mswin32.gem.asc |
27
+ | "buildr-1.5.5.tgz":http://www.apache.org/dyn/closer.cgi/buildr/1.5.5/buildr-1.5.5.tgz | "1aab23f1cd19bcbd3c8f48afb488e8ff":http://www.apache.org/dist/buildr/1.5.5/buildr-1.5.5.tgz.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.5/buildr-1.5.5.tgz.asc |
28
+ | "buildr-1.5.5.zip":http://www.apache.org/dyn/closer.cgi/buildr/1.5.5/buildr-1.5.5.zip | "9d1f076927cc2f565875c7f38e5afe69":http://www.apache.org/dist/buildr/1.5.5/buildr-1.5.5.zip.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.5/buildr-1.5.5.zip.asc |
29
+
30
+ p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.5.5/KEYS)
31
+
32
+
21
33
  h3. buildr 1.5.4 (2017-11-29)
22
34
 
23
35
  |_. Package |_. MD5 Checksum |_. PGP |
24
- | "buildr-1.5.4-x86-mswin32.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.5.4/buildr-1.5.4-x86-mswin32.gem | "2604f5fcdef0dce9beee9ffe7fb93e2f":http://www.apache.org/dist/buildr/1.5.4/buildr-1.5.4-x86-mswin32.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.4/buildr-1.5.4-x86-mswin32.gem.asc |
25
- | "buildr-1.5.4.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.5.4/buildr-1.5.4.gem | "8a165524185960a5b9c92d90547631fe":http://www.apache.org/dist/buildr/1.5.4/buildr-1.5.4.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.4/buildr-1.5.4.gem.asc |
26
- | "buildr-1.5.4-java.gem":http://www.apache.org/dyn/closer.cgi/buildr/1.5.4/buildr-1.5.4-java.gem | "ce7785a761890d63a214100e11eef946":http://www.apache.org/dist/buildr/1.5.4/buildr-1.5.4-java.gem.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.4/buildr-1.5.4-java.gem.asc |
27
- | "buildr-1.5.4.tgz":http://www.apache.org/dyn/closer.cgi/buildr/1.5.4/buildr-1.5.4.tgz | "e44f8bfcee900f324af5bed40291dcd5":http://www.apache.org/dist/buildr/1.5.4/buildr-1.5.4.tgz.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.4/buildr-1.5.4.tgz.asc |
28
- | "buildr-1.5.4.zip":http://www.apache.org/dyn/closer.cgi/buildr/1.5.4/buildr-1.5.4.zip | "82aeda8f6951dbe41949afb1d83825ac":http://www.apache.org/dist/buildr/1.5.4/buildr-1.5.4.zip.md5 | "Sig":http://www.apache.org/dist/buildr/1.5.4/buildr-1.5.4.zip.asc |
36
+ | "buildr-1.5.4-x86-mswin32.gem":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4-x86-mswin32.gem | "2604f5fcdef0dce9beee9ffe7fb93e2f":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4-x86-mswin32.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4-x86-mswin32.gem.asc |
37
+ | "buildr-1.5.4.gem":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4.gem | "8a165524185960a5b9c92d90547631fe":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4.gem.asc |
38
+ | "buildr-1.5.4-java.gem":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4-java.gem | "ce7785a761890d63a214100e11eef946":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4-java.gem.md5 | "Sig":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4-java.gem.asc |
39
+ | "buildr-1.5.4.tgz":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4.tgz | "e44f8bfcee900f324af5bed40291dcd5":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4.tgz.md5 | "Sig":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4.tgz.asc |
40
+ | "buildr-1.5.4.zip":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4.zip | "82aeda8f6951dbe41949afb1d83825ac":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4.zip.md5 | "Sig":http://archive.apache.org/dist/buildr/1.5.4/buildr-1.5.4.zip.asc |
29
41
 
30
- p>. ("Release signing keys":http://www.apache.org/dist/buildr/1.5.4/KEYS)
42
+ p>. ("Release signing keys":http://archive.apache.org/dist/buildr/1.5.4/KEYS)
31
43
 
32
44
 
33
45
  h3. buildr 1.5.3 (2017-05-17)
@@ -46,36 +46,43 @@ 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.5.5 (2017-12-06)
50
- * Fixed: The concatenation extension released as part of 1.5.4 changed the way zip archives were
51
- constructed so that entries for some intermediate directories were elided. For most consumers
52
- of zip files this had no impact but some tools require the entries during scanning. (i.e. Older
53
- versions of Jruby that loaded ruby scripts from within a jar).
54
-
55
- Highlights from Buildr 1.5.4 (2017-11-29)
56
- * Added: Findbugs Addon: Upgrade to version 3.0.1 of findbugs.
57
- * Added: GPG Addon: Add boolean configuration setting `project.gpg` that can be set to false via
58
- `project.gpg = false` to avoid signing and uploading packages. This is useful when some
59
- projects are not intended for publishing.
60
- * Fixed: JaCoCo Addon: Projects that have jacoco disabled will no longer appear in the JaCoCo reports.
61
- * Change: JaCoCo Addon: Update JaCoCo version to 0.7.9.
62
- * Fixed: BUILDR-733 - Escape classpath entries in the pathing jar manifest. Submitted by Glenn Croes.
63
- * Fixed: Ensure that the pom is attached to the jar artifact with empty classifier rather than the last
64
- artifact of a type defined. Otherwise a project that defines multiple artifacts of the same type
65
- (i.e. `package(:jar)` and `package(:jar, :classifier => :gwt)`) could have the pom named after
66
- the package with the classifier rather than the package without a classifer. (i.e. the pom could
67
- be incorrectly defined as `mypackage-1.0.0-gwt.pom` rather than `mypackage-1.0.0.pom`).
68
- * Added: GWT Addon: Add support for GWT 2.8.2 release and make it the default version unless otherwise specified.
69
- * Added: BUILDR-732 - Support bnd version 2.1.0 or more. Submitted By Eric Bruneton.
70
- * Added: Support to compiling Kotlin
71
- * Added: New way to concatenate file contents when merging several archives together.
72
- * Added: New way to transform file contents when merging several archives together.
73
- * Added: Support both Jetty 6 and Jetty 9 as addons. Added integration tests to cover their use.
74
-
75
- Highlights from Buildr 1.5.3 (2017-05-17)
76
- * Change: Add support for gwt 2.8.1 to gwt addon.
77
- * Fixed: Avoid error "undefined local variable or method `pom'" when invoking the `JarTask` without it being
78
- registered through the `package` helper`. Reported by Dieter Vrancken.
49
+ Highlights from Buildr 1.5.6 (2018-05-10)
50
+ * Fixed: Ensure that the username and passwords declared for repositories are correctly url encoded for
51
+ the upload repositories when converted to a URL. (i.e. Ensure `Buildr.repositories.release_to`
52
+ and `Buildr.repositories.snapshot_to` settings can have usernames and passwords with special
53
+ characters).
54
+ * Added: Add support for allowing some dependencies to include transitive dependencies via the
55
+ `pom.include_transitive_dependencies` configuration setting.
56
+ * Added: Add support for adding dependencies to the pom via the `pom.additional_dependencies` configuration
57
+ setting. These dependencies are `compile` scope and are in addition to any derived from the normal
58
+ compile dependencies.
59
+ * Fixed: GWT Addon: Use version `1.0.2` of the `com.google.jsinterop:jsinterop-annotations:jar` artifact
60
+ when using GWT 2.8.2 to align with version shipped with GWT.
61
+ * Fixed: Dependencies added as `pom.provided_dependencies` or `pom.runtime_dependencies` and not included
62
+ as compile dependencies were incorrectly omitted from pom.
63
+ * Fixed: Dependencies added as `pom.provided_dependencies` and `pom.runtime_dependencies` were being
64
+ incorrectly duplicated within the pom dependencies section. Now provided dependency scope takes
65
+ precedence over runtime scoped dependency.
66
+ * Fixed: Dependencies added to POMs will specify the classifier unless it is the default value.
67
+ * Added: Add the `project.pom.dependency_filter` configuration property that can be set to a proc. The proc
68
+ accepts a dependency and returns a boolean that determines whether the dependency is included in
69
+ the generated pom or not.
70
+ * Fixed: POMs generated by Buildr use the parent pom `org.sonatype.oss:oss-parent:pom:7` but this
71
+ generates a warning in the latest version of Maven. Modern versions of Maven would thus
72
+ ignore transitive dependencies declared in the pom. The parent pom has now been upgraded
73
+ to `org.sonatype.oss:oss-parent:pom:8` which will result in modern Maven correctly picking
74
+ up transitive dependencies.
75
+ * Change: JaCoCo Addon: Update JaCoCo version to 0.8.0 which in turns supports Java9.
76
+ * Added: GWT Addon: Added support for `:gwtc_args` parameter to supply arbitrary parameters to
77
+ the GWT compiler.
78
+ * Added: Add support for sha512 digests to be generated for files during the upload. This is typically
79
+ configured by adding `sha512` to the list of digests via a line such as:
80
+ `repositories.release_to[:options] = {:digests => [:md5, :sha1, :sha512]}`
81
+ * Fixed: The default upload tasks would often get a ReadTimeout when uploading using http to a remote
82
+ server that did not have `KeepAlive` socket option enabled and the upload took more than 60
83
+ seconds (the default socket read timeout). Some commercial maven repositories could trigger
84
+ this scenario during upload of even modest size artifacts. Default the read_timeout to 10 minutes
85
+ when during upload to work address this issue.
79
86
 
80
87
  This is a partial list -- see the "CHANGELOG":CHANGELOG for full details.
81
88
 
@@ -185,7 +185,7 @@ module Buildr #:nodoc:
185
185
  each { |file| map[file] = File.join(target, Util.relative_path(file, source).ext(target_ext)) }
186
186
  else
187
187
  # try to extract package name from .java or .scala files
188
- if ['.java', '.scala', '.groovy'].include? File.extname(source)
188
+ if %w(.java .scala .groovy).include? File.extname(source)
189
189
  package = findFirst(source, /^\s*package\s+([^\s;]+)\s*;?\s*/)
190
190
  map[source] = package ? File.join(target, package[1].gsub('.', '/'), File.basename(source).ext(target_ext)) : target
191
191
  elsif
@@ -211,7 +211,7 @@ module URI
211
211
  end
212
212
  elsif source.respond_to?(:read)
213
213
  digests = (options[:digests] || [:md5, :sha1]).
214
- inject({}) { |hash, name| hash[name] = Digest.const_get(name.to_s.upcase).new ; hash }
214
+ inject({}) { |hash, name| hash[name] = name.to_s == 'sha512' ? Digest::SHA2.new(512) : Digest.const_get(name.to_s.upcase).new ; hash}
215
215
  size = source.stat.size rescue nil
216
216
  write (options).merge(:progress=>verbose && size, :size=>size) do |bytes|
217
217
  source.read(bytes).tap do |chunk|
@@ -278,7 +278,7 @@ module URI
278
278
  headers['Cache-Control'] = 'no-cache'
279
279
  headers['User-Agent'] = "Buildr-#{Buildr::VERSION}"
280
280
  request = Net::HTTP::Get.new(request_uri.empty? ? '/' : request_uri, headers)
281
- request.basic_auth self.user, self.password if self.user
281
+ request.basic_auth URI.decode(self.user), URI.decode(self.password) if self.user
282
282
  http.verify_mode = ::OpenSSL::SSL.const_get(ENV['SSL_VERIFY_MODE']) if ENV['SSL_VERIFY_MODE']
283
283
  http.ca_path = ENV['SSL_CA_CERTS'] if ENV['SSL_CA_CERTS']
284
284
  http.request request do |response|
@@ -327,6 +327,7 @@ module URI
327
327
  def write_internal(options, &block) #:nodoc:
328
328
  options ||= {}
329
329
  connect do |http|
330
+ http.read_timeout = 500
330
331
  trace "Uploading to #{path}"
331
332
  content = StringIO.new
332
333
  while chunk = yield(RW_CHUNK_SIZE)
@@ -128,6 +128,22 @@ module Buildr
128
128
  @runtime_dependencies = runtime_dependencies
129
129
  end
130
130
 
131
+ def additional_dependencies
132
+ @additional_dependencies ||= []
133
+ end
134
+
135
+ def additional_dependencies=(additional_dependencies)
136
+ @additional_dependencies = additional_dependencies
137
+ end
138
+
139
+ def include_transitive_dependencies
140
+ @include_transitive_dependencies ||= []
141
+ end
142
+
143
+ def include_transitive_dependencies=(include_transitive_dependencies)
144
+ @include_transitive_dependencies = include_transitive_dependencies
145
+ end
146
+
131
147
  def optional_dependencies
132
148
  @optional_dependencies ||= []
133
149
  end
@@ -136,6 +152,10 @@ module Buildr
136
152
  @optional_dependencies = optional_dependencies
137
153
  end
138
154
 
155
+ # Property that accepts a proc that accepts a dependency and returns a boolean to
156
+ # determine whether dependency is included in pom or not.
157
+ attr_accessor :dependency_filter
158
+
139
159
  protected
140
160
 
141
161
  def associate_project(buildr_project)
@@ -153,7 +173,7 @@ module Buildr
153
173
  xml.parent do
154
174
  xml.groupId 'org.sonatype.oss'
155
175
  xml.artifactId 'oss-parent'
156
- xml.version '7'
176
+ xml.version '8'
157
177
  end
158
178
  xml.groupId project.group
159
179
  xml.artifactId project.id
@@ -208,33 +228,54 @@ module Buildr
208
228
  end
209
229
  end unless project.pom.developers.empty?
210
230
 
211
- provided_deps = Buildr.artifacts(project.pom.provided_dependencies).collect { |d| d.to_s }
212
- runtime_deps = Buildr.artifacts(project.pom.runtime_dependencies).collect { |d| d.to_s }
213
- optional_deps = Buildr.artifacts(project.pom.optional_dependencies).collect { |d| d.to_s }
214
- deps =
231
+ provided_deps = Buildr.artifacts(project.pom.provided_dependencies)
232
+ runtime_deps = Buildr.artifacts(project.pom.runtime_dependencies)
233
+ additional_deps = Buildr.artifacts(project.pom.additional_dependencies)
234
+ include_transitive_deps = Buildr.artifacts(project.pom.include_transitive_dependencies).collect {|dep| dep.to_s}
235
+ optional_deps = Buildr.artifacts(project.pom.optional_dependencies).collect {|dep| dep.to_s}
236
+
237
+ done = []
238
+
239
+ deps = []
240
+ deps += provided_deps.
241
+ select {|d| d.is_a?(ActsAsArtifact)}.
242
+ select {|d| !done.include?(d.to_s)}.
243
+ collect {|dep| done << dep.to_s; dep.to_hash.merge(:scope => 'provided', :optional => optional_deps.include?(dep.to_s), :include_transitive => include_transitive_deps.include?(dep.to_s), :artifact => dep)}
244
+ deps += runtime_deps.
245
+ select {|d| d.is_a?(ActsAsArtifact)}.
246
+ select {|d| !done.include?(d.to_s)}.
247
+ collect {|dep| done << dep.to_s; dep.to_hash.merge(:scope => 'runtime', :optional => optional_deps.include?(dep.to_s), :include_transitive => include_transitive_deps.include?(dep.to_s), :artifact => dep)}
248
+ deps += additional_deps.
249
+ select {|d| d.is_a?(ActsAsArtifact)}.
250
+ select {|d| !done.include?(d.to_s)}.
251
+ collect {|dep| done << dep.to_s; dep.to_hash.merge(:scope => 'compile', :optional => optional_deps.include?(dep.to_s), :include_transitive => include_transitive_deps.include?(dep.to_s), :artifact => dep)}
252
+
253
+ deps +=
215
254
  Buildr.artifacts(project.compile.dependencies).
216
- select { |d| d.is_a?(ActsAsArtifact) }.
217
- collect do |d|
218
- f = d.to_s
219
- scope = provided_deps.include?(f) ? 'provided' :
220
- runtime_deps.include?(f) ? 'runtime' :
221
- 'compile'
222
- d.to_hash.merge(:scope => scope, :optional => optional_deps.include?(f))
223
- end + Buildr.artifacts(project.test.compile.dependencies).
224
- select { |d| d.is_a?(ActsAsArtifact) && !project.compile.dependencies.include?(d) }.collect { |d| d.to_hash.merge(:scope => 'test') }
255
+ select {|d| d.is_a?(ActsAsArtifact)}.
256
+ select {|d| !done.include?(d.to_s)}.
257
+ collect {|d| done << d.to_s; d.to_hash.merge(:scope => 'compile', :optional => optional_deps.include?(d.to_s), :include_transitive => include_transitive_deps.include?(d.to_s), :artifact => d)}
258
+
259
+ deps += Buildr.artifacts(project.test.compile.dependencies).
260
+ select {|d| d.is_a?(ActsAsArtifact)}.
261
+ select {|d| !done.include?(d.to_s)}.
262
+ collect {|d| d.to_hash.merge(:scope => 'test', :include_transitive => include_transitive_deps.include?(d.to_s), :artifact => d)}
225
263
 
226
264
  xml.dependencies do
227
- deps.each do |dependency|
265
+ deps.select {|dependency| project.pom.dependency_filter.nil? ? true : project.pom.dependency_filter.call(dependency)}.each do |dependency|
228
266
  xml.dependency do
229
267
  xml.groupId dependency[:group]
230
268
  xml.artifactId dependency[:id]
231
269
  xml.version dependency[:version]
270
+ xml.classifier dependency[:classifier] if dependency[:classifier] && dependency[:classifier].to_s != 'jar'
232
271
  xml.scope dependency[:scope] unless dependency[:scope] == 'compile'
233
272
  xml.optional true if dependency[:optional]
234
- xml.exclusions do
235
- xml.exclusion do
236
- xml.groupId '*'
237
- xml.artifactId '*'
273
+ unless dependency[:include_transitive]
274
+ xml.exclusions do
275
+ xml.exclusion do
276
+ xml.groupId '*'
277
+ xml.artifactId '*'
278
+ end
238
279
  end
239
280
  end
240
281
  end
@@ -231,8 +231,9 @@ module Buildr #:nodoc:
231
231
  # Username/password may be part of URI, or separate entities.
232
232
  uri = URI.parse(upload_to[:url].clone)
233
233
  uri.path = uri.path + '/' unless uri.path[-1] == '/'
234
- uri.user = upload_to[:username] if upload_to[:username]
235
- uri.password = upload_to[:password] if upload_to[:password]
234
+ to_escape = "!\"\#$%&'()*+,-./:;<=>?@{}|~`'"
235
+ uri.user = URI.encode(upload_to[:username], to_escape) if upload_to[:username]
236
+ uri.password = URI.encode(upload_to[:password], to_escape) if upload_to[:password]
236
237
 
237
238
  path = group.gsub('.', '/') + "/#{id}/#{version}/#{upload_name}"
238
239
 
@@ -14,5 +14,5 @@
14
14
  # the License.
15
15
 
16
16
  module Buildr #:nodoc:
17
- VERSION = '1.5.5'.freeze
17
+ VERSION = '1.5.6'.freeze
18
18
  end
@@ -102,7 +102,7 @@ describe Buildr::CustomPom do
102
102
  @pom_xml.should match_xpath('/project/modelVersion', '4.0.0')
103
103
  @pom_xml.should match_xpath('/project/parent/groupId', 'org.sonatype.oss')
104
104
  @pom_xml.should match_xpath('/project/parent/artifactId', 'oss-parent')
105
- @pom_xml.should match_xpath('/project/parent/version', '7')
105
+ @pom_xml.should match_xpath('/project/parent/version', '8')
106
106
  end
107
107
 
108
108
  it 'has correct project level metadata' do
@@ -1214,11 +1214,11 @@ end
1214
1214
  describe Buildr, '#transitive' do
1215
1215
  before do
1216
1216
  repositories.remote = 'http://buildr.apache.org/repository/noexist'
1217
- write artifact('org.sonatype.oss:oss-parent:pom:7').pom.to_s, <<-XML
1217
+ write artifact('org.sonatype.oss:oss-parent:pom:8').pom.to_s, <<-XML
1218
1218
  <project>
1219
1219
  <artifactId>oss-parent</artifactId>
1220
1220
  <groupId>org.sonatype.oss</groupId>
1221
- <version>7</version>
1221
+ <version>8</version>
1222
1222
  </project>
1223
1223
  XML
1224
1224
 
@@ -366,7 +366,7 @@ describe Project, '#package' do
366
366
  <parent>
367
367
  <groupId>org.sonatype.oss</groupId>
368
368
  <artifactId>oss-parent</artifactId>
369
- <version>7</version>
369
+ <version>8</version>
370
370
  </parent>
371
371
  <groupId>bar</groupId>
372
372
  <artifactId>foo</artifactId>
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.5.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Apache Buildr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-12-05 00:00:00.000000000 Z
11
+ date: 2018-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake