问题
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