把Maven项目转换成Eclipse项目只要使用Maven的Eclipse插件就能做到
mvn eclipse:eclipse
其实Maven的Eclipse插件也有把Eclipse项目转换成Maven项目的命令,通过命令
mvn eclipse:help
就能看到
.....
eclipse:to-maven
Add eclipse artifacts from an eclipse installation to the local repo. This
mojo automatically analize the eclipse directory, copy plugins jars to the
local maven repo, and generates appropriate poms. This is the official central
repository builder for Eclipse plugins, so it has the necessary default
values. For customized repositories see MakeArtifactsMojo Typical usage: mvn
eclipse:to-maven
-DdeployTo=maven.org::default::scpexe://repo1.maven.org/home/maven/repository-
staging/to-ibiblio/eclipse-staging
-DeclipseDir=.
但我一直没能成功,无意中发现安装了Maven插件的Eclipse有相应的菜单:在Eclipse项目上右键如下图:
”不识庐山真面目,只缘身在此山中“呀!
如果你知道如何使用“eclipse:to-maven”也请告知下,3KY.