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 ec316ae005d..decfe0b3ada 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 @@ -30,13 +30,11 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; -import java.util.function.Consumer; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -53,9 +51,6 @@ import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; import org.apache.maven.plugins.annotations.ResolutionScope; -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.DependencyResolutionRequiredException; -import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.classworlds.realm.ClassRealm; import org.codehaus.plexus.classworlds.realm.NoSuchRealmException; @@ -75,9 +70,6 @@ import com.vaadin.flow.server.Constants; import com.vaadin.flow.server.ExecutionFailedException; import com.vaadin.flow.server.frontend.FrontendUtils; -import com.vaadin.flow.server.frontend.installer.NodeInstaller; -import com.vaadin.flow.server.frontend.installer.Platform; -import com.vaadin.flow.server.frontend.scanner.ClassFinder; import com.vaadin.flow.server.scanner.ReflectionsClassFinder; import com.vaadin.flow.theme.Theme; import com.vaadin.flow.utils.FlowFileUtils; @@ -611,7 +603,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 dd068aeba84..0bdbbc6e4d5 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 @@ -28,7 +28,6 @@ import java.net.URI; import java.net.URISyntaxException; import java.net.URLClassLoader; -import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.nio.file.Paths; import java.util.List; @@ -56,7 +55,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; @@ -665,7 +663,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 "