Upgrade to Native Build Tools 0.9.7.1 #1206
Upgrade to Native Build Tools 0.9.7.1 #1206
Conversation
This commit upgrades the spring-aot-gradle-plugin and all Maven based sample apps to Native Build Tools (NBT) 0.9.7.1 NBT 0.9.6 requires JUnit Platform 1.8 (JUnit 5.8) due to its dependency on the UniqueIdTrackingListener in the junit-platform-launcher artifact. The Maven sample apps are currently based on Spring Boot 2.6 RC1 which uses JUnit 5.8.1 (JUnit Platform 1.8.1). Thus, there is no conflict between the JUnit version used in the sample apps and the version used by NBT. However, there is an issue regarding Maven Surefire. Maven Surefire 3.0.0-M4 introduced support for automatically aligning the JUnit Platform version used by Surefire with the version needed by the user's configured version of JUnit Jupiter. Since we are not using Surefire 3.0 milestones, the parent POM for the Maven sample apps has to explicitly declare a dependency on the correct version of the junit-platform-launcher in order to make the UniqueIdTrackingListener available for Native Build Tools 0.9.6 and higher. The actual version of the junit-platform-launcher is managed by the junit-bom that is imported by the spring-boot-starter-parent. Closes spring-atticgh-1202
This commit effectively reverts 947bd7d, since the JUnitPlatformFeature in the Native Build Tools project already configures the JUnit Platform TestIdentifier for build-time initialization. See spring-atticgh-1202
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please also update the documentation accordingly (version, Maven configuration)?
I will do the polish myself in order to be able to run a CI full build tonight. |
OK. Thanks! |
Regarding the Maven configuration, I think we should probably add a note to the user documentation similar to the following comment: Otherwise, Spring Boot users will be confused when the Native Build Tools Maven plugin fails to find the "unique ID files" that should be generated by the There should eventually be a note the NBT documentation (see graalvm/native-build-tools#151), but users might fail to see that. @sdeleuze, what do you think? |
@sbrannen Good point indeed, could you please update https://github.com/spring-projects-experimental/spring-native/blob/main/spring-native-docs/src/main/asciidoc/getting-started-native-build-tools.adoc accordingly? |
See #1202 for background information.
This PR upgrades the
spring-aot-gradle-plugin
and all Maven based sample apps to Native Build Tools (NBT) 0.9.7.1NBT 0.9.6 requires JUnit Platform 1.8 (JUnit 5.8) due to its dependency on the
UniqueIdTrackingListener
in thejunit-platform-launcher
artifact. The Maven sample apps are currently based on Spring Boot 2.6 RC1 which uses JUnit 5.8.1 (JUnit Platform 1.8.1). Thus, there is no conflict between the JUnit version used in the sample apps and the version used by NBT.However, there is an issue regarding Maven Surefire.
Maven Surefire 3.0.0-M4 introduced support for automatically aligning the JUnit Platform version used by Surefire with the version needed by the user's configured version of JUnit Jupiter. Since we are not using Surefire 3.0 milestones, the parent POM for the Maven sample apps has to explicitly declare a dependency on the correct version of the
junit-platform-launcher
in order to make theUniqueIdTrackingListener
available for Native Build Tools 0.9.6 and higher. The actual version of thejunit-platform-launcher
is managed by the junit-bom that is imported by thespring-boot-starter-parent
.This PR also removes build-time initialization for
org.junit.platform.launcher.TestIdentifier
, since that is already handled by theJUnitPlatformFeature
in the Native Build Tools (starting with version 0.9.6).