eclipse can't resolve transitive dependency projects ?# Java - 爪哇娇娃
c*n
1 楼
In a Java project in Eclipse, I am trying to debug project A.
Project A has a dependency on B.jar, normally B.jar comes from my .m2/
repository. but now I want to make some temp changes to B's code, and have
it reflected in A, so I directly edit the source code in B project in
eclipse, and set B as a dependency project in A's build path. Additionally,
both A and B refer to C.jar as their dependencies.
This builds A fine, but when it is run, A's classpath contains 2 copies of
all the classes and resources in C.jar. this creates a problem for those
hibernate hbm.xml mapping files in C.jar and I got errors saying duplicate
mapping for...
This looks to be a defect in eclipse, in that it lacks the resolution
ability as maven posseses. is there a way to work around this? (apart from
building B and installing to .m2 instead of having it as a dependency
project)
Thanks
Project A has a dependency on B.jar, normally B.jar comes from my .m2/
repository. but now I want to make some temp changes to B's code, and have
it reflected in A, so I directly edit the source code in B project in
eclipse, and set B as a dependency project in A's build path. Additionally,
both A and B refer to C.jar as their dependencies.
This builds A fine, but when it is run, A's classpath contains 2 copies of
all the classes and resources in C.jar. this creates a problem for those
hibernate hbm.xml mapping files in C.jar and I got errors saying duplicate
mapping for...
This looks to be a defect in eclipse, in that it lacks the resolution
ability as maven posseses. is there a way to work around this? (apart from
building B and installing to .m2 instead of having it as a dependency
project)
Thanks