在JetBrain IDEA中导入svn上的eclipse maven项目

在IDEA16中导入svn上的eclipse maven项目,将项目分解为三个方面:

  • 项目在svn上,需要TortoiseSVN等svn工具
  • 项目是一个eclipse项目
  • 项目是一个maven项目

安装和配置svn

下载TortoiseSVN工具,链接地址:https://tortoisesvn.net/downloads.html
安装,本机安装路径:C:\Program Files\TortoiseSVN

在IDEA中配置svn工具,安装插件Subversion Intergration
file->setting->plugins->搜索Subversion Intergration,如果没有安装,在repositories中搜索安装,并且在右侧打钩。重启IDEA。
安装好如图所示:
在JetBrain IDEA中导入svn上的eclipse maven项目

配置IDEA Subversion
setting->Version Control->Subversion
选择Use command line client为svn安装路径下bin目录中的svn.exe
如图:
在JetBrain IDEA中导入svn上的eclipse maven项目

#安装配置maven
1.下载maven,地址:http://maven.apache.org/download.cgi#
2.解压缩。
3.配置环境变量,系统变量中新增 MAVEN_HOME:maven安装路径
path中追加%MAVEN_HOME%\bin;
4.设置本地maven仓库,在maven安装目录下conf\setting.xml中新增:
<localRepository>E:\\Mave\\localRepository(本机指定maven仓库路径)</localRepository>
如果不指定将默认C:\Users\Administrator.m2
5.在IDEA中配置maven,
setting->Build,Execution,Deployment->Build Tools->Maven
在JetBrain IDEA中导入svn上的eclipse maven项目
注意指定Maven home directory和Local Repository

maven配置完成

项目导入

新建一个空项目
在JetBrain IDEA中导入svn上的eclipse maven项目
通过subversion导入项目
在JetBrain IDEA中导入svn上的eclipse maven项目
输入svn路径,checkout到特定路径下。
file->new->projects from existing sources
设定项目为eclipse项目,一路next
在JetBrain IDEA中导入svn上的eclipse maven项目

在编辑器右侧maven tool bar中设置maven关联,右侧没有tool bar,在view->Tool windows->maven project设置。
点击“+”号关联所有pom.xml,如图:
在JetBrain IDEA中导入svn上的eclipse maven项目

在JetBrain IDEA中导入svn上的eclipse maven项目

在JetBrain IDEA中导入svn上的eclipse maven项目

导入完成。