Search code examples
javaeclipsemavenpluginsdependencies

Do you kno any Eclipse's plugin that helps finding project's dependencies on maven repository?


I have created a maven project with web app archetype in eclipse. Is there any plugin or feature that allows me to select my dependencies like eclipse's facet or spring initializr? For example, I want to add Jsf 2.3 or servlet to my project, but I don't know the exact GroupId and ArtifactId of that dependency. This hypothetical plugin opens a window that shows regular or most used projects based on type of project. For example, I specify that I'm using jakarta ee 8 with glassfish and it shows Servlet, jax-rs, Ejb... or if I'm using Spring boot, it shows spring security or other spring sub projects and after I selected my needs It adds dependencies to pom.xml.
I have been enabled index downloads in eclipse. Thanks in advance.


Solution

  • By default, the Maven tooling does not download the Maven index for the Eclipse IDE. 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. You may want to remove this flag after restarting to avoid network traffic at every start of Eclipse.
    Note: The m2e team works on a way to dynamically query for dependencies. Please register for the following bug to show that you are interested in this development:
    Provide an alternative Artifact search mechanism in Eclipse Maven

    How to use:
    1. Create a new Maven project via File  New  Other…​  Maven  2. Maven Project. Press next, filter for the "quickstart" archetype and select the maven-archetype-quickstart entry.