You can configure an eclipse project to resolve dependencies from a
workspace. This has the effect of altering the way that Maven
locates dependency artifacts. If a project is configured to resolve
dependencies from the workspace, these artifacts do not need to be
present in your local repository. Assume that project1 and project2
are both in the same Eclipse workspace, and that project1 (ex, a war
project) depends on project2. If workspace resolution is disabled,
the m2eclipse Maven build for project1 will only succeed if
project2's artifact is present in the local repository. If workspace
resolution is enabled, m2eclipse will resolve the dependency via the
eclipse workspace. In other words, when workspace resolution is
enabled, projects don't have to be installed in the local repository
to relate to one another.
But for the later, that’s not the case.
[NB1:
For transitive dependencies (e.g project1 depends on both project2
and project3, and project2 depends on project3) make sure that
‘workspace resolution’ is enabled for all projects inside the
workspace, else we get unpredictable results:
http://jira.codehaus.org/browse/MECLIPSE-348
]
[NB2:
Extract from
http://www.theserverside.com/news/1363817/Introduction-to-m2eclipse
]
Now let’s perform the following set of commands through the eclipse
IDE to test what mentioned above