Eclipse: Resolve Workspace projects

本文详细介绍了在使用Maven管理Java项目时遇到的Libraries组件显示引用jar而非工作空间的情况,以及如何通过启用ResolveWorkspaceprojects选项来解决依赖解析问题。此外,还提供了清理工作空间、重建索引和更新项目的步骤,以确保项目依赖的一致性和即时生效。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

When Import Maven project:

"Java Build Path" > "Libraries" 中的 component 显示的是引用 jar, 而不是引用本 workspace. 此时就要勾选 "Resolve Workspace projects".

 

Resolve Workspace projects:

Dependencies opened as workspace projects will be resolved without having to install them to your local Maven repository first. This way, any changes made to one of these dependencies will have an immediate effect on other projects consuming it (compilation, refactoring, etc.).

 

When Resolve Workspace projects is disabled, dependencies existing in the workspace must be installed to your local Maven repository after any change (by running mvn install), in order to see effects in projects consuming them.

 

 

Window->Show view->Other...->Mave Repositories

Right-click "Workspace projects", and select "Rebuild index", and then "clean all projects", and Maven "update project" again. then problem solved. actually not sure whether solved by this.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值