Skip to content

Commit

Permalink
chore: do not log incompatibility if project dependencies are not res…
Browse files Browse the repository at this point in the history
…olved (CP: 24.4)
  • Loading branch information
mcollovati authored and mshabarov committed Dec 13, 2024
1 parent e405981 commit b175511
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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 "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 "
Expand Down

0 comments on commit b175511

Please sign in to comment.