当svn有多个子项目且没有根项目的时候,用eclipse拷贝下来是容易出问题的,常常子项目之间的依赖会有问题,仍是推荐用IDEA。java
操做说明:web
若是SVN有 A,B,C,D四个项目,A为web项目,B为给客户端的接口应用,C为公共应用,D为DAO应用eclipse
A,B,C,D都是以zt开头的命名svn
先在IDEA的项目目录新建A,B,C,D四个项目名目录,再新建一个zt-integration文件夹再在zt-integration文件夹下建一个build.gradle文件,里面不写内容,再建一个settings.gradle文件,里面内容为:gradle
boolean buildAll = System.getProperty('all', '1') == '1' if (buildAll) { String[] upDirs = new File('../').list(new FilenameFilter() { public boolean accept(File dir, String name) { return name.startsWith("zt") && !name.endsWith('integration'); } }); println "包含子工程:$upDirs" includeFlat upDirs }
而后再在每一个目录下check out对应的项目代码。ui
打开IDEA,而后File-->new-->project from existing Source 把zt-integration导入进来,就会把子项目加进来code
各个子项目的依赖用 compile project(':其余子项目名')blog