Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the equivalent of the retired mvn eclipse:eclipse in m2e?

The Apache Maven Eclipse Plugin is retired. What is the equivalent command line or in Eclipse UI for:

mvn eclipse:eclipse

that generates the files that a project requires to be seen as a Java project in Eclipse?

like image 991
4 revs, 2 users 76% Avatar asked Jul 22 '16 10:07

4 revs, 2 users 76%


1 Answers

The eclipse goal of the maven-eclipse-plugin would actually:

generates the Eclipse configuration files.

Which basically means .project, .classpath and the .settings folder.

These folders and procedure is handled by the Import action, where you can actually specify to import an existing project as a Maven project:

enter image description here

Right click on the Projects view > Import > Import... The procedure will properly create the aforementioned files and configure Eclipse accordingly.

However, shall you already have the project imported (in that case files would already exist), you can convert the existing project to Maven via the Configure action:

enter image description here

A right click on the concerned project > Configure > Convert to Maven Nature would then modify the existing files and settings to recognize the Maven build (mostly adding the org.eclipse.m2e.core.maven2Nature nature and org.eclipse.m2e.core.maven2Builder information to the existing .project file).

like image 117
A_Di-Matteo Avatar answered Oct 23 '22 06:10

A_Di-Matteo