Grails(1)Build ENV on MAC

Grails(1)Build ENV on MAC
1. Install the Latest Groovy and Grails
1.1 install the latest groovy on mac
>sudo port install groovy
>groovy -v
Groovy Version: 2.0.0 JVM: 1.6.0_37 Vendor: Apple Inc. OS: Mac OS X

1.2 Install the latest grails on mac
>sudo port install grails
>grails -version
Grails version: 2.1.0


The grails home package is here
/opt/local/share/java/grails

2. Prepare the IDE
I will use STS, and I install groovy plugin and grails plugin and scala plugin there.
I do not know why there is no scala project in my views. So I try to install another plugin from this URL
http://dist.springsource.com/release/TOOLS/third-party/scala/e3.7

3. try one demo to verify my installation >grails create-app hellosillycat
>cd hellosillycat
enter the interactive console
>grails
TAB to tip
grails>create-controller hello

Change the content of HelloController.groovy as follow:
package hellosillycat
class HelloController {
def index() {
render "Hello World!"
}
}

Right now, we have the project structure and we have the first action HelloController.groovy. Start the web contrainer:
grails>run-app

Then I can visit the URL http://carl.digby.com:8080/hellosillycat/hello/index to see my controller.s
This command can exit the appliction server.
grails>exit

And the web container of STS is also a very useful tool - VMware vFabric tc Server Developer Edition v2.7

references:
http://sillycat.iteye.com/blog/1137079
http://sillycat.iteye.com/blog/1567050
http://sillycat.iteye.com/blog/1567542

http://sillycat.iteye.com/blog/1074642
http://sillycat.iteye.com/blog/1058726

http://sillycat.iteye.com/blog/562774
http://sillycat.iteye.com/blog/562775

http://www.grailsexample.net/installing-a-grails-development-environment-on-os-x/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值