I am having trouble understanding what is going on in the maven dependency tree when it indicates a version managed from x; omitted for duplication.
For example, suppose I have enterprise-data-2.4 defined in the server-a dependency management section.
I get the following in the server-a dependency tree for one of the server-b dependencies pulling in enterprise-data-2.4 .
[INFO] +- hello.world.welcome.to:server-b:jar:3.1-SNAPSHOT:runtime [INFO] | +- (hello.world.where.am: enterprise-data:jar:2.4:runtime - version managed from 3.0; omitted for duplicate)
Assuming server-b is the only jar pulling enterprise-data-2.4 , I understand that server-a will always pull enterprise-data-2.4 here. Is it correct?
However, I have code in server-b that depends on enterprise-data-3.0 , and server-b has compile-time dependency on enterprise-data-3.0 .
Now I have a test project, say test-b , which tests the server-b jar present inside the server-a project and has a test dependency on enterprise-data-3.0 . These tests directly fall into the code present on server-a .
When I run my tests in test-b , I should get errors when trying to access the functions present in enterprise-data-3.0 , since it does not get pulled into server-a or will it pass because there is a test dependency on enterprise-data-3.0 ? It is currently undergoing, but I'm not sure how sufficient the test dependency is.
Please help me understand.
Edit: I am using maven-3 .
Thanks.
java maven dependency-management
collegian
source share