0
votes

Based on the slide show at http://www.slideshare.net/kennethaliu/modularizing-your-grails-application-with-private-plugins-springone-2gx-2012 I am trying to modularize my app. To do it I have created a plugin called lms-core and added it in the same directory as main app's grails-app

For adding the dependency I have added following code in my buildconfig

    plugins {
         ...
        grails.plugin.location.LmsCore = "lms-core"
        grails.plugin.location.'lms-core' = "lms-core"
    }

I have tried the both ways show in the code with and without the dash(-) and I still get unable to resolve class compile error. These are the classes moved to the plugin. I have already gone through following questions without any solutions

How to run a local plugin in Grails 2.0?

http://grails.1312388.n4.nabble.com/Insert-own-local-plugin-into-build-config-td4646704.html

1
You tried the absolute path? And while I'm here, have you tried installing it to your local maven cache and using the normal "name:version" syntax? - christopher
Yes I tried the absolute path like "E:\\folder\\folder" but then the plugin was outside of the parent app. No I haven't tried the maven because I am still developing the plugin where views are in the parent app and domain classes are in the plugin - Sap
That doesn't sound like an appropriate use of a plugin to me. A plugin is supposed to be a self contained piece of functionality. You might have a security plugin but I've never heard of someone putting their domain classes in a separate plugin. - christopher
Well, my scenario is exactly like in the slide show. The reason we are doing this is because we want to create two website with different views but same models. One view is for content creator/Admin while the other is for the user. - Sap
Okay. So can't you define the domain objects and release that instead? Honestly, I do think that publishing to a local DM cache is much better than hacking away with file locations. - christopher

1 Answers

0
votes

You must place the grails.plugin.location outside the plugins closure.

plugins {
         ...
}
grails.plugin.location.'lms-core' = "../lms-core" // Or wherever the location is