Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
427 views
in Technique[技术] by (71.8m points)

java - 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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...