Skip to content

Commit

Permalink
Allow native profile to be overridden
Browse files Browse the repository at this point in the history
This functionality was mistakenly removed in quarkusio#39295.

Fixes quarkusio#39669.
  • Loading branch information
dmlloyd committed Mar 26, 2024
1 parent 7abc84d commit 557e40e
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,15 @@ protected Properties getBuildSystemProperties(boolean quarkusOnly) throws MojoEx
* @return true if the package type system property was set, otherwise - false
*/
protected boolean setNativeEnabledIfNativeProfileEnabled() {
if (isNativeProfileEnabled(mavenProject())) {
System.setProperty("quarkus.native.enabled", "true");
if (!System.getProperties().containsKey("quarkus.native.enabled") && isNativeProfileEnabled(mavenProject())) {
Object nativeEnabledProp = mavenProject().getProperties().get("quarkus.native.enabled");
String nativeEnabled;
if (nativeEnabledProp != null) {
nativeEnabled = nativeEnabledProp.toString();
} else {
nativeEnabled = "true";
}
System.setProperty("quarkus.native.enabled", nativeEnabled);
return true;
} else {
return false;
Expand Down

0 comments on commit 557e40e

Please sign in to comment.