bazel-contrib / rules_jvm_external

Bazel rules to resolve, fetch and export Maven artifacts
Apache License 2.0
336 stars 256 forks source link

Attempting to resolve `com.github.spotbugs:spotbugs:4.7.0` with the `coursier` resolver does not result in binaries being available #1250

Closed shs96c closed 1 month ago

shs96c commented 1 month ago

When resolving com.github.spotbugs:spotbugs:4.7.0 the jar file should be listed in the lock file. However, since rules_jvm_external 6.3, the pom artifact is downloaded instead.

shs96c commented 1 month ago

Looking at this, the issue appears to be that spotbugs claims a packaging type of pom in it's pom.xml file. You can see that by viewing the pom here.

coursier will include both the pom and the jar when asked to fetch with the --classpath flag set, but the generated JSON deps file we use as an input to generate the lock file only includes the pom as the listed file for the coordinates.

shs96c commented 1 month ago

Both maven and gradle generate a classpath without the pom, so this is an example of coursier diverging from the behaviour we expect to see.

vinnybod commented 1 month ago

Same as https://github.com/bazelbuild/rules_jvm_external/issues/1246 I think