Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production build fails, if a projects dependencies contain the same maven artifact multiple times with a different classifier #20609

Closed
FelixLanghof opened this issue Dec 4, 2024 · 2 comments

Comments

@FelixLanghof
Copy link

Description of the bug

For projects that contain multiple dependencies of the same maven artifact with different classifiers (or a dependency for which this applies), the production build fails with an IllegalStateException.
Example:

java.lang.IllegalStateException: Duplicate key io.netty:netty-tcnative-boringssl-static (attempted merging values io.netty:netty-tcnative-boringssl-static:jar:2.0.69.Final:compil
e and io.netty:netty-tcnative-boringssl-static:jar:linux-x86_64:2.0.69.Final:compile)
[...]
at com.vaadin.flow.plugin.maven.Reflector.createIsolatedClassLoader (Reflector.java:245)
at com.vaadin.flow.plugin.maven.Reflector.of (Reflector.java:201)
at com.vaadin.flow.plugin.maven.FlowModeAbstractMojo.isHillaAvailable (FlowModeAbstractMojo.java:372)
at com.vaadin.hilla.maven.EngineConfigureMojo.execute (EngineConfigureMojo.java:56)

Expected behavior

Production build runs successfully

Minimal reproducible example

  • Download the Hello World Project from https://start.vaadin.com/app (Flow/Java/Maven/Spring Boot)
  • (Check that Vaadin Version is 24.5.6)
  • Add a dependency that contains the same maven artifact multiple times, only with different classifiers
    • For example io.netty:netty-tcnative-boringssl-static
  • Run mvn -Pproduction install

The error is

Versions

  • Vaadin / Flow version: 24.5.6
  • Java version: 17/21
  • OS version: Win10
  • Maven: 3.9.6
@mcollovati
Copy link
Collaborator

Fixed in Flow 24.5.8 by #20551

@mcollovati
Copy link
Collaborator

Duplicate of #20555

@mcollovati mcollovati marked this as a duplicate of #20555 Dec 4, 2024
@mcollovati mcollovati closed this as not planned Won't fix, can't repro, duplicate, stale Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants