diff --git a/flow-plugins/flow-dev-bundle-plugin/src/main/java/com/vaadin/flow/plugin/maven/Reflector.java b/flow-plugins/flow-dev-bundle-plugin/src/main/java/com/vaadin/flow/plugin/maven/Reflector.java index b130a235255..2c79ea85c9a 100644 --- a/flow-plugins/flow-dev-bundle-plugin/src/main/java/com/vaadin/flow/plugin/maven/Reflector.java +++ b/flow-plugins/flow-dev-bundle-plugin/src/main/java/com/vaadin/flow/plugin/maven/Reflector.java @@ -223,7 +223,10 @@ private static URLClassLoader createIsolatedClassLoader( } Function keyMapper = artifact -> artifact.getGroupId() - + ":" + artifact.getArtifactId(); + + ":" + artifact.getArtifactId() + ":" + artifact.getType() + + ((artifact.getClassifier() != null) + ? ":" + artifact.getClassifier() + : ""); Map projectDependencies = new HashMap<>(project .getArtifacts().stream() diff --git a/flow-plugins/flow-maven-plugin/src/it/deps-with-classifier-dups-project/invoker.properties b/flow-plugins/flow-maven-plugin/src/it/deps-with-classifier-dups-project/invoker.properties new file mode 100644 index 00000000000..5aa13827263 --- /dev/null +++ b/flow-plugins/flow-maven-plugin/src/it/deps-with-classifier-dups-project/invoker.properties @@ -0,0 +1,17 @@ +# +# Copyright 2000-2024 Vaadin Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. +# + +invoker.goals=clean package diff --git a/flow-plugins/flow-maven-plugin/src/it/deps-with-classifier-dups-project/pom.xml b/flow-plugins/flow-maven-plugin/src/it/deps-with-classifier-dups-project/pom.xml new file mode 100644 index 00000000000..a90442ce776 --- /dev/null +++ b/flow-plugins/flow-maven-plugin/src/it/deps-with-classifier-dups-project/pom.xml @@ -0,0 +1,73 @@ + + + 4.0.0 + + com.vaadin.test.maven + deps-with-classifier-dups-project + 1.0 + jar + + + Tests that plugin dependency plus classifier do not break build. + + + + UTF-8 + 17 + ${maven.compiler.release} + ${maven.compiler.release} + true + + @project.version@ + 3.9.9 + + + + + com.vaadin + flow-server + ${flow.version} + + + com.vaadin + flow-client + ${flow.version} + + + org.yaml + snakeyaml + 2.2 + + + org.yaml + snakeyaml + 1.23 + android + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + + com.vaadin + flow-maven-plugin + ${flow.version} + + + + prepare-frontend + build-frontend + + + + + + + + diff --git a/flow-plugins/flow-maven-plugin/src/it/deps-with-classifier-dups-project/src/main/java/com/vaadin/test/ProjectFlowExtension.java b/flow-plugins/flow-maven-plugin/src/it/deps-with-classifier-dups-project/src/main/java/com/vaadin/test/ProjectFlowExtension.java new file mode 100644 index 00000000000..fd5304d4b88 --- /dev/null +++ b/flow-plugins/flow-maven-plugin/src/it/deps-with-classifier-dups-project/src/main/java/com/vaadin/test/ProjectFlowExtension.java @@ -0,0 +1,20 @@ +package com.vaadin.test; + +import java.util.List; + +import com.vaadin.flow.server.frontend.Options; +import com.vaadin.flow.server.frontend.TypeScriptBootstrapModifier; +import com.vaadin.flow.server.frontend.scanner.FrontendDependenciesScanner; + +/** + * Hello world! + */ +public class ProjectFlowExtension implements TypeScriptBootstrapModifier { + + @Override + public void modify(List bootstrapTypeScript, Options options, + FrontendDependenciesScanner frontendDependenciesScanner) { + System.out.println("ProjectFlowExtension"); + bootstrapTypeScript.add("(window as any).testProject=1;"); + } +} diff --git a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/Reflector.java b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/Reflector.java index b5ee45c4408..175ead2fe27 100644 --- a/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/Reflector.java +++ b/flow-plugins/flow-maven-plugin/src/main/java/com/vaadin/flow/plugin/maven/Reflector.java @@ -223,7 +223,10 @@ private static URLClassLoader createIsolatedClassLoader( } Function keyMapper = artifact -> artifact.getGroupId() - + ":" + artifact.getArtifactId(); + + ":" + artifact.getArtifactId() + ":" + artifact.getType() + + ((artifact.getClassifier() != null) + ? ":" + artifact.getClassifier() + : ""); Map projectDependencies = new HashMap<>(project .getArtifacts().stream()