I tried to execute bootBuildImage task in gradle multi-module project, but I couldn't create the image because the task failed. I checked that bootBuildImage task in a single gradle project succeeded in my local machine. Is executing in multi-module project the cause of the failure?

Spring Boot: 2.3.1.RELEASE Gradle: 6.4.1

$ ./gradlew web:bootBuildImage
> Task :web:bootBuildImage
Building image 'web-app:latest'

 > Pulling builder image 'gcr.io/paketo-buildpacks/builder:base-platform-api-0.3' ..................................................
 > Pulled builder image 'gcr.io/paketo-buildpacks/builder@sha256:c8a4e4b7a6fe3aaeb4faa7731fcacae8fb91ea90e220506970e12c5a0515f3d4'
 > Pulling run image 'gcr.io/paketo-buildpacks/run:base-cnb' ..................................................
 > Pulled run image 'cloudfoundry/run@sha256:1a37642c23a2e44231bdbcfca228d20f09425ff312736e96252c7299520e5044'
 > Executing lifecycle version v0.8.0
 > Using build cache volume 'pack-cache-8ffa72a0e7c4.build'

 > Running creator
    [creator]     ===> DETECTING
    [creator]     ERROR: No buildpack groups passed detection.
    [creator]     ERROR: Please check that you are running against the correct path.
    [creator]     ERROR: failed to detect: failed to detect: no buildpacks participating

> Task :web:bootBuildImage FAILED

FAILURE: Build failed with an exception.


Comment From: wilkinsona

Thanks for the report. Unfortunately, we can’t accurately diagnose the problem without know more about your build and its web project. It would appear that the web project doesn’t produce a binary that any of the builder’s buildpacks recognise.

If you would like us to spend some more time investigating, please spend some time providing a complete yet minimal sample that reproduces the problem. You can share it with us by pushing it to a separate repository on GitHub or by zipping it up and attaching it to this issue.

Comment From: ta7uw

It would appear that the web project doesn’t produce a binary that any of the builder’s buildpacks recognise.

The bootJar task in web project includes launchScript. I could create the image by excluding launchScript.

Thanks for your support!

Comment From: wilkinsona

Thanks. Glad to hear that you figured it out. I think we should fail earlier and improve the error message so that it’s more obvious what the problem is.