简体   繁体   English

设置依赖的 Maven Java 项目,因此无需运行 maven install 即可立即获取更改

[英]Setup dependent Maven Java projects so changes are pickedup right away without run maven install

I have two Maven Java projects in Eclipse.我在 Eclipse 中有两个 Maven Java 项目。 I added Project B is a dependency in Project A's pom.xml file.我在项目 A 的 pom.xml 文件中添加了项目 B 是一个依赖项。 Each time a code change is made to Project B, I have to do 'run maven install' on B, and then do a 'maven update project' on A, in order for the changes to appear in A. Is there a better/faster yet proper way to manage this?每次对项目 B 进行代码更改时,我都必须在 B 上执行“运行 Maven 安装”,然后在 A 上执行“Maven 更新项目”,以便更改出现在 A 中。有没有更好的/更快但正确的方法来管理这个?

I have tried to remove the maven dependency in A's pom.xml and use Eclipse's the project dependency, that result in class not found error when I try to run A.我试图删除 A 的 pom.xml 中的 maven 依赖项并使用 Eclipse 的项目依赖项,这导致当我尝试运行 A 时找不到类错误。

您可以在 Maven 运行配置中添加“刷新资源”-> 完成后的整个工作区

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM