Grails命令的缩减版,简化了Grails命令的长度,都以首字母缩写代表,这样很方便的执行各种命令。直接输入g可以看到帮助。
将一下代码保存到$GRAILS_HOME/bin/g.bat文件可以对全局起作用,保持到项目下可以单独对项目起作用。
@echo off
if "%1"=="b" goto bootstrap
if "%1"=="br" goto bug-report
if "%1"=="cl" goto clean
if "%1"=="co" goto compile
if "%1"=="con" goto console
if "%1"=="ca" goto create-app
if "%1"=="cc" goto create-controller
if "%1"=="cdc" goto create-domain-class
if "%1"=="cit" goto create-integration-test
if "%1"=="cp" goto create-plugin
if "%1"=="csc" goto create-script
if "%1"=="cs" goto create-service
if "%1"=="ctl" goto create-tag-lib
if "%1"=="cut" goto create-unit-test
if "%1"=="d" goto doc
if "%1"=="ga" goto generate-all
if "%1"=="gc" goto generate-controller
if "%1"=="gv" goto generate-views
if "%1"=="h" goto help
if "%1"=="i" goto init
if "%1"=="ip" goto install-plugin
if "%1"=="it" goto install-templates
if "%1"=="lp" goto list-plugins
if "%1"=="p" goto package
if "%1"=="pp" goto package-plugin
if "%1"=="pi" goto plugin-info
if "%1"=="rp" goto release-plugin
if "%1"=="ra" goto run-app
if "%1"=="rah" goto run-app-https
if "%1"=="rw" goto run-war
if "%1"=="sp" goto set-proxy
if "%1"=="sv" goto set-version
if "%1"=="shell" goto shell
if "%1"=="s" goto stats
if "%1"=="ta" goto test-app
if "%1"=="u" goto upgrade
if "%1"=="w" goto war
if "%1"=="" goto cmdhelp
goto normal
goto end
:normal
call grails %1 %2 %3 %4 %5
goto end
:bootstrap
call grails bootstrap %2 %3
goto end
:bug-report
call grails bug-report %2 %3
goto end
:clean
call grails clean %2 %3
goto end
:compile
call grails compile %2 %3
goto end
:console
call grails console %2 %3
goto end
:create-app
call grails create-app %2 %3
goto end
:create-controller
call grails create-controller %2 %3
goto end
:create-domain-class
call grails create-domain-class %2 %3
goto end
:create-integration-test
call grails create-integration-test %2 %3
goto end
:create-plugin
call grails create-plugin %2 %3
goto end
:create-script
call grails create-script %2 %3
goto end
:create-service
call grails create-service %2 %3
goto end
:create-tag-lib
call grails create-tag-lib %2 %3
goto end
:create-unit-test
call grails create-unit-test %2 %3
goto end
:doc
call grails doc %2 %3
goto end
:generate-all
call grails generate-all %2 %3
goto end
:generate-controller
call grails generate-controller %2 %3
goto end
:generate-views
call grails generate-views %2 %3
goto end
:help
call grails help %2 %3
goto end
:init
call grails init %2 %3
goto end
:install-plugin
call grails install-plugin %2 %3
goto end
:install-templates
call grails install-templates %2 %3
goto end
:list-plugins
call grails list-plugins %2 %3
goto end
:package
call grails package %2 %3
goto end
:package-plugin
call grails package-plugin %2 %3
goto end
:plugin-info
call grails plugin-info %2 %3
goto end
:release-plugin
call grails release-plugin %2 %3
goto end
:run-app
call grails run-app %2 %3
goto end
:run-app-https
call grails run-app-https %2 %3
goto end
:run-war
call grails run-war %2 %3
goto end
:set-proxy
call grails set-proxy %2 %3
goto end
:set-version
call grails set-version %2 %3
goto end
:shell
call grails shell %2 %3
goto end
:stats
call grails stats %2 %3
goto end
:test-app
call grails test-app %2 %3
goto end
:upgrade
call grails upgrade %2 %3
goto end
:war
call grails war %2 %3
goto end
:cmdhelp
echo ===============================================
echo 使用方法:
echo ===============================================
echo eg: g b = grails bootstrap
echo eg: g br = grails bug-report
echo eg: g cl = grails clean
echo eg: g co = grails compile
echo eg: g con = grails console
echo eg: g ca = grails create-app
echo eg: g cc = grails create-controller
echo eg: g cdc = grails create-domain-class
echo eg: g cit = grails create-integration-test
echo eg: g cp = grails create-plugin
echo eg: g csc = grails create-script
echo eg: g cs = grails create-service
echo eg: g ctl = grails create-tag-lib
echo eg: g cut = grails create-unit-test
echo eg: g d = grails doc
echo eg: g ga = grails generate-all
echo eg: g gc = grails generate-controller
echo eg: g gv = grails generate-views
echo eg: g h = grails help
echo eg: g i = grails init
echo eg: g ip = grails install-plugin
echo eg: g it = grails install-templates
echo eg: g lp = grails list-plugins
echo eg: g p = grails package
echo eg: g pp = grails package-plugin
echo eg: g pi = grails plugin-info
echo eg: g rp = grails release-plugin
echo eg: g ra = grails run-app
echo eg: g rah = grails run-app-https
echo eg: g rw = grails run-war
echo eg: g sp = grails set-proxy
echo eg: g sv = grails set-version
echo eg: g sh = grails shell
echo eg: g s = grails stats
echo eg: g ta = grails test-app
echo eg: g u = grails upgrade
echo eg: g w = grails war
echo ===============================================
echo 不匹配以上任何一种命令,将执行正常的命令语法
echo ===============================================
goto end
:end
good luck...
分享到:
相关推荐
打开Grails命令行并运行create-app grails3-spring-security-demo --profile=web 更新了grails-app/conf/logback.groovy并添加了以下内容: // added so that we get more of the Spring Boot startup logger( ' ...
The definitive guide to grails 2 英文版 书和随书代码, 学习grails必备
Grails Grails Grails Grails Grails
grails 中文第二版
3.7 grails命令行工具 3.7.1 在不同的端口上运行grails应用程序 3.7.2 打包war存档文件(warcarchive) 3.8 使用grails控制台(console)及命令解释程序(shell) 3.8.1 使用命令行shell ...
Grails权威指南Grails权威指南Grails权威指南Grails权威指南Grails权威指南Grails权威指南
Grails 1.3.7英文版官方参考手册,学习Grails的权威指南
由基于 Groovy 的 Gant 工具构建的命令行脚本环境 一个内嵌的 Jetty 容器被配置用来快速重载应用 Spring 容器内建的依赖注入技术 基于 Spring 的 MessageSource 核心概念的国际化 (i18n) 支持 基于 Spring 的...
非常好的grails教材, 建议grails程序员参考
Grails项目的应用越来越多,而对于初学者来说,在Eclipse下搭建Grails项目是一个难题,这个文档将教会你如何搭建Grails项目,希望对你有所帮助。
在学习任何东西之前,最重要的是培养兴趣,Groovy世界最耀眼的技术之一--Grails相信大家早已耳闻,我将通过Grails实战系列文章 向您展现Grails的迷人风采,使您感受到Grails的魅力,以至疯狂地爱上Grails,并坠入...
比较详细的grails中文文档,有所有命令行解释,还有grails的一个完整的学习过程的资料
Grails权威指南第二版 Grails是一个搭建在动态语言 Groovy 之上的开源 MVC 快速 Web 开发框架。使用 Grails 可以提高 Web 开发的效率,降低 Web 开发的复杂度。 本书由Grails项目负责人Graeme Keith Rocher编写,极...
Grails入门指南中文pdf -- 针对grails1.0.4更新,附加idea8 开发grails的流程
构建于Gant 上的命令行脚本运行环境 内置Jetty服务器,不用重新启动服务器就可以进行重新加载 利用内置的Spring 容器实现依赖注入 基于Spring的MessageSource核心概念,提供了对国际化(i18n)的支持 基于Spring事务...
[Apress] Grails 2 权威指南 (英文版) [Apress] The Definitive Guide to Grails 2 (E-Book) ☆ 出版信息:☆ [作者信息] Jeff Scott Brown, Graeme Rocher [出版机构] Apress [出版日期] 2013年01月23日 ...
详细讲解grails开发环境配置。 详细讲解grails连接mysql数据库,crud开发
grails核心源码,版本2.2.2,可以给对grails开发感兴趣的朋友做学习参考。