把Eclipse项目转换成Maven项目

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

出处:http://www.zhaiqianfeng.com    
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
原文地址:https://www.cnblogs.com/zhaiqianfeng/p/4620164.html