Skip to content

Commit 644f2f8

Browse files
maven-plugin aot test mojo: process aot when tests are built but not run
Currently, it is not possible to build the tests (with aot processing) without running them. Maven provides two different configuration switches: * skipTests builds, but does not run, tests * maven.test.skip neither builds nor runs tests Right now the spring boot aot processing will skip aot in both cases. However, there's reasons to build but not run tests: in particular, this breaks reproducible builds because the main run (with tests) has the aot classes built, but then the reproducer run (skip running tests) does not, leading to different jars. In the case where tests are built but not run, we should still do AOT processing.
1 parent 0454b08 commit 644f2f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build-plugin/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/ProcessTestAotMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ protected void executeAot() throws Exception {
124124
getLog().debug("process-test-aot goal could not be applied to pom project.");
125125
return;
126126
}
127-
if (Boolean.getBoolean("skipTests") || Boolean.getBoolean("maven.test.skip")) {
127+
if (Boolean.getBoolean("maven.test.skip")) {
128128
getLog().info("Skipping AOT test processing since tests are skipped");
129129
return;
130130
}

0 commit comments

Comments
 (0)