From 969abc481ba3ff0449fd0b6b7ec987201f611fcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=8A?= =?UTF-8?q?=D1=80=20=D0=9A=D1=83=D1=80=D1=82=D0=B0=D0=BA=D0=BE=D0=B2?= Date: Tue, 27 Feb 2024 10:24:59 +0200 Subject: [PATCH] Reduce printed warnings in builds There are a lot of "[WARNING] Using JavaSE-21 to fulfill requested profile of JavaSE-17. This might lead to faulty dependency resolution, consider defining a suitable JDK in the toolchains.xml." in builds if no toolchain.xml is defined. But with modular JVMs even having same EE version doesn't guarantee same APIs are available in the JVM thus reducing severity of the message to debug so it can still be printed for the rare cases when that might be useful. --- .../tycho/core/ee/ExecutionEnvironmentUtils.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentUtils.java b/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentUtils.java index 211404aa22..0d1def1250 100644 --- a/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentUtils.java +++ b/tycho-core/src/main/java/org/eclipse/tycho/core/ee/ExecutionEnvironmentUtils.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2022 Sonatype Inc. and others. + * Copyright (c) 2008, 2024 Sonatype Inc. and others. * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -32,8 +32,8 @@ import org.codehaus.plexus.logging.Logger; import org.eclipse.osgi.internal.framework.EquinoxConfiguration; import org.eclipse.tycho.ExecutionEnvironment; -import org.eclipse.tycho.TargetEnvironment; import org.eclipse.tycho.ExecutionEnvironment.SystemPackageEntry; +import org.eclipse.tycho.TargetEnvironment; import org.eclipse.tycho.core.ee.StandardExecutionEnvironment.JavaInfo; import org.osgi.framework.BundleActivator; import org.osgi.framework.Constants; @@ -64,11 +64,11 @@ private static Properties readProperties(final URL url) { * Get the execution environment for the specified OSGi profile name. * * @param profileName - * profile name value as specified for key "Bundle-RequiredExecutionEnvironment" in - * MANIFEST.MF + * profile name value as specified for key + * "Bundle-RequiredExecutionEnvironment" in MANIFEST.MF * @return the corresponding {@link ExecutionEnvironment}. * @throws UnknownEnvironmentException - * if profileName is unknown. + * if profileName is unknown. */ public static StandardExecutionEnvironment getExecutionEnvironment(String profileName, ToolchainManager manager, MavenSession session, Logger logger) throws UnknownEnvironmentException { @@ -87,7 +87,7 @@ public static StandardExecutionEnvironment getExecutionEnvironment(String profil return split[0] + "-" + v; }).map(map::get).filter(Objects::nonNull).findFirst().orElse(null); if (higherEE != null) { - logger.warn("Using " + higherEE.getProfileName() + " to fulfill requested profile of " + profileName + logger.debug("Using " + higherEE.getProfileName() + " to fulfill requested profile of " + profileName + ". This might lead to faulty dependency resolution, consider defining a suitable JDK in the toolchains.xml."); return getSurrogate(profileName, higherEE); }