Using TBS to create image failed with error "No buildpack groups passed detection" for Java apps
search cancel

Using TBS to create image failed with error "No buildpack groups passed detection" for Java apps

book

Article ID: 297256

calendar_today

Updated On:

Products

VMware Tanzu Build Service

Issue/Introduction

When trying to create image using the kp command for Java application, it received the error message below:

$ kp image create example1 --tag harbor.example.com/tbs/example1:0.0.1 --cluster-builder default --wait --git https://github.com/xxxx/example1.git --git-revision master
===> SETUP-CA-CERTS
setup-ca-certs:main.go:15: create certificate...
setup-ca-certs:main.go:21: populate certificate...
setup-ca-certs:main.go:32: update CA certificates...
setup-ca-certs:main.go:39: copying CA certificates...
setup-ca-certs:main.go:45: finished setting up CA certificates
===> PREPARE
Loading secret for "harbor.example.com" from secret "my-registry-creds" at location "/var/build-secrets/my-registry-creds"
Loading secrets for "https://github.com" from secret "my-registry-creds"
Successfully cloned "https://github.com/xxxx/example1.git " @ "f0a13029bc5e3572d35510f045890b879db2eabc" in path "/workspace"
===> DETECT
ERROR: No buildpack groups passed detection.
ERROR: Please check that you are running against the correct path.
ERROR: failed to detect: no buildpacks participating
Error: update to image failed


Environment

Product Version: 1.0

Resolution

The build is attempted from a source with no build tool configuration located with the source. A pom.xml or build.gradle file is expected at the root for detecting buildpack for Java apps. Refer to this site for more details.

So the solution is to try adding a pom.xml or build.gradle file at the root of the source of Java apps if there is no such file.

If this resolution doesn't help or you have a non-Java app, you should review the detection criteria for available buildpacks and investigate why your application was not detected. Or try pack -v build <parameters> to get a verbose output that contains a list of buildpacks that tried to detect and the status, which might give some clues as to why detection fails. This site also describes more about buildpacks which might be helpful too.