How maven handles and determines what version of dependency will be used when multiple versions of an artifact are found?
Answer Posted / Sneha Singh
When Maven encounters multiple versions of the same artifact, it attempts to resolve dependencies using the following priority:n1. Direct Dependencies: Maven looks for a matching version in the project's direct dependencies.n2. Transitive Dependencies: If not found in direct dependencies, Maven checks transitive (indirect) dependencies.n3. Latest Version Policy: By default, Maven uses the latest snapshot or release available based on the configured repositories.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers