Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding dependency from local repository - m2e

Tags:

eclipse

maven

m2e

I am using eclipse with m2e plugin and I have in my home folder my local repository. m2e sees it because when I go to

Window->Show View->Maven->Maven Repositories

I can see my local repo, but when I try to add dependency to my project I need to manually write group-id and artefact-id. Surely there must be a way to add dependency through some menu which lists jars in the repository.

like image 418
Andna Avatar asked Aug 27 '26 13:08

Andna


1 Answers

Easy to do, two ways:

  • Double click the POM file so that it opens in the Maven POM Editor. The Dependencies tab will allow you to add the dependency with search capabilities.
  • You can do the same by right-clicking the project, then Maven > Add Dependency

The Add Dependency dialog has a Search field which allows you to start typing and will show matching artifacts. Start typing spring, and it will show you everything Spring-related. You can then pick the desired artifact and version from the list of results and it will be added to your POM file.

like image 72
nwinkler Avatar answered Aug 29 '26 02:08

nwinkler



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!