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 +4 -4
- data/CHANGELOG +38 -0
- data/README.rdoc +1 -4
- data/addon/buildr/gwt.rb +5 -2
- data/addon/buildr/jacoco.rb +6 -2
- data/doc/download.textile +18 -6
- data/doc/index.textile +37 -30
- data/lib/buildr/core/compile.rb +1 -1
- data/lib/buildr/core/transports.rb +3 -2
- data/lib/buildr/java/custom_pom.rb +60 -19
- data/lib/buildr/packaging/artifact.rb +3 -2
- data/lib/buildr/version.rb +1 -1
- data/spec/java/custom_pom_spec.rb +1 -1
- data/spec/packaging/artifact_spec.rb +2 -2
- data/spec/packaging/packaging_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5793f6715926b79b32bc1180ee678793f5c74381
|
4
|
+
data.tar.gz: 8b9eeca272be9fbae824af95f337351fff00e918
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/README.rdoc
CHANGED
@@ -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:
|
data/addon/buildr/gwt.rb
CHANGED
@@ -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.
|
116
|
-
com.google.jsinterop:jsinterop-annotations:jar:sources:1.0.
|
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'
|
data/addon/buildr/jacoco.rb
CHANGED
@@ -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.
|
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
|
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
|
data/doc/download.textile
CHANGED
@@ -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://
|
25
|
-
| "buildr-1.5.4.gem":http://
|
26
|
-
| "buildr-1.5.4-java.gem":http://
|
27
|
-
| "buildr-1.5.4.tgz":http://
|
28
|
-
| "buildr-1.5.4.zip":http://
|
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://
|
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)
|
data/doc/index.textile
CHANGED
@@ -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.
|
50
|
-
* Fixed:
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
* Added:
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
*
|
62
|
-
|
63
|
-
* Fixed:
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
*
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
*
|
77
|
-
|
78
|
-
|
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
|
|
data/lib/buildr/core/compile.rb
CHANGED
@@ -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
|
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 '
|
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)
|
212
|
-
runtime_deps = Buildr.artifacts(project.pom.runtime_dependencies)
|
213
|
-
|
214
|
-
|
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 {
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
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
|
-
|
235
|
-
xml.
|
236
|
-
xml.
|
237
|
-
|
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
|
-
|
235
|
-
uri.
|
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
|
|
data/lib/buildr/version.rb
CHANGED
@@ -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', '
|
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:
|
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>
|
1221
|
+
<version>8</version>
|
1222
1222
|
</project>
|
1223
1223
|
XML
|
1224
1224
|
|
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.
|
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:
|
11
|
+
date: 2018-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|