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

gwt-elemental-2.8.2.vaadin1 gives duplicate dependencies #4598

Closed
pekam opened this issue Sep 11, 2018 · 4 comments
Closed

gwt-elemental-2.8.2.vaadin1 gives duplicate dependencies #4598

pekam opened this issue Sep 11, 2018 · 4 comments
Assignees
Labels
Milestone

Comments

@pekam
Copy link
Contributor

pekam commented Sep 11, 2018

Our custom build gwt-elemental-2.8.2.vaadin1 is based on this:
https://github.com/denis-anisimov/gwt-elemental

It copies files from the gwt-elemental dependency into the package itself, but the original dependency is not excluded. This brings duplicate gwt-elemental dependencies for those who depend on this package (flow-server).

Original issue: #4569 had a quick fix by excluding the transitive dependency: #4594

Steps to resolve the ticket:

  1. Fix the pom.xml so that the package doesn't pull the original gwt-elemental as a transitive dependency
  2. Release gwt-elemental-2.8.2.vaadin2
  3. Update the dependency in flow-server and remove the exclusion, which should be redundant at that point
@denis-anisimov
Copy link
Contributor

denis-anisimov commented Sep 12, 2018

I guess it's enough to use <optional>true</optional> for the original gwt-elemental dependency inside the pom.xml?

What do you think @Legioth , @tsuoanttila ?

The original dependency is needed since it's used to repackage the sources so we need it somehow present as a dependency in the pom.xml. We just don't want it to be transitive.

@Legioth
Copy link
Member

Legioth commented Sep 13, 2018

Doesn't maven-dependency-plugin also support extracting files from artefacts that are not in the <dependencies> section? Might have to explicitly define a <version> in the plugin config then instead of as a dependency.

Otherwise, optional (or provided?) might also work, even though it's not semantically correct.

@denis-anisimov
Copy link
Contributor

Yeah, OK.
I will check how maven-dependency-plugin works. If it supports then it's better to remove the dependency completely.
Otherwise let's go with optional.

Thanks.

@denis-anisimov
Copy link
Contributor

Just for the reference:
it's possible to use maven-dependency-plugin without dependency section BUT
then the resulting classes can't be compiled because the original gwt-elemental has transitive dependencies which are absent after extraction.

So actually the dependency is needed for the compilation but is not needed at runtime.
So actually optional is OK in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants