Redian新闻
>
eclipse can't resolve transitive dependency projects ?
avatar
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
avatar
r*l
2
Better post your pom file here and mention your .m2 plugin and eclipse
versions.

,

【在 c******n 的大作中提到】
: 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...

avatar
J*n
3
很奇怪,A depends on B and C, B depends on C
Run A的时候也不应该有两份C的hard copy啊
osgi的dependency management也不是这么烂吧... eclipse 4.x可能会和tycho新的
版本协作的更好, 俺老板参加完eclipseCon回来之后说的
avatar
m*k
4
strange, ppl often have A proj depends on B proj while both usually depend
on some common apache util jars, if eclipse does have such a bug, we
should have heard this complain since long ago.
are proj B and B.jar both in proj A's build path now?
proj A and B depend on the same exact C.jar at the same location?
avatar
N*m
5
不知道target platform是不是干这个的

,

【在 c******n 的大作中提到】
: 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...

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。