Jar in java_library deps not added to '--direct_dependencies' when calling Java compiler

Skip to first unread message

Gunnar Wagenknecht

May 6, 2021, 12:59:08 PMMay 6
to bazel-discuss

I have a java_library target with a specific jar (from jvm_maven_import_external) listed in the `deps` attribute list as a direct dependency. However, when Bazel calls the Java compiled it does not add the jar file to the "--direct_dependencies" parameter that gets passed to the compiler. As a result compilation fails because classes from the jar are not "visible". It does get added to the "--classpath" list, though.

What would cause such a behavior?


Gunnar Wagenknecht
gun...@wagenknecht.org, http://guw.io/

Reply all
Reply to author
0 new messages