mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Merge pull request #35377 from ls-urs-keller
* gh-35377: Polish "Don't run process-aot or process-test-aot on reactor projects" Don't run process-aot or process-test-aot on reactor projects Closes gh-35377
This commit is contained in:
commit
7ac89a1cb7
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2012-2022 the original author or authors.
|
* Copyright 2012-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -88,6 +88,10 @@ public class ProcessAotMojo extends AbstractAotMojo {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void executeAot() throws Exception {
|
protected void executeAot() throws Exception {
|
||||||
|
if (this.project.getPackaging().equals("pom")) {
|
||||||
|
getLog().debug("process-aot goal could not be applied to pom project.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
String applicationClass = (this.mainClass != null) ? this.mainClass
|
String applicationClass = (this.mainClass != null) ? this.mainClass
|
||||||
: SpringBootApplicationClassFinder.findSingleClass(this.classesDirectory);
|
: SpringBootApplicationClassFinder.findSingleClass(this.classesDirectory);
|
||||||
URL[] classPath = getClassPath();
|
URL[] classPath = getClassPath();
|
||||||
|
@ -118,6 +118,10 @@ public class ProcessTestAotMojo extends AbstractAotMojo {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void executeAot() throws Exception {
|
protected void executeAot() throws Exception {
|
||||||
|
if (this.project.getPackaging().equals("pom")) {
|
||||||
|
getLog().debug("process-test-aot goal could not be applied to pom project.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (Boolean.getBoolean("skipTests") || Boolean.getBoolean("maven.test.skip")) {
|
if (Boolean.getBoolean("skipTests") || Boolean.getBoolean("maven.test.skip")) {
|
||||||
getLog().info("Skipping AOT test processing since tests are skipped");
|
getLog().info("Skipping AOT test processing since tests are skipped");
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user