question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Refine documentation for bootBuildImage and use the additive form for lists and maps

See original GitHub issue

Hello,

i have the normal vanilla Spring Boot 3.0.0-RC1 with only org.graalvm.buildtools.native as extra plugin. You can download it from here Spring Initializr

When i try to build with gradlew bootBuildImage with buildpacks and environment it gives me an error.

Running creator
    [creator]     Restoring data for SBOM from previous image 
    [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: no buildpacks participating

My bootBuildImage task is configured in build.gradle:

tasks.named('bootBuildImage') {
    builder = 'docker.io/paketobuildpacks/builder:tiny'
    runImage = 'docker.io/paketobuildpacks/run:tiny-cnb'
    buildpacks = ['gcr.io/paketo-buildpacks/bellsoft-liberica:9.9.0-ea', 'gcr.io/paketo-buildpacks/java-native-image']
    environment = [
            'BP_NATIVE_IMAGE_BUILD_ARGUMENTS': '--verbose'
    ]
}

The --verbose is only a test, i try to add a reflection-config.json to native image.

When i remove the environment part from task configuration everything is fine.

plugins {
    id 'org.springframework.boot' version '3.0.0-RC1'
    id 'io.spring.dependency-management' version '1.1.0'
    id 'org.graalvm.buildtools.native' version '0.9.16'
    id 'java'
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

repositories {
    mavenCentral()
    maven { url 'https://repo.spring.io/milestone' }
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
}

tasks.named('bootBuildImage') {
    builder = 'docker.io/paketobuildpacks/builder:tiny'
    runImage = 'docker.io/paketobuildpacks/run:tiny-cnb'
    buildpacks = ['gcr.io/paketo-buildpacks/bellsoft-liberica:9.9.0-ea', 'gcr.io/paketo-buildpacks/java-native-image']
    environment = [
            'BP_NATIVE_IMAGE_BUILD_ARGUMENTS': '--verbose'
    ]
}

tasks.named('test') {
    useJUnitPlatform()
}

Did i anything wrong? Can i not use environment and buildpacks in combination?

Thank you.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
bitbaggicommented, Oct 27, 2022

Yeah, thank you @wilkinsona

environment['BP_NATIVE_IMAGE_BUILD_ARGUMENTS'] = '--verbose' is working

0reactions
philwebbcommented, Nov 30, 2022

Closing in favor of PR #33424. Thanks @candrews!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Update instead of replace environment in bootBuildImage ...
Successfully merging this pull request may close these issues. Refine documentation for bootBuildImage and use the additive form for lists and maps. 3 ......
Read more >
Spring Boot Maven Plugin Documentation
It allows you to package executable jar or war archives, run Spring Boot applications, generate build information and start your Spring Boot ...
Read more >
Forms, Publications and Maps - PennDOT
Doc Num ↑ Title ⇵ Doc Type ⇵ Topic ⇵ AA‑600 Driver's Accident Report Form Maintenance & Operat... AV‑2 Application for Temporary Heliport License Form...
Read more >
MT-2 Application Forms and Instructions | FEMA.gov
MT-2 Application Forms and Instructions ... For all Letter of Map Revision, Conditional Letter of Map and Physical Map Revisions: For individual ...
Read more >
Introducing Smart Forms in ArcGIS Field Maps - Esri
Map authors can use the Field Maps web app, or the Map Viewer, to build forms that mobile workers use to collect data...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found