9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/jars/maven_factory.rb', line 9
def attach_jars(spec, all_dependencies: false)
@index ||= 0
@done ||= []
deps = GemspecArtifacts.new(spec)
deps.artifacts.each do |a|
next unless !@done.include?(a.key) && (all_dependencies || ((a.scope != 'provided') && (a.scope != 'test')))
self["jars.#{@index}"] = a.to_coord_no_classifier
if a.exclusions
jndex = 0
a.exclusions.each do |ex|
self["jars.#{@index}.exclusions.#{jndex}"] = ex.to_s
jndex += 1
end
end
self["jars.#{@index}.scope"] = a.scope if a.scope
self["jars.#{@index}.classifier"] = a.classifier if a.classifier
@index += 1
@done << a.key
end
end
|