Giter Site home page Giter Site logo

Comments (2)

dariuszkuc avatar dariuszkuc commented on June 11, 2024

Hello 👋
It appears to be a Maven issue with your project setup - verify whether you import a BOM that specifies the old version or some other library transitively picks it up. Maven is rather crude with its dependency resolution strategy and uses shortest-path algorithm to select the first one it encounters (if path depth is the same then its picked in the the order they are defined in the pom file) so given something like

- foo-dependency
  |- bar-dependency v0.0.1
- baz-dependency
  |- bar-dependency v1.0.0

Maven will pick up the transitive dependency of foo-dependency even though baz-dependency uses new version.

You can use dependency:tree goal to check out the resolution. See https://maven.apache.org/plugins/maven-dependency-plugin/examples/filtering-the-dependency-tree.html (use verbose option to get full tree).

from federation-jvm.

NorthernMystic avatar NorthernMystic commented on June 11, 2024

Hey, @dariuszkuc Thanks for the quick reply.
the result of maven dependency tree:

[INFO] +- com.apollographql.federation:federation-graphql-java-support:jar:2.0.4:compile
[INFO] | +- com.apollographql.federation:federation-graphql-java-support-api:jar:2.0.4:compile
[INFO] | +- com.graphql-java:graphql-java:jar:19.0:compile
[INFO] | | +- com.graphql-java:java-dataloader:jar:3.2.0:compile
[INFO] | | | - (org.slf4j:slf4j-api:jar:1.7.30:compile - version managed from 1.7.36; omitted for duplicate)
[INFO] | | +- org.reactivestreams:reactive-streams:jar:1.0.3:compile (version managed from 1.0.2)
[INFO] | | - (org.slf4j:slf4j-api:jar:1.7.30:compile - version managed from 1.7.35; scope updated from runtime; omitted for duplicate)
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] | - com.google.protobuf:protobuf-java:jar:3.14.0:compile (version managed from 3.21.4)

After checking the maven docs, I suppose we need to put the import dependency under the dependencyManagement part.
Will close this issue as it is resolved.

from federation-jvm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.