参考文献:https://wiki.opendaylight.org/view/GettingStarted:_Eclipse
1、准备工作:
安装jdk
安装maven
下载并安装eclipse
2、配置eclipse 以及安装插件
(1)配置和eclipse可执行文件在同一文件夹里的eclipse.ini
把-Xmx设置为至少1G,推荐是2G;
把-XX:MaxPermSize设置成至少512M,如果你仅用1G作为最大内存,那么建议Permsize设置成300M
(2)安装Eclipse Maven Integration
从eclipse里面的帮助,找到Install New Software
将链接 http://download.eclipse.org/technology/m2e/releases 填在work with后面。
选择m2e和(optionally) m2e - slf4j进行安装
按照提示完成安装,最后重启eclipse即可
(3)安装Eclipse Xtend plugin
从eclipse里面的帮助,找到Install New Software
将链接http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases填在work with后面。
在Xtend-2.4.3下选择Xtend SDKXtend和M2E进行安装
按照提示完成安装,最后重启eclipse即可
(4)安装Eclipse Tycho integration
从eclipse里面的帮助,找到Install New Software
将链接http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-tycho/0.7.0/N/0.7.0.201309291400/填在work with后面。
选择Tycho Project Configurators,点击继续。
按照提示完成安装,最后重启eclipse即可
(5)安装build-helper-maven plugin(这会允许eclipse在源文件夹里看到yang/xtend产生的目录)
从eclipse中windows=> Preferences,展开Maven文件夹选择Discover
在左边的面板里,点击Open Catalog
在查找栏里输入'build'
你可以看到列出的选项里有'buildhelper',选择它并点击完成。
在线面两个面板里点击继续,接受许可项目并点击完成(忽略未签名内容提醒)
询问时重启eclipse
(6)安装Groovy plugin
从eclipse中Help => About,记住你的eclipse版本。
从eclipse中Help => Install New Software
复制连接地址http://dist.springsource.org/release/GRECLIPSE/e4.3到work with后面,并敲击Enter键。注意,本处e4.3,如果你的版本比这个老,请输入对应版本号,例如e4.1,如果你的版本记这个高,可以输入e4.3,因为高版本时向下兼容的(亲测)
选择'Groovy-Eclipse' 和 'm2e Confgurator for Groovy-Eclipse'进行安装。
点击继续,接受许可然后点击完成。
按照提示,重启eclipse。
(7) eclipse开发环境环境建立:(此处为转载.原帖地址:http://blog.youkuaiyun.com/ymh1989qwe/article/details/24589401 )
1)在eclipse中安装maven插件 (eclipse market里找maven integration for eclipse)
2)导入“existing maven project”, 我将workspace设置为:/bak/opendaylight/controller
3) 设置OSGI的target, controller/opendaylight/distribution/opendaylight/opendaylight.target
4) 以debug模式启动opendaylight-osgi-launcher
5)opendaylight Gerrit的地址,https://git.opendaylight.org/gerrit/
或者用其他openflow控制器,如floodlight, http://docs.projectfloodlight.org/display/floodlightcontroller/Installation+Guide
$ git clone git://github.com/floodlight/floodlight.git $ cd floodlight $ git checkout fl-last-passed-build $ ant
$java -jar target/floodlight.jar # run Floodlight
http://localhost:8080/ui/index.html
OK