是否有可能从生产环境中排除grails插件? [英] Is it possible to exclude grails plugin from production environment?

查看:114
本文介绍了是否有可能从生产环境中排除grails插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在开发环境中使用某个插件,但想从生产和生成的战争中排除此插件。什么是最简单的方法来完成这项工作?是的,使用插件作用域。从 http://grails.org/1.1+Release+Notes



插件现在可以使用环境或预定义的构建作用域进行作用域:

  def环境= ['dev','test'] 
def scopes = [excluded:'war']

插件只会在这些环境中加载,并且不会打包到WAR文件中。这允许仅限开发插件不被打包供生产使用。


I would like to use certain plugin in development environment, but would like to exclude this plugin from production and from generated war. What is the easiest way to accomplish this?

解决方案

Yes, using plugin scopes. From http://grails.org/1.1+Release+Notes:

Plugins can now be scoped using either the environment or predefined build scopes:

def environments = ['dev', 'test']
def scopes = [excludes:'war']

The plugins will only load in those environments and will not be packaged into the WAR file. This allows "development-only" plugins to not be packaged for production use.

这篇关于是否有可能从生产环境中排除grails插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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