Grails' Config.groovy in plugins and dependent apps -


I will use a Grails plugin and the plugin which am I building several Grails apps.

I want to define some properties and give them default in the plugin, but let the app optionally override your values ​​(optional). This question is surrounded by mechanical details in how to wire both the plugin and the child app.

Say I want to define the following properties for the following plugin ( grails-myplugin ) of its Config.groovy :

  myplugin {fizz {whistles = true // default = 3 / this plugin} for all child apps using this plugin buzz}} grails.plugins.anotherPlugin.widget = 'auto' grails.plugins.anotherPlugin .foo = '$ {myplugin.fizz.buzz} -40' // So, by default, '3-40' is  

Now, I want a baby Grails app, say , To override myapp.war (which uses grails-myplugin ) 2 FASA properties:

  // myapp's Config.groovy: myplugin {fizz {// whistles property is not defined here, so uses this app // Override the plugin's default "true" // 3 plugin's value; Here are some problems:  

  • Have I kept everything right for the desired functionality?

  • With the above configuration, grails-myplugin 's config.groovy , I have an error message: < / P>

    Multiple markers in this line: - Type groovy.lang.MetaClass can not be resolved. It is indirectly referred to the necessary class squares. - Type groovy.lang.GroovyObject can not be solved. It is indirectly referred to the expected class squares.

  • This error is telling me that I am trying to do anything to ether is impossible in Grails, or that I'm just doing it wrong idea?

    Here's how the quartz plug-in has been resolved: View the LoadQuartzConfig method.

    Also keep in mind that grails exits some parts to avoid problems while installing the plugin. It is configured on a plugin file like this:

      def pluginExcludes = ['grails-app / jobs / **', 'src / docs / **', 'web-app / ** ']  

    Comments

    Popular posts from this blog

    import - Python ImportError: No module named wmi -

    Editing Python Class in Shell and SQLAlchemy -

    c# - MySQL Parameterized Select Query joining tables issue -