Update AOT work to latest Framework code
This commit is contained in:
@@ -39,7 +39,7 @@ public class AotGenerateTests {
|
||||
mavenBuild.project("aot").goals("package").execute((project) -> {
|
||||
Path aotDirectory = project.toPath().resolve("target/spring-aot/main");
|
||||
assertThat(collectRelativeFileNames(aotDirectory.resolve("sources")))
|
||||
.containsOnly("org/test/SampleApplication__ApplicationContextInitializer.java");
|
||||
.contains("org/test/SampleApplication__ApplicationContextInitializer.java");
|
||||
assertThat(collectRelativeFileNames(aotDirectory.resolve("resources"))).containsOnly(
|
||||
"META-INF/native-image/org.springframework.boot.maven.it/aot/reflect-config.json",
|
||||
"META-INF/native-image/org.springframework.boot.maven.it/aot/native-image.properties");
|
||||
|
||||
@@ -73,6 +73,12 @@ public class AotGenerateMojo extends AbstractRunMojo {
|
||||
@Parameter(defaultValue = "${project.build.directory}/spring-aot/main/resources", required = true)
|
||||
private File generatedResources;
|
||||
|
||||
/**
|
||||
* Directory containing the generated classes.
|
||||
*/
|
||||
@Parameter(defaultValue = "${project.build.directory}/spring-aot/main/classes", required = true)
|
||||
private File generatedClasses;
|
||||
|
||||
@Override
|
||||
protected void run(File workingDirectory, String startClassName, Map<String, String> environmentVariables)
|
||||
throws MojoExecutionException, MojoFailureException {
|
||||
@@ -90,6 +96,7 @@ public class AotGenerateMojo extends AbstractRunMojo {
|
||||
private void deletePreviousAotAssets() {
|
||||
FileSystemUtils.deleteRecursively(this.generatedSources);
|
||||
FileSystemUtils.deleteRecursively(this.generatedResources);
|
||||
FileSystemUtils.deleteRecursively(this.generatedClasses);
|
||||
}
|
||||
|
||||
private void generateAotAssets(File workingDirectory, String startClassName,
|
||||
@@ -102,6 +109,7 @@ public class AotGenerateMojo extends AbstractRunMojo {
|
||||
args.add(startClassName);
|
||||
args.add(this.generatedSources.toString());
|
||||
args.add(this.generatedResources.toString());
|
||||
args.add(this.generatedClasses.toString());
|
||||
args.add(this.project.getGroupId());
|
||||
args.add(this.project.getArtifactId());
|
||||
addArgs(args);
|
||||
|
||||
Reference in New Issue
Block a user