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.

- 567
- 6
- 15
-
1You want to add the library of artifact called "jsf" and it exact version pointing to "2.3"? Searching for "maven jsf 2.3" gives the one2one results. Comparing your case to IntelliJ Idea project builders is that intellij contains of predefined versions of possible libs for a project type. But both, after you create the project, leaves adding the "such detaily described libraries" to the developer. – itwasntme Jan 30 '20 at 05:02
-
I'm not lazy in searching. I mean, instead of searching and searching again in every project, I can create my own template or like Eclipse's facet I can select some popular project and IDE adds those in my Pom file or IDE can determine my dependencies from classes and suggest several dependencies. – hamidreza75 Jan 30 '20 at 05:45
-
So the thing you're looking for is having a custom plugin creating project template for the IDE of your choice, where that plugin would automatically cover the dependencies of your choice. In the other way, you can search for the public git repository containing the tools of your need and just clone it (aaand the hard work, update pom/gradle dependencies to the newest if you know such exists) – itwasntme Jan 30 '20 at 05:51
-
1The first thing is to activate to download the index at startup of Eclipse. That will take some time for the first time you start then. But afterwards you are able search within the dependencies within Eclipse.... Take a look at https://ansgohar.blogspot.com/2017/09/how-do-i-enable-index-downloads-in.html – khmarbaise Jan 30 '20 at 07:14
-
thanks, I have been enabled it before, but There are several problems with it. First, I should know the exact name of the artifact. Second, there are thousands artifacts and finding one is time consuming and furthermore, I can't create a preset from those artifacts for later use. – hamidreza75 Jan 30 '20 at 17:23
1 Answers
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.

- 709
- 8
- 16