In some cases it could be desired to enable the native profile directly from Maven, so that the caller of Maven does not need to call Maven with -Pnative. To enable this behavior, I added an activation section to the generated POM with the profile definition.

Comment From: obfischer

Please let me know, if this feature has a chance to get accepted. If yes, I will also include the changes required for native tests.

Comment From: philwebb

Seems sensible to me. Our resident Maven expert is away at the moment. I'll flag this one for team attention to see if anyone can foresee any problems.

Comment From: snicoll

so that the caller of Maven does not need to call Maven with -Pnative

Can you expand a bit more on that? We don't really want to expand what our parent does without a good reason of doing so. Also I am not sure it would work in child projects as setting the property would be too late for the profile to evaluate. Have you tested that?

Comment From: Blackboy007are

obfischer:improvement/allow-to-activate-native-from-within-the-POM

Comment From: Blackboy007are

bb7480279@gmail.com

Comment From: Blackboy007are

import org.springframework.boot.*;
import org.springframework.boot.autoconfigure.*;
import org.springframework.web.bind.annotation.*;

@RestController
@SpringBootApplication
public class Example {

    @RequestMapping("/")
    String home() {
        return "Hello World!";
    }

    public static void main(String[] args) {
        SpringApplication.run(Example.class, args);
    }

}

Comment From: philwebb

@Blackboy007are Will you please stop spamming this issue

Comment From: snicoll

I am going to close this as what's been suggested does not work for me. If the feedback is provided and it turns out I was wrong we can reopen this one.

Comment From: obfischer

Hi, sorry, currently I am quite busy. I will come back with a more details description.

Comment From: Blackboy007are

42056

၂၀၂၄၊ စက် ၁၇၊ အင်္ဂါ နံနက် ၃:၁၇ တွင် Oliver B. Fischer ***@***.*** က ရေးခဲ့သည်−

Hi, sorry, currently I am quite busy. I will come back with a more details description.

— Reply to this email directly, view it on GitHub https://github.com/spring-projects/spring-boot/pull/42056#issuecomment-2354000704, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKXXSKRL42MZJ6G3IPI3FQLZW47V5AVCNFSM6AAAAABNKNWCNOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJUGAYDANZQGQ . You are receiving this because you were mentioned.Message ID: @.***>