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

14 views
Skip to first unread message

Gunnar Wagenknecht

unread,
May 6, 2021, 12:59:08 PM5/6/21
to bazel-discuss
Hi,

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

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


Reply all
Reply to author
Forward
0 new messages