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

Commit c07a40d

Browse files
committed
Do not apply AOT plugin on POM projects
1 parent 76154d6 commit c07a40d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

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

+4
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ public class GenerateMojo extends AbstractBootstrapMojo {
7575

7676
@Override
7777
public void execute() throws MojoExecutionException, MojoFailureException {
78+
if (this.project.getPackaging().equals("pom")) {
79+
getLog().debug("generate goal could not be applied to pom project.");
80+
return;
81+
}
7882
Set<Path> resourceFolders = new HashSet<>();
7983
for (Resource r : project.getResources()) {
8084
// TODO respect includes/excludes

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,10 @@ public class TestGenerateMojo extends AbstractBootstrapMojo {
6969

7070
@Override
7171
public void execute() throws MojoExecutionException, MojoFailureException {
72-
72+
if (this.project.getPackaging().equals("pom")) {
73+
getLog().debug("test-generate goal could not be applied to pom project.");
74+
return;
75+
}
7376
Path testOutputDirectory = Paths.get(project.getBuild().getTestOutputDirectory());
7477
if (Files.notExists(testOutputDirectory)) {
7578
getLog().info("Skip Spring AOT test generation since no test have been detected");

0 commit comments

Comments
 (0)