|
Dear community,
I would like to find out what is the best approach to dealing with the custom modification of a grails plugin. In my case, I'm using the i18n-gettext plugin, but want to avoid usage of java.text.MessageFormat.format(), since it deals so badly with apostrophes (MessageFormat that is, not the plugin). So I have changed a class in the plugin with ~15 lines of code, and everything works as expected. To do so, I modified a file deep in ~/.grails/1.3.7/projects/MyProject/plugins/i18n-gettext-0.98/...
Obviously I can offer my patch to the original creator (and maybe have to, for license reasons, no idea). However, I think most people wouldn't want my patch, they're happy with MessageFormat.
I was surprised to find that `grails clean && grails run-app` kept my changes in place, but wiping ~/.grails/1.3.7/projects/MyProject obviously wouldn't. So how do I keep my changes permanent? Is it possible to override a plugin's class (with code from my own project)? Or should I fork the original plugin and maintain that locally?
Thanks heaps!
|
|
On 21/09/2011, at 1:06 PM, Henning Verbeek wrote:
You should try as hard as possible to get your change incorporated into the plugin, if you've hit the problem others may too. Even if by default it uses MessageFormat, and you add the ability to use something else via a config setting or similar that would be the best outcome. |
|
Thanks for the advice. I will try to do that.
What would you suggest, if the owner of the plugin does not want to include my patch?
On Wed, Sep 21, 2011 at 2:11 PM, Luke Daley <[hidden email]> wrote:
My other signature is a regular expression. http://www.pray4snow.de |
|
On 21/09/2011, at 1:19 PM, Henning Verbeek wrote: Thanks for the advice. I will try to do that. Take the query to the dev list, and we can consider it. It sounds to me like something that should be there so I doubt we are going to be in the situation where no one agrees with you. If that fails, I'm not sure. There are no bulletproof approaches besides forking the plugin and maintaining your own copy. It would be much better to make the enhancement available to everyone though.
|
|
thanks again.
On Thu, Sep 22, 2011 at 4:11 PM, Luke Daley <[hidden email]> wrote:
My other signature is a regular expression. http://www.pray4snow.de |
| Powered by Nabble | Edit this page |
