You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
spring-boot-system-tests/spring-boot-image-tests/src/systemTest/resources/org/springframework/boot/image/paketo/PaketoBuilderTests-nativeApp.gradle has this snippet:
'Spring-Boot-Native-Processed': 'true' shouldn't be necessary, because it is set by our NativeImagePluginAction. However, for reasons unclear to me, the NativeImagePluginAction isn't executed in this build, despite the NBT plugin in the plugins section.
When removing the .withPluginClasspath call in org.springframework.boot.testsupport.gradle.testkit.GradleBuild#prepareRunner, it works. No idea if that is a red herring or not.
The text was updated successfully, but these errors were encountered:
When spring-boot-gradle-plugin is using GradleRunner, it needs to be
configured with a custom plugin classpath to account for the fact
that our Gradle plugin is on the classpath of the system classloader
but some of the other plugins would only be available on a
Gradle-created classloader. This imbalance cause class loading
problems as code in spring-boot-gradle-plugin can't see types at
runtime that are only available on the Gradle-created classloader.
To overcome this, we need to configure the GradleRunner with a custom
plugin classpath that contains both spring-boot-gradle-plugin and all
of the other plugins that are used in its various integration tests.
Previously, this was done in GradleBuild that's used by both
spring-boot-gradle-plugin and spring-boot-image-tests. This caused
a problem as spring-boot-image-tests does not have the
above-described problem and trying to correct it did not work leaving
tests that use spring-boot-gradle-plugin unable to see other plugins
such that the native image plugin.
This commit reworks the customization of the plugin classpath so that
it's only done in spring-boot-gradle-plugin's integration tests.
Closesspring-projectsgh-42338
spring-boot-system-tests/spring-boot-image-tests/src/systemTest/resources/org/springframework/boot/image/paketo/PaketoBuilderTests-nativeApp.gradle
has this snippet:'Spring-Boot-Native-Processed': 'true'
shouldn't be necessary, because it is set by ourNativeImagePluginAction
. However, for reasons unclear to me, theNativeImagePluginAction
isn't executed in this build, despite the NBT plugin in the plugins section.When removing the
.withPluginClasspath
call inorg.springframework.boot.testsupport.gradle.testkit.GradleBuild#prepareRunner
, it works. No idea if that is a red herring or not.The text was updated successfully, but these errors were encountered: