Skip to content

Commit

Permalink
Introduce 'nativeTest' maven profile
Browse files Browse the repository at this point in the history
Update `spring-boot-start-parent` with a new `nativeTest` profile. When
active, this profile will trigger AOT processing of test code and call
the native build tools 'test' goal.

Closes spring-projectsgh-32383
  • Loading branch information
philwebb committed Sep 15, 2022
1 parent 41e0bbf commit d1e7c9b
Showing 1 changed file with 42 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@ publishing.publications.withType(MavenPublication) {
plugin {
delegate.groupId('org.graalvm.buildtools')
delegate.artifactId('native-maven-plugin')
configuration {
delegate.extensions('true')
}
delegate.extensions('true')
}
plugin {
delegate.groupId('io.github.git-commit-id')
Expand Down Expand Up @@ -233,6 +231,43 @@ publishing.publications.withType(MavenPublication) {
profiles {
profile {
delegate.id("native")
build {
plugins {
plugin {
delegate.groupId('org.springframework.boot')
delegate.artifactId('spring-boot-maven-plugin')
executions {
execution {
delegate.id('process-aot')
goals {
delegate.goal('process-aot')
}
}
}
}
plugin {
delegate.groupId('org.graalvm.buildtools')
delegate.artifactId('native-maven-plugin')
configuration {
delegate.classesDirectory('${project.build.outputDirectory}')
metadataRepository {
delegate.enabled('true')
}
}
executions {
execution {
delegate.id('native-build')
goals {
delegate.goal('build')
}
}
}
}
}
}
}
profile {
delegate.id("nativeTest")
delegate.dependencies {
dependency {
delegate.groupId('org.junit.platform')
Expand All @@ -246,18 +281,13 @@ publishing.publications.withType(MavenPublication) {
delegate.groupId('org.springframework.boot')
delegate.artifactId('spring-boot-maven-plugin')
executions {
execution {
delegate.id('process-aot')
goals {
delegate.goal('process-aot')
}
}
execution {
delegate.id('process-test-aot')
goals {
delegate.goal('process-test-aot')
}
} }
}
}
}
plugin {
delegate.groupId('org.graalvm.buildtools')
Expand All @@ -270,9 +300,9 @@ publishing.publications.withType(MavenPublication) {
}
executions {
execution {
delegate.id('native-build')
delegate.id('native-test')
goals {
delegate.goal('build')
delegate.goal('test')
}
}
}
Expand Down

0 comments on commit d1e7c9b

Please sign in to comment.