读书人

施用SpringRoo 为Maven项目添加新模块

发布时间: 2012-07-20 10:38:30 作者: rapoo

使用SpringRoo 为Maven项目添加新模块
安装

    windows 环境
      在环境变量中新建SPRINGROO_HOME=springroo路径,如C:\spring-roo-1.0.1在环境变量PATH中,增加%SPRINGROO_HOME%\bin;在开始->运行中输入cmd,弹出DOS窗口后,然后输入"roo",如果有以下字样:Welcome to Spring Roo. For assistance press TAB or type "hint" then hit ENTER.
      恭喜你,表示成功安装.spring roo 由于maven 问题,暂时不能在linux环境下使用,正在解决中。

?

命令使用

spring roo提供了非常多的命令工具,常用如下:

      help
      帮助。用来显示所以spring roo命令以及使用办法exit
      退出。退出roo操作环境biz bundle add (name 参数代表bundle名字.biz bundle 操作必须项目的app/biz目录下使用)
      创建biz bundle。比如:biz bundle add --name userbiz bundle remove (name 参数代表bundle名字)
      删除biz bundle。比如:biz bundle remove --name user(删除功能仅是对parent pom和总pom进行更新,文件夹还是存在的,需自行删除)synEarPom
      主要用于将主Pom.xml内容同步到assembly下ear/pom.xml中。此命令必须在项目根目录下使用,其他目录下将不能使用web bundle add (name 参数代表bundle名字.web bundle 操作必须项目的app/web目录下使用)
      创建web 模块 bundle。比如:web bundle add --name userweb bundle remove (name 参数代表bundle名字)
      删除web 模块 bundle。比如:web bundle remove --name userbundle add(name 参数代表bundle名字)
      相当于同时执行biz bundle add 和 web bundle add,注意该命令要在根目录执行。比如: bundle add --name userbundle remove(name 参数代表bundle名字)
      相当于同时执行biz bundle remove 和 web bundle remove,注意该命令要在根目录执行。比如: bundle remove --name user
      注意:roo自身还提供了很多其他功能,但结合公司情况暂不能使用。service bundle add(name 参数代表bundle名字)
      创建common-service-'name' bundle,必须在common/service目录执行。比如:service bundle add --name userservice bundle remove(name 参数代表bundle名字)
      删除common-service-'name' bundle,必须在common/service目录执行。比如:service bundle remove --name user

?ps:请保证roo的执行目录中没有中文,不然会创建失败。

读书人网 >开源软件

热点推荐