开发者

Grails build production by default in netbeans

I have been heavily using grails with netbeans for one of my projects, I at least deploy this project to prod environment 9-10 times a day and every once in a while (2-3 times a day) I create a war file configured for "Development" environment and I deploy it to my production server. This effectively brings down my service. To prevent this is ther开发者_开发技巧e a way to configure my build file or netbeans so that when ever I make a build by right clicking on the project name I see a msgbox reminding me that build is geting made for Dev env? Thanks in advance.


i would recommand to write your own cmd line scripts, which generate the war for the right env. e.g.

deploy_prod.bat script:

call grails prod war <name of war file>.war

on cmd line you can call the script by:

deploy_prod.bat

you can also use cmd line args to set the evn. e.g. deploy.bat prod


Ok I found a solution from hitty5's response. I created a batch file in my NB project folder which runs grails prod *-prod.war

Then from with my ide i have to right click on the file and select "Open in System" option and it will run the batch file:) Thanks

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜