[英]Eclipse - Project Referencing another Project instead of .jar File
I have a Java project in eclipse: 我在Eclipse中有一个Java项目:
Project A
contains an Ivy dependency on Project B
. Project A
包含对Project B
的常春藤依赖。
Locally, I checked out and made changes to Project B
. 在本地,我签出并对
Project B
进行了更改。 I then wanted to test the new functionality from Project B
in Project A
, so I added Project B
as a project dependency of Project A
by adding it to the Java Build Path (Java Build Path->Projects->Add...). 那么我想从测试新的功能
Project B
的Project A
,所以我加了Project B
作为项目依赖Project A
将它添加到Java构建路径(Java构建路径- >项目- >添加...)。
I no longer wish to have that dependency on Project A
, but simply removing it from the Projects Build Path hasn't worked. 我不再希望对
Project A
具有这种依赖性,但是仅仅从Projects Build Path中删除它并没有起作用。 With that dependency removed, I would expect that any references to the new local code would result in a syntax error, since those changes have not been incorporated into a new artifact for Ivy to pull in. 删除该依赖项后,我希望对新本地代码的任何引用都将导致语法错误,因为这些更改尚未合并到Ivy可以插入的新工件中。
How can I remove any references to Project B
from Project A
? 如何从
Project A
删除对Project B
任何引用? I've tried deleting both projects and re-checking them out and that did not work. 我尝试删除两个项目,然后将它们重新签出,但没有用。
The way to resolve this issue is to: 解决此问题的方法是:
Project B
in eclipse. Project B
Project A
run Project-Clean Project A
运行Project-Clean Project A
Project A
依赖 Now the dependencies from Project B
should use the Ivy artifact rather than the local changes. 现在,来自
Project B
的依赖项应使用Ivy工件而不是本地更改。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.