From 8d60784c71e6aa0df214b435bc12fb907529cc3f Mon Sep 17 00:00:00 2001 From: Patrick Ziegler Date: Fri, 20 Dec 2024 21:14:02 +0100 Subject: [PATCH] Honor configured profile when determining the execution environment When calculating the best matching profile, any explicitly configured profile is effectively overwritten with the one matching the current runtime version. This makes it impossible to select a profile older than the JRE Tycho is executed with. As a result, properties such as the "useJDK" are ignored if the BREE of the bundle is smaller than the current Java version. --- .../java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java | 1 + 1 file changed, 1 insertion(+) diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java index 25658ea171..5e62b263bc 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/osgitools/OsgiBundleProject.java @@ -563,6 +563,7 @@ private void applyBestOfCurrentOrConfiguredProfile(String configuredProfileName, if (configuredProfile != null) { // non standard profile, stick to it sink.setProfileConfiguration(configuredProfileName, reason); + return; } StandardExecutionEnvironment currentProfile = ExecutionEnvironmentUtils.getExecutionEnvironment( "JavaSE-" + Runtime.version().feature(), toolchainManager, mavenSession, logger);