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 authored and ketola committed Apr 20, 2024
1 parent 931e5b6 commit bf6c9fe
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 bf6c9fe

Please sign in to comment.