There’s a lot of duplication without this, because...
# general
j
There’s a lot of duplication without this, because by convention we name the jar_libraries after the artifacts they pull in, and typically just have one jar dependency per artifact, which results in things like:
Copy code
# in 3rdparty/managed/BUILD
managed_jar_dependencies(name=‘managed’,
  artifacts=[
    jar(org=‘foobar’, name=‘foobar’, rev=‘2’),
  ],
)

# in 3rdparty/BUILD
jar_library(name=‘foobar.foobar’,
  jars=[
    jar(org=‘foobar’, name=‘foobar’),
  ],
)

# Somewhere else
java_library(name=‘lib’,
  sources=globs(‘*.java’),
  dependencies=[
    ‘3rdparty:foobar’,
  ],
)