Language, language version, and OS: Java 11.0.9+11 on MacOS 11.6
Bazel version: 4.0.0
Issue description
After updating braintree-java from 3.6.0 to 3.12.0, Bazel builds error because the transitive dependency junit-vintage-engine is not marked with testonly attribute in the braintree-java SDK.
From a maven perspective, the solution is to add <scope>test</scope>.
The workaround is to add it as an exclusion in bazel_rje_deps.bzl:
ERROR: /private/var/tmp/_bazel_tom/002f4fd2b31c5cad69dfeeb104c6807c/external/maven/BUILD:11459:12:
in java_import rule @maven//:org_junit_vintage_junit_vintage_engine:
non-test target '@maven//:org_junit_vintage_junit_vintage_engine'
depends on testonly target '@maven//:junit_junit' and doesn't have testonly attribute set
General information
Issue description
After updating braintree-java from 3.6.0 to 3.12.0, Bazel builds error because the transitive dependency junit-vintage-engine is not marked with testonly attribute in the braintree-java SDK.
From a maven perspective, the solution is to add
<scope>test</scope>
.The workaround is to add it as an exclusion in
bazel_rje_deps.bzl
:Error Message