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

MicronautGenerator not getting invoked for Micronaut4 Maven project #3294

Closed
rohanKanojia opened this issue Aug 1, 2024 · 0 comments · Fixed by #3295
Closed

MicronautGenerator not getting invoked for Micronaut4 Maven project #3294

rohanKanojia opened this issue Aug 1, 2024 · 0 comments · Fixed by #3295
Assignees
Labels
bug Something isn't working
Milestone

Comments

@rohanKanojia
Copy link
Member

Describe the bug

I was testing Micronaut Native Image builds in the scope of #494

I noticed that in case of Micronaut 4 Maven projects, jkube 's MicronautGenerator is not getting picked up, jkube is defaulting to JavaExecGenerator instead.

[INFO] --- k8s:1.17-SNAPSHOT:build (default-cli) @ jkube-micronaut-demo ---
[INFO] k8s: Running generator java-exec
[INFO] k8s: java-exec: Using Docker image quay.io/jkube/jkube-java:0.0.24 as base / builder
[INFO] k8s: [demo/jkube-micronaut-demo:0.1] "java-exec": Created docker-build.tar in 119 milliseconds
[INFO] k8s: [demo/jkube-micronaut-demo:0.1] "java-exec": Built image sha256:759bf
[INFO] k8s: [demo/jkube-micronaut-demo:0.1] "java-exec": Removed old image sha256:d948a

This is happening because in Micronaut 4 groupId of micronaut-maven-plugin has changed from io.micronaut.build to io.micronaut.maven

We need to update this to io.micronaut.maven

return JKubeProjectUtil.hasPlugin(javaProject, "io.micronaut.build", "micronaut-maven-plugin") ||

Eclipse JKube version

SNAPSHOT

Component

Kubernetes Maven Plugin

Apache Maven version

None

Gradle version

None

Steps to reproduce

  1. Generate any Micronaut4 maven application
  2. Add Kubernetes Maven Plugin
  3. run k8s:build (You would see that generator invoked is java-exec not micronaut

Expected behavior

k8s:build should correctly invoke micronaut generator

Runtime

Kubernetes (vanilla)

Kubernetes API Server version

1.25.3

Environment

Linux

Eclipse JKube Logs

No response

Sample Reproducer Project

No response

Additional context

No response

@rohanKanojia rohanKanojia added the bug Something isn't working label Aug 1, 2024
@rohanKanojia rohanKanojia self-assigned this Aug 2, 2024
@manusa manusa moved this to Review in Eclipse JKube Aug 5, 2024
@manusa manusa added this to the 1.17.0 milestone Aug 5, 2024 — with automated-tasks
@github-project-automation github-project-automation bot moved this from Review to Done in Eclipse JKube Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants