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 ce93eb22c24..5cb74096258 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
@@ -628,7 +628,8 @@ private void checkFlowCompatibility(PluginDescriptor pluginDescriptor) {
String pluginFlowVersion = pluginDescriptor.getArtifacts().stream()
.filter(isFlowServer).map(Artifact::getVersion).findFirst()
.orElse(null);
- if (!Objects.equals(projectFlowVersion, pluginFlowVersion)) {
+ if (projectFlowVersion != null
+ && !Objects.equals(projectFlowVersion, pluginFlowVersion)) {
getLog().warn(
"Vaadin Flow used in project does not match the version expected by the Vaadin plugin. "
+ "Flow version for project is "
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 67608e4e6f5..67ebaaa799c 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
@@ -16,7 +16,6 @@
package com.vaadin.flow.plugin.maven;
import javax.inject.Inject;
-
import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -53,7 +52,6 @@
import com.vaadin.flow.plugin.base.BuildFrontendUtil;
import com.vaadin.flow.plugin.base.PluginAdapterBase;
import com.vaadin.flow.server.Constants;
-import com.vaadin.flow.server.ExecutionFailedException;
import com.vaadin.flow.server.InitParameters;
import com.vaadin.flow.server.frontend.FrontendTools;
import com.vaadin.flow.server.frontend.FrontendUtils;
@@ -271,7 +269,6 @@ public abstract class FlowModeAbstractMojo extends AbstractMojo
*
* svg,ico
*
- *
*/
@Parameter(property = InitParameters.FRONTEND_EXTRA_EXTENSIONS, defaultValue = "${null}")
private List frontendExtraFileExtensions;
@@ -720,7 +717,8 @@ private void checkFlowCompatibility(PluginDescriptor pluginDescriptor) {
String pluginFlowVersion = pluginDescriptor.getArtifacts().stream()
.filter(isFlowServer).map(Artifact::getBaseVersion).findFirst()
.orElse(null);
- if (!Objects.equals(projectFlowVersion, pluginFlowVersion)) {
+ if (projectFlowVersion != null
+ && !Objects.equals(projectFlowVersion, pluginFlowVersion)) {
getLog().warn(
"Vaadin Flow used in project does not match the version expected by the Vaadin plugin. "
+ "Flow version for project is "