Apicurio / apicurio-registry

An API/Schema registry - stores APIs and Schemas.
https://www.apicur.io/registry/
Apache License 2.0
609 stars 269 forks source link

protobuf-maven-plugin fails to compile #5331

Open mfirry opened 1 month ago

mfirry commented 1 month ago

Hi, I'm trying to compile locally (behind a corporate proxy) and I'm struggling to understand how to compile the module apicurio-registry-protobuf-schema-utilities. Specifically I get this error:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:test-compile (gencode) on project apicurio-registry-protobuf-schema-utilities: protoc did not exit cleanly. Review output for more information.

It seems that for some reasons I cannot find the standard proto files.

Here's another bit of the compilation output:

[DEBUG] [PROTOC] --proto_path=/Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto --proto_path=/Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/target/protoc-dependencies/d8b0c5f162460cc0c267b3f2aa18c78e --proto_path=/Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/target/protoc-dependencies/8ca281cd7bec52afef7074e83571d603 --proto_path=/Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/target/protoc-dependencies/6dfd6661924876261238aca4b3c36c4c --proto_path=/Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/target/classes --java_out=/Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/target/generated-test-sources/protobuf/java /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestOrderingSyntax2Specified.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestSyntax3JsonName.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestOrderingSyntax2References.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/WellKnownTypesTestSyntax3.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestOrderingSyntax2.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestOrderingSyntax3References.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestSyntax3CustomOptions.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestSyntax2OneOfs.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/WellKnownTypesTestSyntax2.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestOrderingSyntax3.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestOrderingSyntax2Options.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestSyntax3JavaPackage.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestOrderingSyntax3Options.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestSyntax2CustomOptions.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestSyntax3OneOfs.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestSyntax2JavaPackage.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/additionalTypes/decimal.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/metadata/metadata.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestSyntax3Optional.proto /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/src/test/proto/TestSyntax2JsonName.proto
[INFO] Compiling 20 proto file(s) to /Users/pippo/personal/java/forks/apicurio-registry/utils/protobuf-schema-utilities/target/generated-test-sources/protobuf/java
[ERROR] PROTOC FAILED: google/type/money.proto: File not found.
google/type/date.proto: File not found.
google/type/timeofday.proto: File not found.
google/type/calendar_period.proto: File not found.
google/type/color.proto: File not found.
google/type/latlng.proto: File not found.
google/type/fraction.proto: File not found.
google/type/dayofweek.proto: File not found.
google/type/phone_number.proto: File not found.
google/type/postal_address.proto: File not found.
google/type/localized_text.proto: File not found.
google/type/month.proto: File not found.
google/type/interval.proto: File not found.
google/type/expr.proto: File not found.
google/type/quaternion.proto: File not found.

Besides, I noticed that org.xolstice.maven.plugins:protobuf-maven-plugin is being used but and it seems this was last updated 4 years ago. Maybe there are newer plugins that might work better?

Thanks

apicurio-bot[bot] commented 1 month ago

Thank you for reporting an issue!

Pinging @carlesarnal to respond or triage.