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:
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:
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).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…