简体   繁体   中英

How to copy Grails 2 plugin resources to the Grails app?

I'm writing a custom Grails 2 plugin to modularize my Grails applications. In the plugin I'm planning to define basic GSPs that can be overridden by the application that will utilize the plugin. I'm thinking of writing a Grails command script that copies those GSPs into the grails-app directory of the app the plugin is installed in. If in the plugin, I put those GSPs in grails-app/views , how do I refer to the actual Grails app directory in the Grails command script, which is also grails-app/views ?

The solution to this is almost the same as this answer . The built-in properties basedir and <plugin_name>PluginBaseDir differentiate the target app and the plugin directories.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM