Open lmarchione-r7 opened 3 weeks ago
I think it is the source compatibility flag in the build.gradle file. It's set to 17, so Gradle is complaining because it's building with Java 21. Can you try bumping that to Java 21?
We haven't bumped that example to use Java 21 yet, the instructions are still set to Java 17 (see README for that example), which indicates you should set BP_JVM_VERSION=17
.
see README for that example
Ah sorry, I wasn't looking at the README, I just noticed our build job failed on that sample when we upgraded bellsoft. RTFM 🤦🏻♂️.
I changed sourceCompatibility = '21'
and ran the command below.
export SAMPLE=samples-java-gradle-node
pack build --clear-cache ${SAMPLE} --path java/java-node/gradle-node --pull-policy if-not-present \
--builder paketobuildpacks/builder-jammy-buildpackless-base:latest \
--buildpack gcr.io/paketo-buildpacks/ca-certificates:3.8.6 \
--buildpack gcr.io/paketo-buildpacks/bellsoft-liberica:11.0.0 \
--buildpack gcr.io/paketo-buildpacks/node-engine:4.1.15 \
--buildpack gcr.io/paketo-buildpacks/syft:2.4.0 \
--buildpack gcr.io/paketo-buildpacks/gradle:7.14.1 \
--buildpack gcr.io/paketo-buildpacks/executable-jar:6.11.3 \
--buildpack gcr.io/paketo-buildpacks/apache-tomcat:8.2.2 \
--buildpack gcr.io/paketo-buildpacks/apache-tomee:1.10.4 \
--buildpack gcr.io/paketo-buildpacks/liberty:4.3.1 \
--buildpack gcr.io/paketo-buildpacks/dist-zip:5.8.5 \
--buildpack gcr.io/paketo-buildpacks/spring-boot:5.31.2 \
--env BP_JAVA_INSTALL_NODE=true \
--env BP_NODE_PROJECT_PATH=frontend \
--verbose
Which resulted in this error...
Builder paketobuildpacks/builder-jammy-buildpackless-base:latest 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
Selected run image index.docker.io/paketobuildpacks/run-jammy-base:latest
Downloading buildpack from image: gcr.io/paketo-buildpacks/ca-certificates:3.8.6
Downloading buildpack from image: gcr.io/paketo-buildpacks/bellsoft-liberica:11.0.0
Downloading buildpack from image: gcr.io/paketo-buildpacks/node-engine:4.1.15
Downloading buildpack from image: gcr.io/paketo-buildpacks/syft:2.4.0
Downloading buildpack from image: gcr.io/paketo-buildpacks/gradle:7.14.1
Downloading buildpack from image: gcr.io/paketo-buildpacks/executable-jar:6.11.3
Downloading buildpack from image: gcr.io/paketo-buildpacks/apache-tomcat:8.2.2
Downloading buildpack from image: gcr.io/paketo-buildpacks/apache-tomee:1.10.4
Downloading buildpack from image: gcr.io/paketo-buildpacks/liberty:4.3.1
Downloading buildpack from image: gcr.io/paketo-buildpacks/dist-zip:5.8.5
Downloading buildpack from image: gcr.io/paketo-buildpacks/spring-boot:5.31.2
Warning: Builder is trusted but additional modules were added; using the untrusted (5 phases) build flow
Creating ephemeral lifecycle from buildpacksio/lifecycle:0.20.3 with uid 1001 and gid 1000. With workspace dir
Selecting ephemeral lifecycle image pack.local/lifecycle/666578616464616d6b70:latest for build
Adding buildpack paketo-buildpacks/ca-certificates version 3.8.6 to builder
Adding buildpack paketo-buildpacks/bellsoft-liberica version 11.0.0 to builder
Adding buildpack paketo-buildpacks/node-engine version 4.1.15 to builder
Adding buildpack paketo-buildpacks/syft version 2.4.0 to builder
Adding buildpack paketo-buildpacks/gradle version 7.14.1 to builder
Adding buildpack paketo-buildpacks/executable-jar version 6.11.3 to builder
Adding buildpack paketo-buildpacks/apache-tomcat version 8.2.2 to builder
Adding buildpack paketo-buildpacks/apache-tomee version 1.10.4 to builder
Adding buildpack paketo-buildpacks/liberty version 4.3.1 to builder
Adding buildpack paketo-buildpacks/dist-zip version 5.8.5 to builder
Adding buildpack paketo-buildpacks/spring-boot version 5.31.2 to builder
Setting custom order
Creating builder with the following buildpacks:
-> paketo-buildpacks/ca-certificates@3.8.6
-> paketo-buildpacks/bellsoft-liberica@11.0.0
-> paketo-buildpacks/node-engine@4.1.15
-> paketo-buildpacks/syft@2.4.0
-> paketo-buildpacks/gradle@7.14.1
-> paketo-buildpacks/executable-jar@6.11.3
-> paketo-buildpacks/apache-tomcat@8.2.2
-> paketo-buildpacks/apache-tomee@1.10.4
-> paketo-buildpacks/liberty@4.3.1
-> paketo-buildpacks/dist-zip@5.8.5
-> paketo-buildpacks/spring-boot@5.31.2
Adding buildpack paketo-buildpacks/apache-tomcat@8.2.2 (diffID=sha256:d349e3fb84297015f17c91fe66982131e80725071a6b17136b2611a79adc8e01)
Adding buildpack paketo-buildpacks/apache-tomee@1.10.4 (diffID=sha256:f191156d41843410955b5179b6a3e3c901071508de198c374615657bf52eab72)
Adding buildpack paketo-buildpacks/bellsoft-liberica@11.0.0 (diffID=sha256:5284b00f5c9ab0322e475e583a22bf213ad2db4a1c1521aebf4f2b81f35a0ced)
Adding buildpack paketo-buildpacks/ca-certificates@3.8.6 (diffID=sha256:28366995b50965c3a6f6372364164e8c7ce9c9bd347338366655f5b6ef6e27f1)
Adding buildpack paketo-buildpacks/dist-zip@5.8.5 (diffID=sha256:ae6c8e04a798306279e0a45ca4ef37085a6d8100ca5de6392e14b4db244e36b5)
Adding buildpack paketo-buildpacks/executable-jar@6.11.3 (diffID=sha256:d2ee17f7e17e9b5445c7937a1e93155941be074dd1c44f7ba17453417a5a6638)
Adding buildpack paketo-buildpacks/gradle@7.14.1 (diffID=sha256:40acfa1c78c3d05026a07e0121d3b138b3ed89dec91e9822bc2367810ea92684)
Adding buildpack paketo-buildpacks/liberty@4.3.1 (diffID=sha256:9ef92a11561786eb7ea953d2ed2b520f6a5bde38874b9111e81a4c59aef49a50)
Adding buildpack paketo-buildpacks/node-engine@4.1.15 (diffID=sha256:da574711d02d5de53fcb55ff27072b78aa82d74140f78ba8454209f40955b1c8)
Adding buildpack paketo-buildpacks/spring-boot@5.31.2 (diffID=sha256:a103fa55f76a52b19cf9aea19296144bb02a8fd68205d082e3060099c8322275)
Adding buildpack paketo-buildpacks/syft@2.4.0 (diffID=sha256:d9b7ef9b47df2807a3889f330e4b6b483103b5d74874b9ab9a0548472a2dce4a)
Provided Environment Variables
BP_JAVA_INSTALL_NODE=true
BP_NODE_PROJECT_PATH=frontend
Using build cache volume pack-cache-library_samples-java-gradle-node_latest-b4f581e93769.build
Build cache pack-cache-library_samples-java-gradle-node_latest-b4f581e93769.build cleared
Created ephemeral bridge network pack.local-network-697062656d7069716a65 with ID aec571dae921235cd8277a014a805aedf4c8e23f437f96066c8324bc41641050
===> ANALYZING
Running the analyzer on OS linux from image pack.local/lifecycle/666578616464616d6b70:latest with:
Container Settings:
Args: /cnb/lifecycle/analyzer -log-level debug -daemon -run /layers/run.toml -run-image index.docker.io/paketobuildpacks/run-jammy-base:latest -launch-cache /launch-cache -skip-layers samples-java-gradle-node
System Envs: CNB_USER_ID=1001 CNB_GROUP_ID=1000 CNB_PLATFORM_API=0.13
Image: pack.local/lifecycle/666578616464616d6b70:latest
User: root
Labels: map[author:pack]
Host Settings:
Binds: /var/run/docker.sock:/var/run/docker.sock pack-cache-library_samples-java-gradle-node_latest-b4f581e93769.launch:/launch-cache pack-layers-ozimqojbxa:/layers pack-app-qqvwintpjd:/workspace
Network Mode: pack.local-network-697062656d7069716a65
[analyzer] Starting analyzer...
[analyzer] Parsing inputs...
[analyzer] Ensuring privileges...
[analyzer] Executing command...
[analyzer] Timer: Analyzer started at 2024-11-05T20:06:50Z
[analyzer] Found image with identifier "5910f934ceac9a45131337597f23a27839b7d61f0c33c78e92375924191e225b"
[analyzer] Found image with identifier "ae6a328f29da50c499acac265e2db256c9e2e2998cf74e0a7972239755dfb667"
[analyzer] Timer: Analyzer ran for 931.125µs and ended at 2024-11-05T20:06:50Z
[analyzer] Run image info in analyzed metadata is:
[analyzer] {"Reference":"ae6a328f29da50c499acac265e2db256c9e2e2998cf74e0a7972239755dfb667","Image":"index.docker.io/paketobuildpacks/run-jammy-base:latest","Extend":false,"target":{"os":"linux","arch":"amd64"}}
===> DETECTING
Running the detector on OS linux from image pack.local/builder/746e6a716e7165697572:latest with:
Container Settings:
Args: /cnb/lifecycle/detector -app /workspace -log-level debug
System Envs: CNB_PLATFORM_API=0.13
Image: pack.local/builder/746e6a716e7165697572:latest
User:
Labels: map[author:pack]
Host Settings:
Binds: pack-layers-ozimqojbxa:/layers pack-app-qqvwintpjd:/workspace
Network Mode: pack.local-network-697062656d7069716a65
[detector] Starting detector...
[detector] Parsing inputs...
[detector] Ensuring privileges...
[detector] Executing command...
[detector] Timer: Detector started at 2024-11-05T20:06:50Z
[detector] Checking for match against descriptor: {linux amd64 []}
[detector] target distro name/version labels not found, reading /etc/os-release file
[detector] Checking for match against descriptor: {linux amd64 []}
[detector] Checking for match against descriptor: { []}
[detector] Checking for match against descriptor: {linux amd64 []}
[detector] Checking for match against descriptor: {linux amd64 []}
[detector] Checking for match against descriptor: {linux amd64 []}
[detector] Checking for match against descriptor: {linux amd64 []}
[detector] Checking for match against descriptor: {linux amd64 []}
[detector] Checking for match against descriptor: {linux amd64 []}
[detector] Checking for match against descriptor: {linux amd64 []}
[detector] Checking for match against descriptor: {linux amd64 []}
[detector] ======== Output: paketo-buildpacks/gradle@7.14.1 ========
[detector] Build Configuration:
[detector] $BP_EXCLUDE_FILES colon separated list of glob patterns, matched source files are removed
[detector] $BP_GRADLE_ADDITIONAL_BUILD_ARGUMENTS the additionnal arguments (appended to BP_GRADLE_BUILD_ARGUMENTS) to pass to Gradle
[detector] $BP_GRADLE_BUILD_ARGUMENTS --no-daemon -Dorg.gradle.welcome=never assemble the arguments to pass to Gradle
[detector] $BP_GRADLE_BUILD_FILE the location of the main build config file, relative to the application root
[detector] $BP_GRADLE_BUILT_ARTIFACT build/libs/*.[jw]ar the built application artifact explicitly. Supersedes $BP_GRADLE_BUILT_MODULE
[detector] $BP_GRADLE_BUILT_MODULE the module to find application artifact in
[detector] $BP_GRADLE_INIT_SCRIPT_PATH the path to a Gradle init script file
[detector] $BP_INCLUDE_FILES colon separated list of glob patterns, matched source files are included
[detector] $BP_JAVA_INSTALL_NODE true whether to install Yarn/Node binaries based on the presence of a package.json or yarn.lock file
[detector] $BP_NODE_PROJECT_PATH frontend configure a project subdirectory to look for `package.json` and `yarn.lock` files
[detector] ======== Output: paketo-buildpacks/executable-jar@6.11.3 ========
[detector] Build Configuration:
[detector] $BP_EXECUTABLE_JAR_LOCATION a glob specifying which jar files should be used
[detector] $BP_LIVE_RELOAD_ENABLED false enable live process reload in the image
[detector] ======== Output: paketo-buildpacks/apache-tomcat@8.2.2 ========
[detector] Build Configuration:
[detector] $BP_JAVA_APP_SERVER the application server to use
[detector] $BP_TOMCAT_CONTEXT_PATH the application context path
[detector] $BP_TOMCAT_ENV_PROPERTY_SOURCE_DISABLED false Disable Tomcat's EnvironmentPropertySource
[detector] $BP_TOMCAT_EXT_CONF_SHA256 the SHA256 hash of the external Tomcat configuration archive
[detector] $BP_TOMCAT_EXT_CONF_STRIP 0 the number of directory components to strip from the external Tomcat configuration archive
[detector] $BP_TOMCAT_EXT_CONF_URI the download location of the external Tomcat configuration
[detector] $BP_TOMCAT_EXT_CONF_VERSION the version of the external Tomcat configuration
[detector] $BP_TOMCAT_VERSION 9.* the Tomcat version
[detector] Launch Configuration:
[detector] $BPL_TOMCAT_ACCESS_LOGGING_ENABLED the Tomcat access logging state
[detector] PASSED: a WEB-INF directory was not found, this is normal when building from source
[detector] ======== Output: paketo-buildpacks/apache-tomee@1.10.4 ========
[detector] Build Configuration:
[detector] $BP_JAVA_APP_SERVER the application server to use
[detector] $BP_TOMEE_CONTEXT_PATH the application context path
[detector] $BP_TOMEE_DISTRIBUTION microprofile the Tomee distribution
[detector] $BP_TOMEE_ENV_PROPERTY_SOURCE_DISABLED false Disable Tomcat's EnvironmentPropertySource
[detector] $BP_TOMEE_EXT_CONF_SHA256 the SHA256 hash of the external Tomee configuration archive
[detector] $BP_TOMEE_EXT_CONF_STRIP 0 the number of directory components to strip from the external Tomee configuration archive
[detector] $BP_TOMEE_EXT_CONF_URI the download location of the external Tomee configuration
[detector] $BP_TOMEE_EXT_CONF_VERSION the version of the external Tomee configuration
[detector] $BP_TOMEE_VERSION 8.* the Tomee version
[detector] Launch Configuration:
[detector] $BPL_TOMEE_ACCESS_LOGGING_ENABLED the Tomee access logging state
[detector] PASSED: a WEB-INF directory was not found, this is normal when building from source
[detector] ======== Results ========
[detector] pass: paketo-buildpacks/ca-certificates@3.8.6
[detector] pass: paketo-buildpacks/bellsoft-liberica@11.0.0
[detector] pass: paketo-buildpacks/node-engine@4.1.15
[detector] pass: paketo-buildpacks/syft@2.4.0
[detector] pass: paketo-buildpacks/gradle@7.14.1
[detector] pass: paketo-buildpacks/executable-jar@6.11.3
[detector] pass: paketo-buildpacks/apache-tomcat@8.2.2
[detector] pass: paketo-buildpacks/apache-tomee@1.10.4
[detector] pass: paketo-buildpacks/liberty@4.3.1
[detector] pass: paketo-buildpacks/dist-zip@5.8.5
[detector] pass: paketo-buildpacks/spring-boot@5.31.2
[detector] Resolving plan... (try #1)
[detector] fail: paketo-buildpacks/bellsoft-liberica@11.0.0 provides unused native-image-builder
[detector] Resolving plan... (try #2)
[detector] fail: paketo-buildpacks/ca-certificates@3.8.6 provides unused ca-certificates
[detector] Resolving plan... (try #3)
[detector] fail: paketo-buildpacks/executable-jar@6.11.3 requires jre
[detector] Resolving plan... (try #4)
[detector] fail: paketo-buildpacks/executable-jar@6.11.3 requires jre
[detector] Resolving plan... (try #5)
[detector] fail: paketo-buildpacks/ca-certificates@3.8.6 provides unused ca-certificates
[detector] Resolving plan... (try #6)
[detector] fail: paketo-buildpacks/node-engine@4.1.15 provides unused npm
[detector] Resolving plan... (try #7)
[detector] fail: paketo-buildpacks/executable-jar@6.11.3 requires jre
[detector] Resolving plan... (try #8)
[detector] fail: paketo-buildpacks/executable-jar@6.11.3 requires jre
[detector] Resolving plan... (try #9)
[detector] fail: paketo-buildpacks/gradle@7.14.1 requires jdk
[detector] Resolving plan... (try #10)
[detector] fail: paketo-buildpacks/gradle@7.14.1 requires jdk
[detector] Resolving plan... (try #11)
[detector] fail: paketo-buildpacks/bellsoft-liberica@11.0.0 provides unused native-image-builder
[detector] Resolving plan... (try #12)
[detector] fail: paketo-buildpacks/bellsoft-liberica@11.0.0 provides unused native-image-builder
[detector] Resolving plan... (try #13)
[detector] fail: paketo-buildpacks/executable-jar@6.11.3 requires jre
[detector] Resolving plan... (try #14)
[detector] fail: paketo-buildpacks/executable-jar@6.11.3 requires jre
[detector] Resolving plan... (try #15)
[detector] paketo-buildpacks/ca-certificates 3.8.6
[detector] paketo-buildpacks/bellsoft-liberica 11.0.0
[detector] paketo-buildpacks/node-engine 4.1.15
[detector] paketo-buildpacks/syft 2.4.0
[detector] paketo-buildpacks/gradle 7.14.1
[detector] paketo-buildpacks/executable-jar 6.11.3
[detector] paketo-buildpacks/apache-tomcat 8.2.2
[detector] paketo-buildpacks/apache-tomee 1.10.4
[detector] paketo-buildpacks/liberty 4.3.1
[detector] paketo-buildpacks/dist-zip 5.8.5
[detector] paketo-buildpacks/spring-boot 5.31.2
[detector] Timer: Detector ran for 150.813375ms and ended at 2024-11-05T20:06:50Z
===> RESTORING
Running the restorer on OS linux from image pack.local/lifecycle/666578616464616d6b70:latest with:
Container Settings:
Args: /cnb/lifecycle/restorer -skip-layers -cache-dir /cache -daemon -log-level debug
System Envs: CNB_USER_ID=1001 CNB_GROUP_ID=1000 CNB_PLATFORM_API=0.13
Image: pack.local/lifecycle/666578616464616d6b70:latest
User: root
Labels: map[author:pack]
Host Settings:
Binds: pack-cache-library_samples-java-gradle-node_latest-b4f581e93769.build:/cache /var/run/docker.sock:/var/run/docker.sock pack-layers-ozimqojbxa:/layers pack-app-qqvwintpjd:/workspace
Network Mode: pack.local-network-697062656d7069716a65
[restorer] Starting restorer...
[restorer] Parsing inputs...
[restorer] Ensuring privileges...
[restorer] Executing command...
[restorer] Run image info in analyzed metadata is:
[restorer] {"Reference":"ae6a328f29da50c499acac265e2db256c9e2e2998cf74e0a7972239755dfb667","Image":"index.docker.io/paketobuildpacks/run-jammy-base:latest","Extend":false,"target":{"os":"linux","arch":"amd64"}}
[restorer] Timer: Restorer started at 2024-11-05T20:06:50Z
[restorer] Restoring Layer Metadata
[restorer] Skipping buildpack layer analysis
[restorer] Reading Buildpack Layers directory /layers
[restorer] Reading buildpack directory: /layers/paketo-buildpacks_ca-certificates
[restorer] Reading Buildpack Layers directory /layers
[restorer] Reading buildpack directory: /layers/paketo-buildpacks_bellsoft-liberica
[restorer] Reading Buildpack Layers directory /layers
[restorer] Reading buildpack directory: /layers/paketo-buildpacks_node-engine
[restorer] Reading Buildpack Layers directory /layers
[restorer] Reading buildpack directory: /layers/paketo-buildpacks_syft
[restorer] Reading Buildpack Layers directory /layers
[restorer] Reading buildpack directory: /layers/paketo-buildpacks_gradle
[restorer] Reading Buildpack Layers directory /layers
[restorer] Reading buildpack directory: /layers/paketo-buildpacks_executable-jar
[restorer] Reading Buildpack Layers directory /layers
[restorer] Reading buildpack directory: /layers/paketo-buildpacks_apache-tomcat
[restorer] Reading Buildpack Layers directory /layers
[restorer] Reading buildpack directory: /layers/paketo-buildpacks_apache-tomee
[restorer] Reading Buildpack Layers directory /layers
[restorer] Reading buildpack directory: /layers/paketo-buildpacks_liberty
[restorer] Reading Buildpack Layers directory /layers
[restorer] Reading buildpack directory: /layers/paketo-buildpacks_dist-zip
[restorer] Reading Buildpack Layers directory /layers
[restorer] Reading buildpack directory: /layers/paketo-buildpacks_spring-boot
[restorer] Timer: Restorer ran for 1.082083ms and ended at 2024-11-05T20:06:50Z
===> BUILDING
Running the builder on OS linux from image pack.local/builder/746e6a716e7165697572:latest with:
Container Settings:
Args: /cnb/lifecycle/builder -app /workspace -log-level debug
System Envs: CNB_PLATFORM_API=0.13
Image: pack.local/builder/746e6a716e7165697572:latest
User:
Labels: map[author:pack]
Host Settings:
Binds: pack-layers-ozimqojbxa:/layers pack-app-qqvwintpjd:/workspace
Network Mode: pack.local-network-697062656d7069716a65
[builder] Starting builder...
[builder] Parsing inputs...
[builder] Ensuring privileges...
[builder] Executing command...
[builder] Timer: Builder started at 2024-11-05T20:06:51Z
[builder] target distro name/version labels not found, reading /etc/os-release file
[builder] Running build for buildpack paketo-buildpacks/ca-certificates@3.8.6
[builder] Looking up buildpack
[builder] Finding plan
[builder] Creating plan directory
[builder] Preparing paths
[builder] Running build command
[builder]
[builder] Paketo Buildpack for CA Certificates 3.8.6
[builder] https://github.com/paketo-buildpacks/ca-certificates
[builder] Build Configuration:
[builder] $BP_EMBED_CERTS false Embed certificates into the image
[builder] $BP_ENABLE_RUNTIME_CERT_BINDING true Deprecated: Enable/disable certificate helper layer to add certs at runtime
[builder] $BP_RUNTIME_CERT_BINDING_DISABLED false Disable certificate helper layer to add certs at runtime
[builder] Launch Helper: Contributing to layer
[builder] Creating /layers/paketo-buildpacks_ca-certificates/helper/exec.d/ca-certificates-helper
[builder] Processing layers
[builder] Updating environment
[builder] Reading output files
[builder] Updating buildpack processes
[builder] Updating process list
[builder] Finished running build for buildpack paketo-buildpacks/ca-certificates@3.8.6
[builder] Running build for buildpack paketo-buildpacks/bellsoft-liberica@11.0.0
[builder] Looking up buildpack
[builder] Finding plan
[builder] Creating plan directory
[builder] Preparing paths
[builder] Running build command
[builder]
[builder] Paketo Buildpack for BellSoft Liberica 11.0.0
[builder] https://github.com/paketo-buildpacks/bellsoft-liberica
[builder] Build Configuration:
[builder] $BP_JVM_JLINK_ARGS --no-man-pages --no-header-files --strip-debug --compress=1 configure custom link arguments (--output must be omitted)
[builder] $BP_JVM_JLINK_ENABLED false enables running jlink tool to generate custom JRE
[builder] $BP_JVM_TYPE JRE the JVM type - JDK or JRE
[builder] $BP_JVM_VERSION 21 the Java version
[builder] Launch Configuration:
[builder] $BPL_DEBUG_ENABLED false enables Java remote debugging support
[builder] $BPL_DEBUG_PORT 8000 configure the remote debugging port
[builder] $BPL_DEBUG_SUSPEND false configure whether to suspend execution until a debugger has attached
[builder] $BPL_HEAP_DUMP_PATH write heap dumps on error to this path
[builder] $BPL_JAVA_NMT_ENABLED true enables Java Native Memory Tracking (NMT)
[builder] $BPL_JAVA_NMT_LEVEL summary configure level of NMT, summary or detail
[builder] $BPL_JFR_ARGS configure custom Java Flight Recording (JFR) arguments
[builder] $BPL_JFR_ENABLED false enables Java Flight Recording (JFR)
[builder] $BPL_JMX_ENABLED false enables Java Management Extensions (JMX)
[builder] $BPL_JMX_PORT 5000 configure the JMX port
[builder] $BPL_JVM_HEAD_ROOM 0 the headroom in memory calculation
[builder] $BPL_JVM_LOADED_CLASS_COUNT 35% of classes the number of loaded classes in memory calculation
[builder] $BPL_JVM_THREAD_COUNT 250 the number of threads in memory calculation
[builder] $JAVA_TOOL_OPTIONS the JVM launch flags
[builder] Using buildpack default Java version 21
[builder] BellSoft Liberica JDK 21.0.5: Contributing to layer
[builder] Downloading from https://github.com/bell-sw/Liberica/releases/download/21.0.5+11/bellsoft-jdk21.0.5+11-linux-amd64.tar.gz
[builder] Verifying checksum
[builder] Expanding to /layers/paketo-buildpacks_bellsoft-liberica/jdk
[builder] Adding 146 container CA certificates to JVM truststore
[builder] Writing env.build/JAVA_HOME.override
[builder] Writing env.build/JDK_HOME.override
[builder] BellSoft Liberica JRE 21.0.5: Contributing to layer
[builder] Downloading from https://github.com/bell-sw/Liberica/releases/download/21.0.5+11/bellsoft-jre21.0.5+11-linux-amd64.tar.gz
[builder] Verifying checksum
[builder] Expanding to /layers/paketo-buildpacks_bellsoft-liberica/jre
[builder] Adding 146 container CA certificates to JVM truststore
[builder] Writing env.launch/BPI_APPLICATION_PATH.default
[builder] Writing env.launch/BPI_JVM_CACERTS.default
[builder] Writing env.launch/BPI_JVM_CLASS_COUNT.default
[builder] Writing env.launch/BPI_JVM_SECURITY_PROVIDERS.default
[builder] Writing env.launch/JAVA_HOME.default
[builder] Writing env.launch/JAVA_TOOL_OPTIONS.append
[builder] Writing env.launch/JAVA_TOOL_OPTIONS.delim
[builder] Writing env.launch/MALLOC_ARENA_MAX.default
[builder] Launch Helper: Contributing to layer
[builder] Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/java-opts
[builder] Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/jvm-heap
[builder] Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/link-local-dns
[builder] Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/memory-calculator
[builder] Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/security-providers-configurer
[builder] Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/jmx
[builder] Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/jfr
[builder] Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/openssl-certificate-loader
[builder] Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/security-providers-classpath-9
[builder] Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/debug-9
[builder] Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/nmt
[builder] Java Security Properties: Contributing to layer
[builder] Writing env.launch/JAVA_SECURITY_PROPERTIES.default
[builder] Writing env.launch/JAVA_TOOL_OPTIONS.append
[builder] Writing env.launch/JAVA_TOOL_OPTIONS.delim
[builder] Processing layers
[builder] Updating environment
[builder] Reading output files
[builder] Updating buildpack processes
[builder] Updating process list
[builder] Finished running build for buildpack paketo-buildpacks/bellsoft-liberica@11.0.0
[builder] Running build for buildpack paketo-buildpacks/node-engine@4.1.15
[builder] Looking up buildpack
[builder] Finding plan
[builder] Creating plan directory
[builder] Preparing paths
[builder] Running build command
[builder] Paketo Buildpack for Node Engine 4.1.15
[builder] Resolving Node Engine version
[builder] Candidate version sources (in priority order):
[builder] <unknown> -> ""
[builder]
[builder] Selected Node Engine version (using <unknown>): 20.15.0
[builder]
[builder] Executing build process
[builder] Installing Node Engine 20.15.0
[builder] Completed in 4.822s
[builder]
[builder] Generating SBOM for /layers/paketo-buildpacks_node-engine/node
[builder] Completed in 1ms
[builder]
[builder] Configuring build environment
[builder] NODE_ENV -> "production"
[builder] NODE_HOME -> "/layers/paketo-buildpacks_node-engine/node"
[builder] NODE_OPTIONS -> "--use-openssl-ca"
[builder] NODE_VERBOSE -> "false"
[builder]
[builder] Configuring launch environment
[builder] NODE_ENV -> "production"
[builder] NODE_HOME -> "/layers/paketo-buildpacks_node-engine/node"
[builder] NODE_OPTIONS -> "--use-openssl-ca"
[builder] NODE_VERBOSE -> "false"
[builder]
[builder] Writing exec.d/0-optimize-memory
[builder] Calculates available memory based on container limits at launch time.
[builder] Made available in the MEMORY_AVAILABLE environment variable.
[builder] Writing exec.d/1-inspector
[builder]
[builder] Processing layers
[builder] Updating environment
[builder] Reading output files
[builder] Updating buildpack processes
[builder] Updating process list
[builder] Finished running build for buildpack paketo-buildpacks/node-engine@4.1.15
[builder] Running build for buildpack paketo-buildpacks/syft@2.4.0
[builder] Looking up buildpack
[builder] Finding plan
[builder] Creating plan directory
[builder] Preparing paths
[builder] Running build command
[builder]
[builder] Paketo Buildpack for Syft 2.4.0
[builder] https://github.com/paketo-buildpacks/syft
[builder] Downloading from https://github.com/anchore/syft/releases/download/v1.15.0/syft_1.15.0_linux_amd64.tar.gz
[builder] Verifying checksum
[builder] Writing env.build/SYFT_CHECK_FOR_APP_UPDATE.default
[builder] Processing layers
[builder] Updating environment
[builder] Reading output files
[builder] Updating buildpack processes
[builder] Updating process list
[builder] Finished running build for buildpack paketo-buildpacks/syft@2.4.0
[builder] Running build for buildpack paketo-buildpacks/gradle@7.14.1
[builder] Looking up buildpack
[builder] Finding plan
[builder] Creating plan directory
[builder] Preparing paths
[builder] Running build command
[builder]
[builder] Paketo Buildpack for Gradle 7.14.1
[builder] https://github.com/paketo-buildpacks/gradle
[builder] Build Configuration:
[builder] $BP_EXCLUDE_FILES colon separated list of glob patterns, matched source files are removed
[builder] $BP_GRADLE_ADDITIONAL_BUILD_ARGUMENTS the additionnal arguments (appended to BP_GRADLE_BUILD_ARGUMENTS) to pass to Gradle
[builder] $BP_GRADLE_BUILD_ARGUMENTS --no-daemon -Dorg.gradle.welcome=never assemble the arguments to pass to Gradle
[builder] $BP_GRADLE_BUILD_FILE the location of the main build config file, relative to the application root
[builder] $BP_GRADLE_BUILT_ARTIFACT build/libs/*.[jw]ar the built application artifact explicitly. Supersedes $BP_GRADLE_BUILT_MODULE
[builder] $BP_GRADLE_BUILT_MODULE the module to find application artifact in
[builder] $BP_GRADLE_INIT_SCRIPT_PATH the path to a Gradle init script file
[builder] $BP_INCLUDE_FILES colon separated list of glob patterns, matched source files are included
[builder] $BP_JAVA_INSTALL_NODE true whether to install Yarn/Node binaries based on the presence of a package.json or yarn.lock file
[builder] $BP_NODE_PROJECT_PATH frontend configure a project subdirectory to look for `package.json` and `yarn.lock` files
[builder] Creating cache directory /home/cnb/.gradle
[builder] Compiled Application: Contributing to layer
[builder] Executing gradlew --no-daemon -Dorg.gradle.welcome=never assemble
[builder] Downloading https://services.gradle.org/distributions/gradle-7.6.2-bin.zip
[builder] ...........10%............20%...........30%............40%............50%...........60%............70%............80%...........90%............100%
[builder] To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.6.2/userguide/gradle_daemon.html#sec:disabling_the_daemon.
[builder] Daemon will be stopped at the end of the build
[builder]
[builder] FAILURE: Build failed with an exception.
[builder]
[builder] * What went wrong:
[builder] Could not open settings generic class cache for settings file '/workspace/settings.gradle' (/layers/paketo-buildpacks_gradle/cache/caches/7.6.2/scripts/du273tef1w9pufb5v7fbzfca5).
[builder] > BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 65
[builder]
[builder] * Try:
[builder] > Run with --stacktrace option to get the stack trace.
[builder] > Run with --info or --debug option to get more log output.
[builder] > Run with --scan to get full insights.
[builder]
[builder] * Get more help at https://help.gradle.org
[builder]
[builder] BUILD FAILED in 14s
[builder] unable to invoke layer creator
[builder] unable to contribute application layer
[builder] error running build
[builder] exit status 1
[builder] Timer: Builder ran for 47.430579522s and ended at 2024-11-05T20:07:38Z
[builder] ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51
I then upgraded gradle in the gradle-wrapper.properties
file to distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
and it failed with a different error.
[builder] Paketo Buildpack for Gradle 7.14.1
[builder] https://github.com/paketo-buildpacks/gradle
[builder] Build Configuration:
[builder] $BP_EXCLUDE_FILES colon separated list of glob patterns, matched source files are removed
[builder] $BP_GRADLE_ADDITIONAL_BUILD_ARGUMENTS the additionnal arguments (appended to BP_GRADLE_BUILD_ARGUMENTS) to pass to Gradle
[builder] $BP_GRADLE_BUILD_ARGUMENTS --no-daemon -Dorg.gradle.welcome=never assemble the arguments to pass to Gradle
[builder] $BP_GRADLE_BUILD_FILE the location of the main build config file, relative to the application root
[builder] $BP_GRADLE_BUILT_ARTIFACT build/libs/*.[jw]ar the built application artifact explicitly. Supersedes $BP_GRADLE_BUILT_MODULE
[builder] $BP_GRADLE_BUILT_MODULE the module to find application artifact in
[builder] $BP_GRADLE_INIT_SCRIPT_PATH the path to a Gradle init script file
[builder] $BP_INCLUDE_FILES colon separated list of glob patterns, matched source files are included
[builder] $BP_JAVA_INSTALL_NODE true whether to install Yarn/Node binaries based on the presence of a package.json or yarn.lock file
[builder] $BP_NODE_PROJECT_PATH frontend configure a project subdirectory to look for `package.json` and `yarn.lock` files
[builder] Creating cache directory /home/cnb/.gradle
[builder] Compiled Application: Contributing to layer
[builder] Executing gradlew --no-daemon -Dorg.gradle.welcome=never assemble
[builder] Downloading https://services.gradle.org/distributions/gradle-8.10.2-bin.zip
[builder] .............10%.............20%.............30%.............40%.............50%.............60%.............70%.............80%.............90%.............100%
[builder] To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
[builder] Daemon will be stopped at the end of the build
[builder] > Task :compileJava
[builder] > Task :processResources
[builder] > Task :classes
[builder] Caught exception: Couldn't poll for events, error = 4
[builder] Error while receiving file changes
[builder] net.rubygrapefruit.platform.NativeException: Couldn't poll for events, error = 4
[builder] at net.rubygrapefruit.platform.internal.jni.AbstractNativeFileEventFunctions$NativeFileWatcher.executeRunLoop0(Native Method)
[builder] at net.rubygrapefruit.platform.internal.jni.AbstractNativeFileEventFunctions$NativeFileWatcher.executeRunLoop(AbstractNativeFileEventFunctions.java:42)
[builder] at net.rubygrapefruit.platform.internal.jni.AbstractFileEventFunctions$AbstractFileWatcher$1.run(AbstractFileEventFunctions.java:154)
[builder]
[builder] > Task :installFrontend
[builder]
[builder] npm notice
[builder] npm notice New minor version of npm available! 10.7.0 -> 10.9.0
[builder] added 12 packages, and audited 13 packages in 2s
[builder] npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.9.0
[builder]
[builder] npm notice To update run: npm install -g npm@10.9.0
[builder] 3 packages are looking for funding
[builder] npm notice
[builder] run `npm fund` for details
[builder]
[builder] found 0 vulnerabilities
[builder]
[builder] > Task :buildFrontend
[builder]
[builder] > example@0.0.1 build
[builder] > vite build
[builder]
[builder] vite v5.4.10 building for production...
[builder] transforming...
[builder] ✓ 7 modules transformed.
[builder] rendering chunks...
[builder] computing gzip size...
[builder] dist/index.html 0.26 kB │ gzip: 0.21 kB
[builder] dist/assets/index-DB3lBFB-.js 88.71 kB │ gzip: 31.90 kB
[builder] ✓ built in 1.02s
[builder]
[builder] > Task :copyFrontend
[builder] copied built frontend to static resources
[builder]
[builder] > Task :resolveMainClassName FAILED
[builder]
[builder] FAILURE: Build failed with an exception.
[builder]
[builder] * What went wrong:
[builder] A problem was found with the configuration of task ':resolveMainClassName' (type 'ResolveMainClassName').
[builder] - Gradle detected a problem with the following location: '/workspace/build/resources/main'.
[builder]
[builder] Reason: Task ':resolveMainClassName' uses this output of task ':copyFrontend' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
[builder]
[builder] Possible solutions:
[builder] 1. Declare task ':copyFrontend' as an input of ':resolveMainClassName'.
[builder] 2. Declare an explicit dependency on ':copyFrontend' from ':resolveMainClassName' using Task#dependsOn.
[builder] 3. Declare an explicit dependency on ':copyFrontend' from ':resolveMainClassName' using Task#mustRunAfter.
[builder]
[builder] For more information, please refer to https://docs.gradle.org/8.10.2/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
[builder]
[builder] * Try:
[builder] > Run with --stacktrace option to get the stack trace.
[builder] > Run with --info or --debug option to get more log output.
[builder] > Run with --scan to get full insights.
[builder] > Get more help at https://help.gradle.org.
[builder]
[builder] Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
[builder]
[builder] You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
[builder]
[builder] For more on this, please refer to https://docs.gradle.org/8.10.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
[builder]
[builder] BUILD FAILED in 1m 5s
[builder] 6 actionable tasks: 6 executed
[builder] unable to invoke layer creator
[builder] unable to contribute application layer
[builder] error running build
[builder] exit status 1
[builder] Timer: Builder ran for 1m48.550529007s and ended at 2024-11-05T20:20:49Z
[builder] ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51
I haven't tried to get it running on Java 21/Gradle 8, but it sounds like the tasks that we have in that sample are not configured correctly under Gradle 8. I'd need to look into that more, or perhaps @anthonydahanne might know what needs changed there. We should probably remove the Gradle deprecated features as well so that we're positioned well for Gradle 9 too (there's a comment saying that we are not ready).
Expected Behavior
The
java/java-node/gradle-node
sample should build out of the box.Current Behavior
The release of
paketo-buildpacks/bellsoft-liberica:v11.0.0
includes an upgrade ofBP_JVM_VERSION
from 17 to 21. This breaks thejava/java-node/gradle-node
sample.Possible Solution
I'm not sure why the change to JVM 21 would break this sample.
Steps to Reproduce
See below for the error when using bellsoft v11.0.0 with default JVM 21.
Motivations