m2eclipse 工作空间分辨率

发布于 2024-08-29 12:40:51 字数 930 浏览 10 评论 0原文

我正在使用 m2eclipse 来管理 eclipse 中的 Maven 项目。似乎在我使用的上一个版本(0.9.8)中,工作区分辨率根本不起作用,但现在它也不能像我预期的那样工作。即,当项目的“从工作区解析依赖项”设置未选中时,该项目将变为红色并且无法构建。该消息显示:在本地存储库(或某种程度的东西)中找不到工件 xxx xy-SNAPSHOT。问题是 m2eclipse 正在将有关工作区项目的信息放入我的本地存储库中。 有没有办法改变这种行为?

PS 解决方法是关闭 xxx 项目,然后 m2eclipse 解决对我之前在本地存储库中拥有的任何版本(即非快照版本)的依赖关系。

PS2 屏幕截图显示了我在本地存储库中的内容:

  • Eclipse 中的 Maven 存储库

alt text http:// /img96.imageshack.us/img96/1498/mvnrepos.png

  • 相关工件的文件系统版本

替代文本http://img155.imageshack.us/img155/2999/versions.png

  • 快照目录中有什么:

替代文本 http://img72.imageshack.us/img72/120/snapshotq.png

I am using m2eclipse for managing maven projects in eclipse. It seems that in the previous release that I was using (0.9.8) the workspace resolution did not work at all, but right now it also does not work quite as I would expect. Namely, when the "resolve dependencied from workspace" setting for a project is not checked, the project turns red and cannot be build. The message says: artifact xxx x.y-SNAPSHOT cannot be found int local repository (or something to that extent). The trouble is that m2eclipse is putting information about workspace project into my local repo.
Is there a way to change this behaviour?

P.S. The workaround for this is to close the xxx project, then m2eclipse resolved the dependency to whatever version I've had previously in the local repository (i.e. the non-snapshot version).

P.S.2 screenshots showing what I have in the local repo:

  • Maven repos in eclipse

alt text http://img96.imageshack.us/img96/1498/mvnrepos.png

  • filesystem versions of the artifact in question

alt text http://img155.imageshack.us/img155/2999/versions.png

  • what is in the snapshot dir:

alt text http://img72.imageshack.us/img72/120/snapshotq.png

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

欲拥i 2024-09-05 12:40:51

似乎在我使用的上一个版本(0.9.8)中,工作区分辨率根本不起作用,但现在它也没有像我预期的那样工作。

这不是我所经历的。我有一个项目依赖于另一个项目,并且当前正在使用工作区分辨率:

alt text http://img180.imageshack.us/img180/9454/screenshot007l.png

如果我取消选中解决工作区项目的依赖关系(在属性> Maven下) )并应用更改,我的构建路径变为:

alt text http://img704.imageshack .us/img704/8869/screenshot007zh.png

依赖已按预期更改为二进制依赖。

It seems that in the previous release that I was using (0.9.8) the workspace resolution did not work at all, but right now it also does not work quite as I would expect.

That's not what I'm experiencing. I have a project that has a dependency on another project and that is currently using workspace resolution:

alt text http://img180.imageshack.us/img180/9454/screenshot007l.png

If I uncheck Resolve dependencies from Workspace projects (under Properties > Maven) and apply the change, my build path becomes:

alt text http://img704.imageshack.us/img704/8869/screenshot007zh.png

The dependency is changed into a binary dependency as expected.

贵在坚持 2024-09-05 12:40:51

好吧,现在我的答案是降级到 0.9.8 版本,其中插件不会干扰本地存储库。

OK, for now the answer for me has been to downgrade to version 0.9.8, in which the plugin does not mess with the local repo.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文