I've tried everything I can think of to try and get this example to work. But nothing seems to work. Any suggestions would be greatly appreciated.
Steps:
- Clean checkout
cd sample-functions-framework-java-mvn
./mvnw clean package
pack build --builder gcr.io/buildpacks/builder:v1 sample-functions-java-mvn --verbose
Error:
[detector] ERROR: No buildpack groups passed detection.
[detector] ERROR: failed to detect: buildpack(s) failed with err
ERROR: failed to build: executing lifecycle: failed with status code: 21
Environment info:
./mvnw clean package --debug
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /Users/oliver.henlich/.m2/wrapper/dists/apache-maven-3.6.3-bin/1iopthnavndlasol9gbrbg6bf2/apache-maven-3.6.3
Java version: 17.0.15, vendor: Eclipse Adoptium, runtime: /Library/Java/JavaVirtualMachines/temurin-17.jdk/Contents/Home
Default locale: en_GB, platform encoding: UTF-8
OS name: "mac os x", version: "15.2", arch: "aarch64", family: "mac"
pack version
0.37.0+git-bf1bd85.build-6370
Verbose log
oliver.henlich@Oliver-Mac sample-functions-framework-java-mvn % pack build --builder gcr.io/buildpacks/builder:v1 sample-functions-java-mvn --verbose
Warning: No schema version declared in project.toml, defaulting to schema version 0.1
Using project descriptor located at project.toml
Builder gcr.io/buildpacks/builder:v1 is untrusted
As a result, the phases of the lifecycle which require root access will be run in separate trusted ephemeral containers.
For more information, see https://medium.com/buildpacks/faster-more-secure-builds-with-pack-0-11-0-4d0c633ca619
Pulling image gcr.io/buildpacks/builder:v1
v1: Pulling from buildpacks/builder
Digest: sha256:a8d69b26fd4ff27dae2c790bb81f3b277d3d821a1149a46e16371a7eca2e461d
Status: Image is up to date for gcr.io/buildpacks/builder:v1
CheckReadAccess succeeded for the run image gcr.io/buildpacks/gcp/run:v1
Selected run image gcr.io/buildpacks/gcp/run:v1
Pulling image gcr.io/buildpacks/gcp/run:v1 with platform linux/amd64
v1: Pulling from buildpacks/gcp/run
Digest: sha256:2c7cdbfdec3771adbe66a2f0094898df309dbc5e9d87a73e63bf56a7937fcf51
Status: Image is up to date for gcr.io/buildpacks/gcp/run:v1
Pulling image docker.io/buildpacksio/lifecycle:0.20.5 with platform linux/amd64
0.20.5: Pulling from buildpacksio/lifecycle
Digest: sha256:3274fe28594f484240fc3f17e46b7b45e304830e544dcdd82ce19472d159ef71
Status: Image is up to date for buildpacksio/lifecycle:0.20.5
Creating ephemeral lifecycle from docker.io/buildpacksio/lifecycle:0.20.5 with uid 1000 and gid 1000. With workspace dir
Selecting ephemeral lifecycle image pack.local/lifecycle/6e6973646a6f6b6f7271:latest for build
Creating builder with the following buildpacks:
-> google.config.entrypoint@0.9.0
-> google.cpp.clear-source@0.1.0
-> google.cpp.functions-framework@0.1.0
-> google.dart.compile@1.0.0
-> google.dart.pub@0.1.0
-> google.dart.sdk@1.0.0
-> google.dotnet.runtime@0.9.1
-> google.dotnet.sdk@0.9.1
-> google.dotnet.publish@0.9.0
-> google.dotnet.functions-framework@0.0.1
-> google.go.clear-source@0.9.0
-> google.go.runtime@0.9.1
-> google.go.gomod@0.9.0
-> google.go.build@0.9.0
-> google.go.gopath@0.9.0
-> google.go.functions-framework@0.9.4
-> google.java.entrypoint@0.9.0
-> google.java.exploded-jar@0.9.0
-> google.java.functions-framework@1.1.0
-> google.java.gradle@0.10.0
-> google.java.maven@0.9.0
-> google.java.graalvm@0.1.0
-> google.java.native-image@0.1.0
-> google.java.runtime@0.9.2
-> google.java.clear-source@0.9.0
-> google.nodejs.runtime@1.0.0
-> google.nodejs.npm@1.1.0
-> google.nodejs.yarn@2.1.0
-> google.nodejs.pnpm@0.1.0
-> google.nodejs.functions-framework@0.9.4
-> google.python.runtime@0.9.1
-> google.python.pip@0.9.2
-> google.python.functions-framework@0.9.6
-> google.python.missing-entrypoint@0.9.0
-> google.utils.archive-source@0.0.1
-> google.utils.label-image@0.0.2
-> google.ruby.runtime@0.0.1
-> google.ruby.functions-framework@0.9.1
-> google.ruby.rubygems@0.9.0
-> google.ruby.bundle@0.9.0
-> google.ruby.rails@0.9.0
-> google.ruby.missing-entrypoint@0.0.1
-> google.config.flex@0.9.1
-> google.python.webserver@0.9.1
-> google.php.composer@0.9.1
-> google.php.composer-install@0.0.1
-> google.php.composer-gcp-build@0.9.1
-> google.php.runtime@0.0.2
-> google.php.webconfig@0.0.1
-> google.utils.nginx@0.0.1
Provided Environment Variables
GOOGLE_FUNCTION_TARGET=com.google.HelloWorld
Using build cache volume pack-cache-library_sample-functions-java-mvn_latest-afd79c4cd43b.build
Created ephemeral bridge network pack.local-network-78696c6666676770786b with ID 690e7aaa801af35ecb536fff653cc10b6d67f3f05f264d030512618f1919335e
===> ANALYZING
Running the analyzer on OS linux from image pack.local/lifecycle/6e6973646a6f6b6f7271:latest with:
Container Settings:
Args: /cnb/lifecycle/analyzer -log-level debug -daemon -run /layers/run.toml -run-image gcr.io/buildpacks/gcp/run:v1 -launch-cache /launch-cache sample-functions-java-mvn
System Envs: CNB_USER_ID=1000 CNB_GROUP_ID=1000 CNB_PLATFORM_API=0.13
Image: pack.local/lifecycle/6e6973646a6f6b6f7271:latest
User: root
Labels: map[author:pack]
Host Settings:
Binds: /var/run/docker.sock:/var/run/docker.sock pack-cache-library_sample-functions-java-mvn_latest-afd79c4cd43b.launch:/launch-cache pack-layers-zofaxqoiwe:/layers pack-app-ibzxlvrexr:/workspace
Network Mode: pack.local-network-78696c6666676770786b
[analyzer] Starting analyzer...
[analyzer] Parsing inputs...
[analyzer] Ensuring privileges...
[analyzer] Executing command...
[analyzer] Timer: Analyzer started at 2025-05-05T00:12:54Z
[analyzer] Image with name "sample-functions-java-mvn" not found
[analyzer] Found image with identifier "d1dae356a4aca0e4f2b1098a9fb16ed85c65650a1afb26f11864cb43a13498e9"
[analyzer] Timer: Analyzer ran for 531.791µs and ended at 2025-05-05T00:12:54Z
[analyzer] Run image info in analyzed metadata is:
[analyzer] {"Reference":"d1dae356a4aca0e4f2b1098a9fb16ed85c65650a1afb26f11864cb43a13498e9","Image":"gcr.io/buildpacks/gcp/run:v1","Extend":false,"target":{"os":"linux","arch":"amd64"}}
===> DETECTING
Running the detector on OS linux from image pack.local/builder/777a7064736874726d6d:latest with:
Container Settings:
Args: /cnb/lifecycle/detector -app /workspace -log-level debug
System Envs: CNB_PLATFORM_API=0.13
Image: pack.local/builder/777a7064736874726d6d:latest
User:
Labels: map[author:pack]
Host Settings:
Binds: pack-layers-zofaxqoiwe:/layers pack-app-ibzxlvrexr:/workspace
Network Mode: pack.local-network-78696c6666676770786b
[detector] Starting detector...
[detector] Parsing inputs...
[detector] Ensuring privileges...
[detector] Executing command...
[detector] Timer: Detector started at 2025-05-05T00:12:55Z
[detector] Checking for match against descriptor: { []}
[detector] target distro name/version labels not found, reading /etc/os-release file
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: { []}
[detector] ======== Results ========
[detector] err: google.dotnet.sdk@0.9.1
[detector] err: google.dotnet.functions-framework@0.0.1
[detector] err: google.dotnet.publish@0.9.0
[detector] err: google.dotnet.runtime@0.9.1
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.dotnet.runtime@0.9.1
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.dart.sdk@1.0.0
[detector] err: google.dart.pub@0.1.0
[detector] err: google.dart.compile@1.0.0
[detector] ======== Results ========
[detector] err: google.go.runtime@0.9.1
[detector] err: google.go.functions-framework@0.9.4
[detector] err: google.go.build@0.9.0
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.go.clear-source@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.go.runtime@0.9.1
[detector] err: google.go.gomod@0.9.0
[detector] err: google.go.build@0.9.0
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.go.clear-source@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.go.runtime@0.9.1
[detector] err: google.go.gopath@0.9.0
[detector] err: google.go.build@0.9.0
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.go.clear-source@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.java.graalvm@0.1.0
[detector] err: google.java.maven@0.9.0
[detector] err: google.java.functions-framework@1.1.0
[detector] err: google.java.native-image@0.1.0
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.java.clear-source@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.java.runtime@0.9.2
[detector] err: google.java.maven@0.9.0
[detector] err: google.java.functions-framework@1.1.0
[detector] err: google.java.clear-source@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.java.runtime@0.9.2
[detector] err: google.java.gradle@0.10.0
[detector] err: google.java.functions-framework@1.1.0
[detector] err: google.java.clear-source@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.java.runtime@0.9.2
[detector] err: google.java.exploded-jar@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.java.runtime@0.9.2
[detector] err: google.java.maven@0.9.0
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.java.clear-source@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.java.runtime@0.9.2
[detector] err: google.java.maven@0.9.0
[detector] err: google.java.entrypoint@0.9.0
[detector] err: google.java.clear-source@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.java.runtime@0.9.2
[detector] err: google.java.gradle@0.10.0
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.java.clear-source@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.java.runtime@0.9.2
[detector] err: google.java.gradle@0.10.0
[detector] err: google.java.entrypoint@0.9.0
[detector] err: google.java.clear-source@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.config.flex@0.9.1
[detector] err: google.python.runtime@0.9.1
[detector] err: google.python.pip@0.9.2
[detector] err: google.python.webserver@0.9.1
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.python.runtime@0.9.1
[detector] err: google.python.functions-framework@0.9.6
[detector] err: google.python.pip@0.9.2
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.python.runtime@0.9.1
[detector] err: google.python.pip@0.9.2
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.ruby.runtime@0.0.1
[detector] err: google.ruby.rubygems@0.9.0
[detector] err: google.ruby.bundle@0.9.0
[detector] err: google.nodejs.runtime@1.0.0
[detector] err: google.ruby.rails@0.9.0
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.ruby.runtime@0.0.1
[detector] err: google.utils.archive-source@0.0.1
[detector] err: google.ruby.bundle@0.9.0
[detector] err: google.ruby.functions-framework@0.9.1
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.php.runtime@0.0.2
[detector] err: google.utils.nginx@0.0.1
[detector] err: google.php.composer-install@0.0.1
[detector] err: google.php.composer-gcp-build@0.9.1
[detector] err: google.php.composer@0.9.1
[detector] err: google.utils.label-image@0.0.2
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.php.webconfig@0.0.1
[detector] ======== Results ========
[detector] err: google.nodejs.runtime@1.0.0
[detector] err: google.nodejs.yarn@2.1.0
[detector] err: google.nodejs.functions-framework@0.9.4
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.nodejs.runtime@1.0.0
[detector] err: google.nodejs.pnpm@0.1.0
[detector] err: google.nodejs.functions-framework@0.9.4
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.nodejs.runtime@1.0.0
[detector] err: google.nodejs.npm@1.1.0
[detector] err: google.nodejs.functions-framework@0.9.4
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.nodejs.runtime@1.0.0
[detector] err: google.nodejs.functions-framework@0.9.4
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.nodejs.runtime@1.0.0
[detector] err: google.config.entrypoint@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.cpp.functions-framework@0.1.0
[detector] err: google.cpp.clear-source@0.1.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.python.runtime@0.9.1
[detector] err: google.python.webserver@0.9.1
[detector] err: google.python.pip@0.9.2
[detector] err: google.python.missing-entrypoint@0.9.0
[detector] err: google.utils.label-image@0.0.2
[detector] ======== Results ========
[detector] err: google.ruby.missing-entrypoint@0.0.1
[detector] Timer: Detector ran for 567.000792ms and ended at 2025-05-05T00:12:55Z
[detector] ERROR: No buildpack groups passed detection.
[detector] ERROR: failed to detect: buildpack(s) failed with err
ERROR: failed to build: executing lifecycle: failed with status code: 21
I've tried everything I can think of to try and get this example to work. But nothing seems to work. Any suggestions would be greatly appreciated.
Steps:
cd sample-functions-framework-java-mvn./mvnw clean packagepack build --builder gcr.io/buildpacks/builder:v1 sample-functions-java-mvn --verboseError:
Environment info:
Verbose log