Maven:m2eclipse:禁用工作区解析导致缺少工件 [英] Maven: m2eclipse: Disable Workspace Resolution Causes Artifact Missing

查看:86
本文介绍了Maven:m2eclipse:禁用工作区解析导致缺少工件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的项目A依赖于我的Eclipse工作区中的项目B和C.

I have project A which depends on projects B and C in my Eclipse workspace.

有时候,我希望A使用存储库中的工件B和C而不是工作空间中的版本来运行.因此,我选择A,然后选择"Maven-> Disable Workspace Resolution",以便A使用仓库中的版本.

Sometimes I want A to run using the artifacts B and C from the repository rather the versions in the workspace. Therefore, I select A, and then select 'Maven-> Disable Workspace Resolution' so that A would use the versions from the repository.

但是,一旦执行上述操作,我就会在项目A的pom文件中收到错误消息缺少工件B"和缺少工件C".

However, as soon as I take the above action, I get the error messages "Missing artifact B" and "Missing artifact C" in the pom file of project A.

我已尝试清理该项目,选择了"Maven |更新",并选中强制更新jar/发行版".这些都不解决了问题.

I've tried to clean up the project, I've select 'Maven | Update' with the option 'Force update of jars/releases' checked. Non of these have resolved the problem.

我是否错误地使用了"Maven->禁用工作区分辨率"?

Am I using 'Maven-> Disable Workspace Resolution' incorrectly?

其他信息:这些项目的确切版本在存储库中.实际上,如果我在工作区中关闭项目B和C,则项目A会愉快地使用B和C的存储库版本.

Additional Info: The exact versions of those projects are in repository. In fact, if I close projects B and C in the workspace, project A happily uses repository versions of B and C.

推荐答案

您将需要将项目B和C安装在本地m2存储库中,并具有项目A的pom.xml中引用的确切版本.

You will need to have the projects B and C installed in your local m2 repository with the exact versions as they are referenced in the pom.xml of project A.

这篇关于Maven:m2eclipse:禁用工作区解析导致缺少工件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆