Repository: vaadin/flow
Pull request #21067: feat: add ignore version check to plugin params
Author: login: tepi
Labels: name: +0.0.1
name: prerelease version for Vaadin 24.8.0
name: Released with Vaadin 24.8.0.alpha2
Created: 2025-02-28T16:16:20Z | Merged: 2025-03-04T09:35:00Z

Fixes https://github.com/vaadin/flow/issues/21049


Diff:
diff --git a/flow-plugins/flow-dev-bundle-plugin/src/main/java/com/vaadin/flow/plugin/maven/BuildDevBundleMojo.java b/flow-plugins/flow-dev-bundle-plugin/src/main/java/com/vaadin/flow/plugin/maven/BuildDevBundleMojo.java
index ffe2bb64a5a..24b5cd0e002 100644
--- a/flow-plugins/flow-dev-bundle-plugin/src/main/java/com/vaadin/flow/plugin/maven/BuildDevBundleMojo.java
+++ b/flow-plugins/flow-dev-bundle-plugin/src/main/java/com/vaadin/flow/plugin/maven/BuildDevBundleMojo.java
@@ -194,6 +194,12 @@ public class BuildDevBundleMojo extends AbstractMojo
     @Parameter(property = InitParameters.NPM_EXCLUDE_WEB_COMPONENTS, defaultValue = "false")
     private boolean npmExcludeWebComponents;
 
+    /**
+     * Set to {@code true} to ignore node/npm tool version checks.
+     */
+    @Parameter(property = FrontendUtils.PARAM_IGNORE_VERSION_CHECKS, defaultValue = "false")
+    private boolean frontendIgnoreVersionChecks;
+
     static final String CLASSFINDER_FIELD_NAME = "classFinder";
 
     private ClassFinder classFinder;
@@ -554,6 +560,11 @@ public boolean isNpmExcludeWebComponents() {
         return npmExcludeWebComponents;
     }
 
+    @Override
+    public boolean isFrontendIgnoreVersionChecks() {
+        return frontendIgnoreVersionChecks;
+    }
+
     private static URLClassLoader createIsolatedClassLoader(
             MavenProject project, MojoExecution mojoExecution) {
         List<URL> urls = new ArrayList<>();
diff --git a/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/GradlePluginAdapter.kt b/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/GradlePluginAdapter.kt
index 9ed31d733a1..c52958e60a4 100644
--- a/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/GradlePluginAdapter.kt
+++ b/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/GradlePluginAdapter.kt
@@ -312,4 +312,6 @@ internal class GradlePluginAdapter private constructor(
     override fun frontendExtraFileExtensions(): List<String> =
         config.frontendExtraFileExtensions.get()
 
+    override fun isFrontendIgnoreVersionChecks(): Boolean = config.frontendIgnoreVersionChecks.get()
+
 }
diff --git a/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/PrepareFrontendInputProperties.kt b/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/PrepareFrontendInputProperties.kt
index e2d080a2c30..995e71a7475 100644
--- a/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/PrepareFrontendInputProperties.kt
+++ b/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/PrepareFrontendInputProperties.kt
@@ -163,6 +163,10 @@ internal class PrepareFrontendInputProperties(
     fun getNpmExcludeWebComponents(): Provider<Boolean> =
         config.npmExcludeWebComponents
 
+    @Input
+    fun getFrontendIgnoreVersionChecks(): Provider<Boolean> =
+        config.frontendIgnoreVersionChecks
+
     @Input
     @Optional
     fun getNodeExecutablePath(): Provider<String> =
diff --git a/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/VaadinFlowPluginExtension.kt b/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/VaadinFlowPluginExtension.kt
index 27ee600e673..436b5b52335 100644
--- a/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/VaadinFlowPluginExtension.kt
+++ b/flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/VaadinFlowPluginExtension.kt
@@ -295,6 +295,12 @@ public abstract class VaadinFlowPluginExtension @Inject constructor(private val
      */
     public abstract val npmExcludeWebComponents: Property<Boolean>
 
+    /**
+     * Whether to ignore node/npm tool version checks or not. Defaults to
+     * {@code false}.
+     */
+    public abstract val frontendIgnoreVersionChecks: Property<Boolean>
+
     public fun filterClasspath(
         @DelegatesTo(
             value = ClasspathFilter::class,
@@ -541,6 +547,10 @@ public class PluginEffectiveConfiguration(
         extension.frontendExtraFileExtensions
             .convention(listOf())
 
+    public val frontendIgnoreVersionChecks: Provider<Boolean> = extension
+        .frontendIgnoreVersionChecks.convention(false)
+        .overrideWithSystemPropertyFlag(project, FrontendUtils.PARAM_IGNORE_VERSION_CHECKS)
+
     public val npmExcludeWebComponents: Provider<Boolean> = extension
         .npmExcludeWebComponents.convention(false)
 
diff --git a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FlowModeAbstractMojo.java b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FlowModeAbstractMojo.java
index 005b162c1c7..c0ead303698 100644
--- a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FlowModeAbstractMojo.java
+++ b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FlowModeAbstractMojo.java
@@ -281,6 +281,15 @@ public abstract class FlowModeAbstractMojo extends AbstractMojo
     @Parameter(property = InitParameters.APPLICATION_IDENTIFIER)
     private String applicationIdentifier;
 
+    /**
+     * Set to {@code true} to ignore node/npm tool version checks.
+     *
+     * Note that disabling frontend tools version checking could cause failing
+     * builds and other issues that are difficult to debug.
+     */
+    @Parameter(property = FrontendUtils.PARAM_IGNORE_VERSION_CHECKS, defaultValue = "false")
+    private boolean frontendIgnoreVersionChecks;
+
     static final String CLASSFINDER_FIELD_NAME = "classFinder";
     private ClassFinder classFinder;
 
@@ -707,6 +716,11 @@ public boolean isNpmExcludeWebComponents() {
         return npmExcludeWebComponents;
     }
 
+    @Override
+    public boolean isFrontendIgnoreVersionChecks() {
+        return frontendIgnoreVersionChecks;
+    }
+
     private void checkFlowCompatibility(PluginDescriptor pluginDescriptor) {
         Predicate<Artifact> isFlowServer = artifact -> "com.vaadin"
                 .equals(artifact.getGroupId())
diff --git a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/GenerateNpmBOMMojo.java b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/GenerateNpmBOMMojo.java
index 7c469bec9ba..c678d1764e2 100644
--- a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/GenerateNpmBOMMojo.java
+++ b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/GenerateNpmBOMMojo.java
@@ -179,7 +179,9 @@ protected void executeInternal()
                         .withProductionMode(productionMode)
                         .withReact(isReactEnabled())
                         .withNpmExcludeWebComponents(
-                                isNpmExcludeWebComponents());
+                                isNpmExcludeWebComponents())
+                        .withFrontendIgnoreVersionChecks(
+                                isFrontendIgnoreVersionChecks());
                 new NodeTasks(options).execute();
                 logInfo("SBOM generation created node_modules and all needed metadata. "
                         + "If you don't need it, please run mvn vaadin:clean-frontend");
diff --git a/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/BuildFrontendUtil.java b/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/BuildFrontendUtil.java
index 5fced69ea4a..4c4a2f1de89 100644
--- a/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/BuildFrontendUtil.java
+++ b/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/BuildFrontendUtil.java
@@ -171,7 +171,9 @@ public static void prepareFrontend(PluginAdapterBase adapter)
                 .withFrontendExtraFileExtensions(
                         adapter.frontendExtraFileExtensions())
                 .withNpmExcludeWebComponents(
-                        adapter.isNpmExcludeWebComponents());
+                        adapter.isNpmExcludeWebComponents())
+                .withFrontendIgnoreVersionChecks(
+                        adapter.isFrontendIgnoreVersionChecks());
 
         // Copy jar artifact contents in TaskCopyFrontendFiles
         options.copyResources(adapter.getJarFiles());
@@ -208,6 +210,8 @@ private static FrontendToolsSettings getFrontendToolsSettings(
         settings.setAutoUpdate(adapter.nodeAutoUpdate());
         settings.setUseGlobalPnpm(adapter.useGlobalPnpm());
         settings.setForceAlternativeNode(adapter.requireHomeNodeExec());
+        settings.setIgnoreVersionChecks(
+                adapter.isFrontendIgnoreVersionChecks());
 
         return settings;
     }
@@ -359,7 +363,9 @@ public static void runNodeUpdater(PluginAdapterBuild adapter)
                     .withNpmExcludeWebComponents(
                             adapter.isNpmExcludeWebComponents())
                     .withFrontendExtraFileExtensions(
-                            adapter.frontendExtraFileExtensions());
+                            adapter.frontendExtraFileExtensions())
+                    .withFrontendIgnoreVersionChecks(
+                            adapter.isFrontendIgnoreVersionChecks());
             new NodeTasks(options).execute();
         } catch (ExecutionFailedException exception) {
             throw exception;
@@ -429,7 +435,9 @@ public static void runDevBuildNodeUpdater(PluginAdapterBuild adapter)
                     .withFrontendExtraFileExtensions(
                             adapter.frontendExtraFileExtensions())
                     .withNpmExcludeWebComponents(
-                            adapter.isNpmExcludeWebComponents());
+                            adapter.isNpmExcludeWebComponents())
+                    .withFrontendIgnoreVersionChecks(
+                            adapter.isFrontendIgnoreVersionChecks());
             new NodeTasks(options).execute();
         } catch (ExecutionFailedException exception) {
             throw exception;
diff --git a/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/ConvertPolymerCommand.java b/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/ConvertPolymerCommand.java
index 1d739e5d60d..a80ed82fd14 100644
--- a/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/ConvertPolymerCommand.java
+++ b/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/ConvertPolymerCommand.java
@@ -199,6 +199,8 @@ private FrontendToolsSettings getFrontendToolsSettings()
         settings.setAutoUpdate(adapter.nodeAutoUpdate());
         settings.setUseGlobalPnpm(adapter.useGlobalPnpm());
         settings.setForceAlternativeNode(adapter.requireHomeNodeExec());
+        settings.setIgnoreVersionChecks(
+                adapter.isFrontendIgnoreVersionChecks());
         return settings;
     }
 }
diff --git a/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/PluginAdapterBase.java b/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/PluginAdapterBase.java
index db8bca04495..e63bc4343bf 100644
--- a/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/PluginAdapterBase.java
+++ b/flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/PluginAdapterBase.java
@@ -354,4 +354,14 @@ default Lookup createLookup(ClassFinder classFinder) {
      * @return {@code true} to exclude Vaadin web component npm packages.
      */
     boolean isNpmExcludeWebComponents();
+
+    /**
+     * Whether to ignore node/npm tool version checks or not.
+     *
+     * Note that disabling frontend tools version checking could cause failing
+     * builds and other issues that are difficult to debug.
+     *
+     * @return {@code true} to ignore node/npm tool version checks
+     */
+    boolean isFrontendIgnoreVersionChecks();
 }
diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java
index 51ad984888b..b84de30779a 100644
--- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java
+++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendTools.java
@@ -413,6 +413,7 @@ private static FrontendToolsSettings createSettings(
         settings.setUseGlobalPnpm(useGlobalPnpm);
         settings.setNodeVersion(nodeVersion);
         settings.setNodeDownloadRoot(URI.create(nodeDownloadRoot));
+        settings.setIgnoreVersionChecks(false);
         return settings;
     }
 
diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendToolsSettings.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendToolsSettings.java
index ba3ff28afb2..c1a8293375f 100644
--- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendToolsSettings.java
+++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendToolsSettings.java
@@ -68,8 +68,6 @@ public FrontendToolsSettings(String baseDir,
             SerializableSupplier<String> alternativeDirGetter) {
         this.baseDir = Objects.requireNonNull(baseDir);
         this.alternativeDirGetter = alternativeDirGetter;
-        ignoreVersionChecks = "true".equalsIgnoreCase(
-                System.getProperty(FrontendUtils.PARAM_IGNORE_VERSION_CHECKS));
     }
 
     /**
@@ -121,13 +119,22 @@ public void setNodeVersion(String nodeVersion) {
     /**
      * Set if node and npm versions should be checked or not.
      *
+     * If set, system property
+     * {@value FrontendUtils#PARAM_IGNORE_VERSION_CHECKS} will override the
+     * value set here.
+     *
      * @param ignoreVersionChecks
-     *            set if versions should be validated, default is system
-     *            property for
-     *            {@value FrontendUtils#PARAM_IGNORE_VERSION_CHECKS}
+     *            set to {@code true} if versions should be validated
      */
     public void setIgnoreVersionChecks(boolean ignoreVersionChecks) {
-        this.ignoreVersionChecks = ignoreVersionChecks;
+        String val = System
+                .getProperty(FrontendUtils.PARAM_IGNORE_VERSION_CHECKS);
+        if (val == null) {
+            this.ignoreVersionChecks = ignoreVersionChecks;
+        } else {
+            this.ignoreVersionChecks = Boolean
+                    .getBoolean(FrontendUtils.PARAM_IGNORE_VERSION_CHECKS);
+        }
     }
 
     /**
diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/Options.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/Options.java
index 9b740ea3a75..b0074de9612 100644
--- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/Options.java
+++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/Options.java
@@ -134,6 +134,8 @@ public class Options implements Serializable {
      */
     private boolean cleanOldGeneratedFiles = false;
 
+    private boolean frontendIgnoreVersionChecks = false;
+
     /**
      * Creates a new instance.
      *
@@ -570,6 +572,19 @@ public Options withFrontendHotdeploy(boolean frontendHotdeploy) {
         return this;
     }
 
+    /**
+     * Whether to ignore node/npm tool version checks or not. Defaults to
+     * {@code false}.
+     *
+     * @param frontendIgnoreVersionChecks
+     *            {@code true} to ignore node/npm tool version checks
+     */
+    public Options withFrontendIgnoreVersionChecks(
+            boolean frontendIgnoreVersionChecks) {
+        this.frontendIgnoreVersionChecks = frontendIgnoreVersionChecks;
+        return this;
+    }
+
     /**
      * Checks if running with a dev server (when not in production mode).
      *
@@ -1013,4 +1028,13 @@ public Options withNpmExcludeWebComponents(boolean exclude) {
         this.npmExcludeWebComponents = exclude;
         return this;
     }
+
+    /**
+     * Whether to ignore node/npm tool version checks or not.
+     *
+     * @return {@code true} to ignore node/npm tool version checks
+     */
+    public boolean isFrontendIgnoreVersionChecks() {
+        return frontendIgnoreVersionChecks;
+    }
 }
diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunDevBundleBuild.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunDevBundleBuild.java
index d88b7e30528..dbaa67ef892 100644
--- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunDevBundleBuild.java
+++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunDevBundleBuild.java
@@ -119,6 +119,8 @@ private void runFrontendBuildTool(String toolName, String executable,
         settings.setUseGlobalPnpm(options.isUseGlobalPnpm());
         settings.setAutoUpdate(options.isNodeAutoUpdate());
         settings.setNodeVersion(options.getNodeVersion());
+        settings.setIgnoreVersionChecks(
+                options.isFrontendIgnoreVersionChecks());
         FrontendTools frontendTools = new FrontendTools(settings);
 
         File buildExecutable = new File(options.getNpmFolder(),
diff --git a/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunNpmInstall.java b/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunNpmInstall.java
index 6e18af325be..5cc4b4b66d7 100644
--- a/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunNpmInstall.java
+++ b/flow-server/src/main/java/com/vaadin/flow/server/frontend/TaskRunNpmInstall.java
@@ -227,6 +227,8 @@ private void runNpmInstall() throws ExecutionFailedException {
         settings.setUseGlobalPnpm(options.isUseGlobalPnpm());
         settings.setAutoUpdate(options.isNodeAutoUpdate());
         settings.setNodeVersion(options.getNodeVersion());
+        settings.setIgnoreVersionChecks(
+                options.isFrontendIgnoreVersionChecks());
         FrontendTools tools = new FrontendTools(settings);
         tools.validateNodeAndNpmVersion();
 


Reviews:
user: login: mcollovati
body: Added some minor, non-blocking, comments
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-03-03T08:45:33Z
user: login: mcollovati
state: APPROVED
author_association: COLLABORATOR
submitted_at: 2025-03-04T06:56:05Z

Review comments:
diff_hunk: @@ -121,13 +119,23 @@ public void setNodeVersion(String nodeVersion) {
     /**
      * Set if node and npm versions should be checked or not.
      *
+     * If set, system property
+     * {@value FrontendUtils#PARAM_IGNORE_VERSION_CHECKS} will override the
+     * value set here. Defaults to {@code false}.
+     *
      * @param ignoreVersionChecks
-     *            set if versions should be validated, default is system
-     *            property for
-     *            {@value FrontendUtils#PARAM_IGNORE_VERSION_CHECKS}
+     *            set to {@code true} if versions should be validated
      */
     public void setIgnoreVersionChecks(boolean ignoreVersionChecks) {
-        this.ignoreVersionChecks = ignoreVersionChecks;
+        String val = System
+                .getProperty(FrontendUtils.PARAM_IGNORE_VERSION_CHECKS);
path: flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendToolsSettings.java
user: login: mcollovati
body: I wonder if it could be a good idea to add a DEBUG log message when the system property overrides the value got from the configuration. 
created_at: 2025-03-03T07:50:48Z
author_association: COLLABORATOR
diff_hunk: @@ -281,6 +281,12 @@ public abstract class FlowModeAbstractMojo extends AbstractMojo
     @Parameter(property = InitParameters.APPLICATION_IDENTIFIER)
     private String applicationIdentifier;
 
+    /**
+     * Set to {@code true} to ignore node/npm tool version checks.
+     */
+    @Parameter(defaultValue = "false")
path: flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FlowModeAbstractMojo.java
user: login: mcollovati
body: What about adding `property = FrontendUtils.PARAM_IGNORE_VERSION_CHECKS`, so at least for the maven plugin it would be explicit that system property overrides the configuration value?
created_at: 2025-03-03T07:55:05Z
author_association: COLLABORATOR
diff_hunk: @@ -541,6 +547,9 @@ public class PluginEffectiveConfiguration(
         extension.frontendExtraFileExtensions
             .convention(listOf())
 
+    public val frontendIgnoreVersionChecks: Provider<Boolean> = extension
+        .frontendIgnoreVersionChecks.convention(false)
path: flow-plugins/flow-gradle-plugin/src/main/kotlin/com/vaadin/gradle/VaadinFlowPluginExtension.kt
user: login: mcollovati
body: Could this also have `overrideWithSystemPropertyFlag(project,FrontendUtils.PARAM_IGNORE_VERSION_CHECKS)`?
See comment on related property on the Maven mojo.
created_at: 2025-03-03T07:57:24Z
author_association: COLLABORATOR
diff_hunk: @@ -194,6 +194,12 @@ public class BuildDevBundleMojo extends AbstractMojo
     @Parameter(property = InitParameters.NPM_EXCLUDE_WEB_COMPONENTS, defaultValue = "false")
     private boolean npmExcludeWebComponents;
 
+    /**
+     * Set to {@code true} to ignore node/npm tool version checks.
+     */
+    @Parameter(defaultValue = "false")
path: flow-plugins/flow-dev-bundle-plugin/src/main/java/com/vaadin/flow/plugin/maven/BuildDevBundleMojo.java
user: login: mcollovati
body: Could have `property = FrontendUtils.PARAM_IGNORE_VERSION_CHECKS`. Check the comment on `FlowModeAbstractMojo`
created_at: 2025-03-03T08:27:25Z
author_association: COLLABORATOR
diff_hunk: @@ -354,4 +354,12 @@ default Lookup createLookup(ClassFinder classFinder) {
      * @return {@code true} to exclude Vaadin web component npm packages.
      */
     boolean isNpmExcludeWebComponents();
+
+    /**
+     * Whether to ignore node/npm tool version checks or not. Defaults to
+     * {@code false}.
path: flow-plugins/flow-plugin-base/src/main/java/com/vaadin/flow/plugin/base/PluginAdapterBase.java
user: login: mcollovati
body: I'm not sure if it makes sense to say that `false` is the default, since it is up to the implementor.
I would add the note if the method had a default implementation, but since there's only the definition, I would remove the `Defaults to false` part.
created_at: 2025-03-03T08:31:49Z
author_association: COLLABORATOR
diff_hunk: @@ -121,13 +119,23 @@ public void setNodeVersion(String nodeVersion) {
     /**
      * Set if node and npm versions should be checked or not.
      *
+     * If set, system property
+     * {@value FrontendUtils#PARAM_IGNORE_VERSION_CHECKS} will override the
+     * value set here. Defaults to {@code false}.
+     *
      * @param ignoreVersionChecks
-     *            set if versions should be validated, default is system
-     *            property for
-     *            {@value FrontendUtils#PARAM_IGNORE_VERSION_CHECKS}
+     *            set to {@code true} if versions should be validated
      */
     public void setIgnoreVersionChecks(boolean ignoreVersionChecks) {
-        this.ignoreVersionChecks = ignoreVersionChecks;
+        String val = System
+                .getProperty(FrontendUtils.PARAM_IGNORE_VERSION_CHECKS);
path: flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendToolsSettings.java
user: login: mcollovati
body: nit: would it make sense and a bit easier to read if we check for null system property and otherwise use `Boolean.getBoolean(Boolean.getBoolean())` to remove the hard-coded "true/false" values?

e.g.

```
if (val == null) { this.ignoreVersionChecks = ignoreVersionCheck; }
else {
   // Log system property used
   this.ignoreVersionChecks = Boolean.gerProperty(FrontendUtils.PARAM_IGNORE_VERSION_CHECKS);
}
```

created_at: 2025-03-03T08:36:48Z
author_association: COLLABORATOR
diff_hunk: @@ -281,6 +281,12 @@ public abstract class FlowModeAbstractMojo extends AbstractMojo
     @Parameter(property = InitParameters.APPLICATION_IDENTIFIER)
     private String applicationIdentifier;
 
+    /**
+     * Set to {@code true} to ignore node/npm tool version checks.
+     */
+    @Parameter(defaultValue = "false")
path: flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/FlowModeAbstractMojo.java
user: login: mcollovati
body: I wonder if it would be useful to add to the Javadoc what's the drawback of ignoring version check, e.g. build fails because of tools incompatibilities and it might be difficult to understand the real cause.
created_at: 2025-03-03T08:44:11Z
author_association: COLLABORATOR

PR comments:
user: login: github-actions[bot]
created_at: 2025-02-28T16:32:38Z
body: ## Test Results
1 169 files  ±0  1 169 suites  ±0   1h 15m 11s ⏱️ - 1m 36s
7 776 tests ±0  7 719 ✅ ±0  57 💤 ±0  0 ❌ ±0 
8 135 runs   - 2  8 069 ✅  - 2  66 💤 ±0  0 ❌ ±0 

Results for commit f5d383a1. ± Comparison against base commit 286c951c.

[test-results]:data:application/gzip;base64,H4sIABKpxmcC/03OSQ7DIAyF4atErLvATcDQy1QOg4SaoSKwqnr3krEs34f1iw/zYXALezQAUt8atuSQ6m1zpBTmqUgnAIqU57QeIKI853PJxmwG+m+v8C4m8BJPYSjCL3AxzvGQmKc1q6AVxzqrim9f2WmPSnlC1dx2nTTzOIZUBvPCtqolkI64E8pb21PHlVUoATVacvfecCD2/QFA+onKEgEAAA==

:recycle: This comment has been updated with latest results.
author_association: NONE
user: login: tepi
created_at: 2025-03-03T18:37:42Z
body: @mcollovati Addressed all of your comments except the logging one - I don't we have such logging for other parameters being overridden either.
author_association: CONTRIBUTOR
user: login: mcollovati
created_at: 2025-03-04T06:59:57Z
body: > @mcollovati Addressed all of your comments except the logging one - I don't we have such logging for other parameters being overridden either.

Yep. Looking at it again, and it seems logging doesn't seem so important in this context. In addition, now the system parameter already overrides the plugin's configuration, so the only valid use case for that piece of code is when running from the IDE, and I guess one will not set the property by mistake.
author_association: COLLABORATOR
user: login: sonarqubecloud[bot]
created_at: 2025-03-04T07:09:52Z
body: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=vaadin_flow&pullRequest=21067) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [57 New issues](https://sonarcloud.io/project/issues?id=vaadin_flow&pullRequest=21067&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=vaadin_flow&pullRequest=21067&issueStatuses=ACCEPTED)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=vaadin_flow&pullRequest=21067&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=vaadin_flow&pullRequest=21067&metric=new_coverage&view=list)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=vaadin_flow&pullRequest=21067&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=vaadin_flow&pullRequest=21067)


author_association: NONE
user: login: vaadin-bot
created_at: 2025-03-17T13:46:28Z
body: This ticket/PR has been released with Vaadin 24.8.0.alpha2 and is also targeting the upcoming stable 24.8.0 version.
author_association: COLLABORATOR