File: attach_jars_pom.rb

package info (click to toggle)
ruby-jar-dependencies 0.3.10-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 232 kB
  • sloc: ruby: 1,325; xml: 14; makefile: 9
file content (24 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# this file is maven DSL

( 0..10000 ).each do |i|
  coord = ENV_JAVA[ "jars.#{i}" ]
  break unless coord
  artifact = Maven::Tools::Artifact.from_coordinate( coord )
  exclusions = []
  ( 0..10000 ).each do |j|
    exclusion = ENV_JAVA[ "jars.#{i}.exclusions.#{j}" ]
    break unless exclusion
    exclusions << exclusion
  end
  scope = ENV_JAVA[ "jars.#{i}.scope" ]
  artifact.scope = scope if scope
  classifier = ENV_JAVA[ "jars.#{i}.classifier" ]
  artifact.classifier = classifier if classifier

  # declare the artifact inside the POM
  dependency_artifact( artifact ) do
    exclusions.each do |ex|
      exclusion ex
    end
  end
end