Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit b19e11e

Browse files
committed
Skip Maven AOT test sources generation when tests are skipped
Closes gh-1461
1 parent 9070c1c commit b19e11e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spring-aot-maven-plugin/src/main/java/org/springframework/aot/maven/TestGenerateMojo.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,13 @@ public void execute() throws MojoExecutionException, MojoFailureException {
7777
Files.delete(springProperties);
7878
}
7979

80+
if ("true".equals(System.getProperty("skipTests")) || "true".equals(System.getProperty("maven.test.skip"))) {
81+
getLog().info("Skip Spring AOT test generation since tests are skipped");
82+
return;
83+
}
84+
8085
if ("false".equals(System.getProperty("springAot"))) {
81-
getLog().info("Skip Spring AOT test generation and execution since disabled with -DspringAot=false");
86+
getLog().info("Skip Spring AOT test generation since disabled with -DspringAot=false");
8287
return;
8388
}
8489

0 commit comments

Comments
 (0)