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

GRPC library content type breaks Nexus artifact storage #45685

Open
tmulle opened this issue Jan 17, 2025 · 1 comment
Open

GRPC library content type breaks Nexus artifact storage #45685

tmulle opened this issue Jan 17, 2025 · 1 comment
Labels
area/grpc gRPC kind/bug Something isn't working

Comments

@tmulle
Copy link
Contributor

tmulle commented Jan 17, 2025

Describe the bug

This isn't directly a Quarkus bug, but the GRPC library it uses in relation to Nexus/Maven.

We use a corporate Nexus proxy of Maven central as well as our internal libraries.
When trying to build with GRPC libraries in Quarkus I got the following error which ultimately caused Nexus to not store the artifact in the repo.

Turning off strict meta/mime-type validation on the Nexus repo fixes it, but it looks like the mimetype of GRPC is incorrect?

I know most people probably don't use a Nexus Proxy and go straight to Maven Central, I just thought I'd bring it up to help those of us that do and save a day of troublshooting like it took me.

org.sonatype.nexus.repository.view.handlers.ExceptionHandler - Invalid content: GET /io/grpc/protoc-gen-grpc-java/1.65.1/protoc-gen-grpc-java-1.65.1-linux-aarch_64.exe: org.sonatype.nexus.repository.InvalidContentException: Detected content type [application/x-sharedlib], but expected [application/x-executable, application/x-dosexec, application/x-msdownload]: io/grpc/protoc-gen-grpc-java/1.65.1/protoc-gen-grpc-java-1.65.1-linux-aarch_64.exe

Expected behavior

Looks like Nexus thinks the mimetype should be one of: expected [application/x-executable, application/x-dosexec, application/x-msdownload]

Actual behavior

It Detected content type [application/x-sharedlib]

How to Reproduce?

Turn on Validation of mimetype for your repository storage for the Maven Central repo and try to build and you should see an error similiar to:

[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.17.7:generate-code (default) on project code-with-quarkus-temporal: Quarkus code generation phase has failed: Failed to bootstrap application in NORMAL mode: Failed to resolve artifact io.grpc:protoc-gen-grpc-java:exe:linux-aarch_64:1.65.1: The following artifacts could not be resolved: io.grpc:protoc-gen-grpc-java:exe:linux-aarch_64:1.65.1 (absent): Could not find artifact io.grpc:protoc-gen-grpc-java:exe:linux-aarch_64:1.65.1 in nexus-mirror

Output of uname -a or ver

linux and osX

Output of java -version

No response

Quarkus version or git rev

3.17.5

Build tool (ie. output of mvnw --version or gradlew --version)

maven

Additional information

No response

@tmulle tmulle added the kind/bug Something isn't working label Jan 17, 2025
@quarkus-bot quarkus-bot bot added the area/grpc gRPC label Jan 17, 2025
Copy link

quarkus-bot bot commented Jan 17, 2025

/cc @alesj (grpc), @cescoffier (grpc)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/grpc gRPC kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant