Skip to content

#527 - Adding structure to support maven jib build#563

Open
vishrantgupta wants to merge 10 commits intocarvel-dev:developfrom
vishrantgupta:develop
Open

#527 - Adding structure to support maven jib build#563
vishrantgupta wants to merge 10 commits intocarvel-dev:developfrom
vishrantgupta:develop

Conversation

@vishrantgupta
Copy link
Copy Markdown

@vishrantgupta vishrantgupta commented Oct 22, 2025

Adding support for maven jib build.

Example:

kbld -f examples/simple-app-build-local-mvn/build.yml

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Maven Jib build support to kbld, including a simple Maven “HelloWorld” fixture and a new example config to build images via mvn jib:dockerBuild.

Changes:

  • Introduces a Maven/Jib builder and wires it into BuiltImage resolution.
  • Adds Jib-specific config structs and a new example manifest for local Maven builds.
  • Updates Go module dependencies (notably downgrading several modules).

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
test/e2e/assets/simple-app/helloworld/src/main/java/example/HelloWorld.java Adds a minimal Java entrypoint for a Maven/Jib build fixture.
test/e2e/assets/simple-app/helloworld/pom.xml Adds a Maven project configured to build an image via Jib.
pkg/kbld/image/factory.go Wires Maven/Jib builder into image factory pipeline.
pkg/kbld/image/built.go Adds Maven build source handling path that runs Jib and optionally pushes.
pkg/kbld/config/config_jib.go Introduces config types for Jib run options.
pkg/kbld/config/config.go Adds Maven source option to the main Source config.
pkg/kbld/builder/maven/jib.go Implements Maven Jib builder execution and Docker retagging.
pkg/kbld/builder/docker/docker.go Adds logging for Docker inspect command execution.
examples/simple-app-build-local-mvn/build.yml Adds an example kbld config using maven.run.
go.mod / go.sum Updates (and downgrades) several Go dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

apiVersion: apps/v1
kind: Deployment
metadata:
name: kbld-simple-app-build-local-bazel
spec:
selector:
matchLabels:
app: kbld-simple-app-build-local-bazel
template:
metadata:
labels:
app: kbld-simple-app-build-local-bazel
maven:
run:
target: helloworld
name: simple-app
"compile",
"jib:dockerBuild",
"-Dimage=" + targetImage,
"-Djib.allowInsecureRegistries=true",
"path/filepath"
)

var defaultImageTag = "latest"

tag := opts.Tag
if tag == nil {
tag = &defaultImageTag
Comment on lines +6 to +7
carvel.dev/imgpkg v0.43.1
carvel.dev/vendir v0.40.0
github.com/stretchr/testify v1.10.0
golang.org/x/sync v0.14.0
k8s.io/apimachinery v0.32.1
k8s.io/apimachinery v0.30.7
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants