Is it possible to build a multi module maven project with skaffold and jib builder?
My project structure:
my-project-parent-module
- my-project-main-module
- my-project-lib-module
my-project-main-module
contains the Main class, and has the jib plugin configured, and has a dependency on my-project-lib-module
.
The lib-module
doesn't have jib configured, because no image is needed.
The documentation has an example of a multimodule skaffold:
build:
artifacts:
- image: image1 # jib artifact
jib:
fromImage: image2
requires:
- image: image2
- image: image2 # base image artifact
But this is a different scenario, because both modules produce an image (via jib).
Below is one of the skaffold configurations I tried:
apiVersion: skaffold/v2beta29
kind: Config
metadata:
name: my-project
build:
local:
push: false
artifacts:
- image: my-image-name
context: ./
jib:
project: com.example:my-project-main-module
...