A problem was detected when using the maven Eclipse plugin. In the same workspace has two projects: A and Bed and .
Project A will be provided as a can for a third party, and Project B is created to simulate a scene for using A. So I definitely want the jar to be dependent on B, and not on the project's dependency.
In B pom.xml:
<dependency>
<groupId>com.foo.bar</groupId>
<artifactId>artifact-A</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
</dependency>
As mvn eclipse:clean eclipse:eclipsesuccessfully executed on B, I always got a project dependency. The workaround is to modify the .classpath file or simply copying B to another workspace, but both are inconvenient.
maven 3.0.2; eclipse 3.7 without m2eclipse