GoogleContainerTools / GoogleContainerTools/skaffold
`init` should detect and configure Java multimodule projects for Buildpacks
- Dominant language
- Go
- Stars
- 15.9k
- Forks
- 1.7k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 10
Description
### Information
This is a follow-up to #4167, and GoogleCloudPlatform/buildpacks#57.
Invoking `skaffold init` within a multi-module Java project should ideally produce several artifacts, with but with the context set to the root of the multimodule build and `GOOGLE_BUILDABLE` set for each of the different projects.
But currently in the cloud-code-samples - java-guestbook](https://github.com/GoogleCloudPlatform/cloud-code-samples/tree/master/java/java-guestbook), we get the following result:
```yaml
artifacts:
- image: java-guestbook-backend
context: backend
buildpacks:
builder: gcr.io/buildpacks/builder:v1
- image: java-guestbook-frontend
context: frontend
buildpacks:
builder: gcr.io/buildpacks/builder:v1
```
This configuration works for this particular project as the `frontend` and `backend` projects are completely standalone. But if they had a common library, then this setup would break.
Instead `init` should generate something like:
```yaml
artifacts:
- image: java-guestbook-backend
context: .
buildpacks:
builder: gcr.io/buildpacks/builder:v1
env:
- GOOGLE_BUILDABLE=backend
- image: java-guestbook-frontend
context: frontend
buildpacks:
builder: gcr.io/buildpacks/builder:v1
env:
- GOOGLE_BUILDABLE=frontend
```
Contributor guide
Assessment
This issue has not been assessed yet.