rules_jvm icon indicating copy to clipboard operation
rules_jvm copied to clipboard

java_test_suite has trouble finding srcs specified as a filegroup

Open programmablemike opened this issue 1 month ago • 0 comments

I’m having an issue in one of my projects with the bazel-contrib/rules_jvm package java_test_suite where I specify the srcs using a filegroup, but the source files are never found. However, using a glob(["src/test/java/**/*.java"]) or manually specifying the list of source files does work.

For reference I’m using Bazel 8.0.0 (via Bazelisk) and the following MODULE dependencies:

bazel_dep(name = "rules_java", version = "8.6.3")
bazel_dep(name = "rules_jvm_external", version = "6.6")
bazel_dep(name = "contrib_rules_jvm", version = "0.27.0")

I put together an example repository to demonstrate the issue here: https://github.com/programmablemike/issue-bazel-java-test-suite-filegroup/

programmablemike avatar Jan 10 '25 19:01 programmablemike