https://pantsbuild.org/ logo
j

jolly-chef-92794

03/18/2016, 8:35 PM
compile
and
test
are mutually exclusive right now, but that’s kind of a technical detail. So with transitivity, it’d look like:
Copy code
jar_library(name='hadoop',
  scopes=['compile', 'test'],
)
target(name=‘hadoop-intransitive’,
  intransitive=True,
  dependencies=[‘:hadoop’],
)
java_library(name='lib',
  dependencies=[‘:hadoop-intransitive'],
)
junit_tests(name='test',
  dependencies=[':hadoop'],
)
jvm_binary(name='test',
  dependencies=[':hadoop'],
)