grails环境配置及开发

1、jdk配置
JAVA_HOME  E:\学习软件安装包\JDK安装包   (注释:此为jdk解压后文件根目录)
CLASSPATH  .;%JAVA_HOME%\lib
Path       %JAVA_HOME%\bin


java -version


至此jdk配置完成


2、tomcat配置
CATALINA_HOME  C:\Program Files\apache-tomcat-6.0.33


找到安装目录,启动startup.bat






3、grails配置
GRAILS_HOME C:\grails-1.3.6
Path       %GRAILS_HOME%\bin


grails




4、maven配置
MAVEN_HOME C:\apache-maven-2.2.1
Path       %MAVEN_HOME%\bin


mvn -v


以上配置完成就可以开发grails项目了
1、grails create-app test
2、cd test
3、grails create-domain-class
4、grails test run-app


编译命令:mvn -Dgrails.evn-test grails:run-app




安装插件:
在eclipse下:groovy
Open up Eclipse and go to Window->Preferences.  Under Java -> Build Path -> Classpath Variables create a new classpath variable with the following values and hit OK:


Name: M2_REPO
Path: C:/Documents and Settings/[Windows user name]/.m2/repository


Also under Window->Preferences, under Run/Debug select String Substitution.  Create a new String Substitution Variable with the following values and hit OK: 


Name: maven_exec
Value: C:\apps\apache-maven-[version]\bin\mvn.bat
Description: Maven Executable




On the Eclipse main menu go to Run -> External Tools -> Open External Tools Dialog… 


Once in the External Tools Dialog box select “Program” and hit the + icon.


Enter the following information and hit Apply:


Name: maven eclipse
Location: ${maven_exec}
Working Directory: ${project_loc}
Arguments: eclipse:eclipse




Repeat steps 12 and 13 for the following sets of values:


Name: maven clean
Location: ${maven_exec}
Working Directory: ${project_loc}
Arguments: clean

Name: maven compile
Location: ${maven_exec}
Working Directory: ${project_loc}
Arguments: compile -Dmaven.test.skip=true

Name: maven package
Location: ${maven_exec}
Working Directory: ${project_loc}
Arguments: package -Dmaven.test.skip=true

Name: maven assembly
Location: ${maven_exec}
Working Directory: ${project_loc}
Arguments:
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值