maven eclipse workspace resolution

梦想的初衷 提交于 2019-12-11 00:44:43

问题


I have 2 maven projects in my workspace. They are not a multi-module project, but two separate ones. In one project, I reference the other as a dependency. I have workspace resolution turned on, but it tries to go out to the repository to find it. I've tried deleting an reimporting both projects with no luck, and I'm using the latest version of m2eclipse (0.12.1). I am under the impression that this should work, but does not - any thoughts why?

Edit: The relevant sections of the poms looks like

Project A

<project>
 <groupId>my.company</groupId>
 <artifactId>project</artifactId>
 <version>1.0-SNAPSHOT</version>
 <name>my project</name>
</project>

Project B

<dependencies>
  <dependency>
    <groupId>my.company</groupId>
    <artifactId>project</artifactId>
    <version>1.0-SNAPSHOT</version>
  </dependency>
</dependencies>


回答1:


Looks like you have an old version of m2eclipse - as Guillaume Polet mentioned, the latest version of the m2eclipse plugin is 1.0 something.

The easiest way to get the latest version is to open the eclipse marketplace, search for 'Maven' and install the 'Maven Integration plugin' (and possibly the WTP plugin as well, since you seem to be using that).



来源:https://stackoverflow.com/questions/10535799/maven-eclipse-workspace-resolution

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!