<#20054 experimental.codegen.protobuf.java request...
# github-notifications
c
#20054 experimental.codegen.protobuf.java requesting outdated tomcat annotations api dependency Issue created by afeneri Describe the bug When using the
pants.backend.experimental.codegen.protobuf.java
, the backend requests that the user declares
org.apache.tomcat.annotations-api
as a dependency.
Copy code
MissingRequiredJvmArtifactsInResolve: The JVM resolve `jvm-default` is missing one or more requirements for the Protobuf Java gRPC runtime. Since at least one JVM target type in this repository consumes a `protobuf_sources` target in this resolve, this resolve must contain `jvm_artifact` targets for each requirement of the Protobuf Java gRPC runtime.

Please add the following `jvm_artifact` target(s) somewhere in the repository and re-run `pants generate-lockfiles --resolve=jvm-default`:

jvm_artifact(
  name="org.apache.tomcat_annotations-api",
  group="org.apache.tomcat",
  artifact="annotations-api",
  version="<your preferred runtime version>",
  resolve="jvm-default",
)
The Maven coordinate
annotations-api
points to an artifact that has not been updated since 2017 because the artifact has moved. See https://mvnrepository.com/artifact/org.apache.tomcat/annotations-api The correct artifact coordinate should be
tomcat-annotations-api
- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-annotations-api
Copy code
jvm_artifact(
  name="org.apache.tomcat_annotations-api",
  group="org.apache.tomcat",
  artifact="tomcat-annotations-api",
  version="<your preferred runtime version>",
  resolve="jvm-default",
)
The backed does not let you generate protobuf sources unless you explicitly declare the old
annotations-api
dependency. Pants version Which version of Pants are you using? 2.17.0 OS Are you encountering the bug on MacOS, Linux, or both? Both Additional info Add any other information about the problem here, such as attachments or links to gists, if relevant. pantsbuild/pants