Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contributes expanded classpath during native image builds #68

Merged
merged 2 commits into from
Mar 10, 2021

Conversation

ekcasey
Copy link
Member

@ekcasey ekcasey commented Mar 10, 2021

When building a native-image, contribute appends application classes and entries from classpath.idx to the build-time CLASSPATH.

In a JVM application the Spring Boot Loader would make these modifications to the classpath when the executable JAR
or WAR is launched. To set the classpath properly for a native-image build the buildpack must replicate this behavior.

Also some minor refactoring.

@ekcasey ekcasey added semver:minor A change requiring a minor version bump type:enhancement A general enhancement labels Mar 10, 2021
@ekcasey ekcasey requested a review from a team March 10, 2021 03:58
@ekcasey ekcasey force-pushed the native-image-classpath branch from 04fc208 to 82df8e3 Compare March 10, 2021 04:01
@ekcasey ekcasey changed the title Contributes exanded classpath during native image builds Contributes expanded classpath during native image builds Mar 10, 2021
ekcasey added a commit to paketo-buildpacks/native-image that referenced this pull request Mar 10, 2021
…-image-build

Removes Boot specific logic from the buildpack.
* Renames buildpack ID from paketo-buildpack/spring-boot-native-image to paketo-buildpacks/native-image-build
* Deprecates BP_BOOT_NATIVE_IMAGE_* config values in favor of BP_NATIVE_*
* Removes check for spring-native or spring-graalvm-native dependency
* Relies on upstream buildpacks to properly set CLASSPATH for boot JARs (see paketo-buildpacks/spring-boot#68)

Other changes:
* Requests native-image tool from paketo-buildpacks/graalvm using 'native-image-builder' plan entry (see paketo-buildpacks/graalvm#61)

Signed-off-by: Emily Casey <ecasey@vmware.com>
ekcasey added a commit to paketo-buildpacks/native-image that referenced this pull request Mar 10, 2021
…-image-build

Removes Boot specific logic from the buildpack.
* Renames buildpack ID from paketo-buildpack/spring-boot-native-image to paketo-buildpacks/native-image-build
* Deprecates BP_BOOT_NATIVE_IMAGE_* config values in favor of BP_NATIVE_*
* Removes check for spring-native or spring-graalvm-native dependency
* Relies on upstream buildpacks to properly set CLASSPATH for boot JARs (see paketo-buildpacks/spring-boot#68)

Other changes:
* Requests native-image tool from paketo-buildpacks/graalvm using 'native-image-builder' plan entry (see paketo-buildpacks/graalvm#61)

Signed-off-by: Emily Casey <ecasey@vmware.com>
@ekcasey ekcasey force-pushed the native-image-classpath branch from 82df8e3 to 23fa8f7 Compare March 10, 2021 15:15
Contribute appends application classes and entries from classpath.idx to the build time classpath.

In a JVM application the Spring Boot Loader would make these modifications to the classpath when the executable JAR
or WAR is launched. To set the classpath properly for a native-image build the buildpack must replicate this behavior.

Signed-off-by: Emily Casey <ecasey@vmware.com>
@ekcasey ekcasey force-pushed the native-image-classpath branch from 23fa8f7 to a62c08b Compare March 10, 2021 15:25
ekcasey added a commit to paketo-buildpacks/native-image that referenced this pull request Mar 10, 2021
…-image-build

Removes Boot specific logic from the buildpack.
* Renames buildpack ID from paketo-buildpack/spring-boot-native-image to paketo-buildpacks/native-image-build
* Deprecates BP_BOOT_NATIVE_IMAGE_* config values in favor of BP_NATIVE_*
* Removes check for spring-native or spring-graalvm-native dependency
* Relies on upstream buildpacks to properly set CLASSPATH for boot JARs (see paketo-buildpacks/spring-boot#68)

Other changes:
* Requests native-image tool from paketo-buildpacks/graalvm using 'native-image-builder' plan entry (see paketo-buildpacks/graalvm#61)

Signed-off-by: Emily Casey <ecasey@vmware.com>
@ekcasey ekcasey merged commit eb416ed into main Mar 10, 2021
@ekcasey ekcasey deleted the native-image-classpath branch March 10, 2021 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump type:enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant