当前位置: 首页 > 工具软件 > Buildship > 使用案例 >

bboss 与ecipse gradle buildship插件结合使用方法

佘辰龙
2023-12-01
本文介绍bboss 与ecipse gradle buildship插件结合使用方法,但是建议使用gradle sts插件来在eclipse中构建和开发使用bboss框架的项目:[url=http://yin-bp.iteye.com/blog/2313145]点击浏览[/url]
gradle buildship和Gradle IDE Pack(bboss官方推荐,个人感觉Gradle IDE Pack的任务面板更加符合大众的操作习惯,基于此推荐Gradle IDE Pack)是目前比较流行的两个eclipse gradle插件
环境准备:
在命令行执行以下指令(先安装好[url=http://dlsw.baidu.com/sw-search-sp/soft/4e/30195/Git-2.7.2-32-bit_setup.1457942412.exe]git工具[/url]并配置好环境变量)
[img]http://dl2.iteye.com/upload/attachment/0123/1840/3e8f14a6-c21a-3ddf-995a-c66d0707827e.png[/img]

[size=large][b]下载bboss bestpractice源码[/b][/size]
假定源码存放目录d:/workspace/

cd d:/workspace
git clone -b master --depth 1 https://github.com/bbossgroups/bestpractice.git

[size=large][b]1.eclipse中安装gradle buildship插件(gradle官方推荐,bboss不推荐)并导入bestpractice工程[/b][/size]
[b][size=large]1.1 安装gradle buildship插件[/size][/b]
[img]http://dl2.iteye.com/upload/attachment/0119/9334/8768b119-4818-367d-bf3b-999331537eff.png[/img]

[b][size=large]1.2 通过gradle bs将bestpractice工程导入eclipse[/size][/b]
[img]http://dl2.iteye.com/upload/attachment/0119/9336/8701df1f-e355-33a6-b7a6-de17f2ce9ec9.png[/img]

[img]http://dl2.iteye.com/upload/attachment/0119/9338/a4ae5e7f-1ee4-3d48-aead-46e59987f5ce.png[/img]

[img]http://dl2.iteye.com/upload/attachment/0119/9340/1e772d40-60b8-38b4-9311-4769b058e340.png[/img]

[img]http://dl2.iteye.com/upload/attachment/0119/9342/470955c1-0727-3803-a057-d0c0d5db9647.png[/img]

[img]http://dl2.iteye.com/upload/attachment/0119/9345/babe0bfb-d670-39f0-bf61-8dab97094001.png[/img]
[img]http://dl2.iteye.com/upload/attachment/0119/9347/ec33dc1a-ab55-3f46-987e-f34fa05aca8c.png[/img]

[size=large][b]1.3 运行bestpractice/mvc gradle任务:部署和启动mvc web应用[/b][/size]

[img]http://dl2.iteye.com/upload/attachment/0119/9349/785dc1e9-199f-34b7-88ff-6d98901b0942.png[/img]


[size=large][b]2.4 通过gradle sts结合gretty插件调试web应用[/b][/size]

打开gradle tasks面板

[img]http://dl2.iteye.com/upload/attachment/0120/2489/1ca72901-d7d1-3108-803d-138077668a37.jpg[/img]


[img]http://dl2.iteye.com/upload/attachment/0120/2493/dd9bf144-5899-3efd-99e3-3aa150113bd2.jpg[/img]

选择要调试的工程并启动调试端口:

[img]http://dl2.iteye.com/upload/attachment/0120/2495/6c587988-a53f-3fe2-a655-0e9994921d28.jpg[/img]
[img]http://dl2.iteye.com/upload/attachment/0120/2497/6287f07a-96bb-30ee-bdd3-8c4ef4cf7677.jpg[/img]

设置需要调试应用的端口:

[img]http://dl2.iteye.com/upload/attachment/0120/2503/e9dc0b14-7e39-3e31-b938-8af8f06924bb.jpg[/img]

[img]http://dl2.iteye.com/upload/attachment/0120/2505/11897a7b-e73b-3e9a-951f-409a34618fb9.jpg[/img]

[img]http://dl2.iteye.com/upload/attachment/0120/2507/18182c65-2bd0-3846-b4ce-490a9d88b7d3.jpg[/img]

[img]http://dl2.iteye.com/upload/attachment/0120/2509/04f4078b-ae63-3c83-9fbf-43d30ff318c5.jpg[/img]

这样调试应用就启动起来了,可以在浏览器中访问应用并开始调试工作了,[color=blue][size=large]这种调试方法比较烦锁,运行jetty容器主程序来启动和调试应用的快捷和轻量级方法[/size][/color]:

[url=http://yin-bp.iteye.com/blog/2327708]如何快速高效地开发和调试基于gradle管理的web应用[/url]
 类似资料: