在Eclipse(Spring Source)中,Grails总是以生产模式构建 [英] In Eclipse (Spring Source) Grails always build in production mode

查看:173
本文介绍了在Eclipse(Spring Source)中,Grails总是以生产模式构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如果您想部署到附加的tcServer,您只需要简单地向右点击你的项目然后选择run as - >run on server。

如果你的grails项目设置为dev(右键点击你的项目然后选择属性 - >grails - >在服务器上运行),那么你会期望该项目构建一场发展战。
你会错的。你得到一个生产版本。



你如何得到一个eclipse来构建一场发展战争?

解决方案

每个Grails命令都有一个默认环境,例如




  • grails run-app => dev

  • grails test-app => test

  • grails war =>制作

    您可以通过提供参数 -Dgrails.env =< environment> 来覆盖此默认值。因此,要为开发环境构建一场战争,请运行 grails -Dgrails.env = dev war


    When using Eclipse for your Grails projects the building of the war seems to be stuck in production mode.

    If you want to deploy to an attached tcServer you simply right click on your project then choose "run as" ->"run on server".

    If you have your grails project set to "dev" (right click on your project then choose "properties"->"grails"->"run on server") then you would expect the project to build a development war. You’d be wrong. You get a production build.

    How do you get a eclipse to build a development war?

    解决方案

    Each Grails command has a default environment, e.g.

    • grails run-app => dev
    • grails test-app => test
    • grails war => production

    You can override this default by supplying an argument -Dgrails.env=<environment>. So to build a war for the dev environment, run grails -Dgrails.env=dev war

    这篇关于在Eclipse(Spring Source)中,Grails总是以生产模式构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆