java – Maven dependency version detection

I am using maven in my project. I see below dependency is mentioned in one of the module’s pom.xml without version.

<dependency>
  <groupId>com.graphql-java</groupId>
  <artifactId>graphql-java</artifactId>
</dependency>

I see that in .flattened-pom.xml, version 19.2 got mentioned.

<dependency>
  <groupId>com.graphql-java</groupId>
  <artifactId>graphql-java</artifactId>
  <version>19.2</version>
  <scope>compile</scope>
</dependency>

and the dependency tree,

executing mvn dependency:tree, I get below,

  +- com.main:export-structure:jar:1.0.0:compile          -> one of my maven module
   |  +- com.graphql-java:graphql-java:jar:19.2:compile

executing mvn dependency:tree -Dincludes=com.graphql-java:graphql-java

I dont get any dependency tree.

My question is where the version 19.2 comes from ? How does the maven get this 19.2 version ?

Thanks in advance.

Read more here: Source link