i am using eclipse and maven integration.
maven install puts the resources to the local repositories. local repositories is divided into “local repository” and “workspace projects” as shown in eclipse view “Maven Repositories”.
The resource is unvailable to be linked by other projects of a different workspace. is there a way having “maven install” to put shnapshots to the “top” local repository available for any project?
or do i missunterstand the concept?
Workspace projects is a just a convenience feature provided by the m2e plugin where it resolves the dependencies to projects in the current workspace if the artifact specification (group id, artifact id and version) matches that of a project in the workspace. If there are no matches, m2e just uses the jar in the
.m2/repofolder as the dependency.The benefit of this feature is that you don’t have to maven
buildandinstallthe dependency projects continuously, your code changes are reflected immediately in the dependent project.However, this is just a convenience feature and you can always do a maven install in a dependency project and refresh the dependent project to get the change reflected there.
TL;DR just do a usual maven install on your dependency project and refresh any workspace. It should work.