I have dependencies installed local on my machine (~/.m2/repository/blah/blah/blah) and m2eclipse is not recognizing them as there - I think m2eclipse is using its own maven instance. Is there any way to force m2eclipse to use the local maven installation in osx?
Eclipse IDE, menu bar. Select Window > Preferences. Select Java > Build Path > Classpath Variables. Click on the new button > defined a new M2_REPO variable and point it to your local Maven repository.
Via the Maven index, you can search for dependencies, select them and add them to your pom file. To download the index, select Windows > Preferences > Maven and enable the Download repository index updates on startup option. After changing this setting, restart Eclipse. This triggers the download of the Maven index.
I had the same problem, and this is what worked for me. Using Eclipse Indigo:
Windows->Show View->Other
In the pop-up: Maven->Maven Repositories
Once the view is displayed, right click on the appropriate repo, and select "Rebuild Index"
Wait a few seconds and done!
I have dependencies installed local on my machine (~/.m2/repository/blah/blah/blah) and m2eclipse is not recognizing them as there.
Do they have good metadata? How did you install them? Because m2eclipse definitely uses your local repository for dependency resolution.
I think m2eclipse is using its own maven instance. Is there any way to force m2eclipse to use the local maven installation in osx?
Yes, m2eclipse uses its own version of Maven by default and you can add an external installation via Window > Preferences > Maven > Installations but this won't change anything to the local repository used by one or the other that you can configure via Window > Preferences > Maven > User Settings as shown below:
alt text http://www.imagebanana.com/img/w5y2vevt/screenshot_008.png
This send us back to the questions above: how did you "install" the problematic dependencies?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With