Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java_export generated pom.xml does not include <classifier> property #1154

Open
vinnybod opened this issue May 29, 2024 · 0 comments · Fixed by confluentinc/rules_jvm_external#17 · May be fixed by #1208
Open

java_export generated pom.xml does not include <classifier> property #1154

vinnybod opened this issue May 29, 2024 · 0 comments · Fixed by confluentinc/rules_jvm_external#17 · May be fixed by #1208

Comments

@vinnybod
Copy link
Contributor

vinnybod commented May 29, 2024

I am encountering this with a java_export that contains io.netty:netty-tcnative-boringssl-static. I can provide a repo example if it helps.

To reproduce, create a java_export with any/all of the following artifacts:

"@maven//:io_netty_netty_tcnative_boringssl_static_linux_aarch_64",
"@maven//:io_netty_netty_tcnative_boringssl_static_linux_x86_64",
"@maven//:io_netty_netty_tcnative_boringssl_static_osx_aarch_64",
"@maven//:io_netty_netty_tcnative_boringssl_static_osx_x86_64",
"@maven//:io_netty_netty_tcnative_boringssl_static_windows_x86_64",

The generated pom.xml contains the group, artifact, scope, and version, but is missing the classifier. What I would expect:

<dependency>
  <artifactId>netty-tcnative-boringssl-static</artifactId>
  <classifier>linux-aarch_64</classifier>
  <groupId>io.netty</groupId>
  <scope>runtime</scope>
  <version>2.0.61.Final</version>
</dependency>

The maven_coordinates tag does contain the classifier, but the unpack_coordinates function does not account for it: https://github.com/bazelbuild/rules_jvm_external/blob/master/private/rules/maven_utils.bzl#L7

maven_coordinates=io.netty:netty-tcnative-boringssl-static:jar:linux-aarch_64:2.0.61.Final

I'd be happy to put up a PR with a bit of guidance. The maven coordinate string in the javadoc linked above seems to follow a different syntax than what is present in the tag.
groupId:artifactId[:type[:scope]]:version while the tag looks to be groupId:artifactId[:type[:classifier]]:version without a scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant