CrazyHZM commented on code in PR #29:
URL: https://github.com/apache/dubbo-initializer/pull/29#discussion_r1427519723


##########
initializer-generator/src/main/java/org/apache/dubbo/initializer/generation/extension/build/maven/NativeMavenPluginCustomizer.java:
##########
@@ -17,19 +17,32 @@
 package org.apache.dubbo.initializer.generation.extension.build.maven;
 
 import io.spring.initializr.generator.buildsystem.maven.MavenBuild;
+import io.spring.initializr.generator.buildsystem.maven.MavenProfile;
+import io.spring.initializr.generator.project.ProjectDescription;
 import io.spring.initializr.generator.spring.build.BuildCustomizer;
 
 public class NativeMavenPluginCustomizer implements 
BuildCustomizer<MavenBuild> {
+
+    private ProjectDescription description;
+
+    public NativeMavenPluginCustomizer(ProjectDescription description) {
+        this.description = description;
+    }
+
     @Override
     public void customize(MavenBuild mavenBuild) {
-        mavenBuild.plugins().add("org.springframework.boot", 
"spring-boot-maven-plugin", builder -> {
+        MavenProfile profile = mavenBuild.profiles().id("native");
+
+        profile.plugins().add("org.springframework.boot", 
"spring-boot-maven-plugin", builder -> {
+            builder.version("${spring-boot.version}");
+            builder.configuration(conf -> conf.add("mainClass", 
description.getPackageName() + "." + description.getApplicationName()));
             builder.execution("process-aot", executionBuilder -> {
                 executionBuilder.goal("process-aot");
             });
-            builder.execution("repackage", execution -> 
execution.goal("repackage"));
+//            builder.execution("repackage", execution -> 
execution.goal("repackage"));
         });
 
-        mavenBuild.plugins().add("org.graalvm.buildtools", 
"native-maven-plugin", builder -> {
+        profile.plugins().add("org.graalvm.buildtools", "native-maven-plugin", 
builder -> {
             builder.version("0.9.20")

Review Comment:
   Bump version to 0.9.28.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to