|
We're trying to simplify application startup for the common case inside our organization in the context of providing a "framework" around grails for (mainly CRUD) webapp RAD targeted at a business-oriented developer group, being one of the most pursued objectives the lack of need to touch any source code as long as posible.
So far the "simplest" approach we found (and implemented) is a plugin (organization-template) which from _Install.groovy installs various other (private & public) plugins & other arbitrary files in the application, while this works ok, we found some oddities such as:
- The user has to do (always) "grails create-app", add a mavenRepo to BuildConfig.groovy (not ideal) & "grails install-plugin organization-template" (which does all the work)
- We found weird to use a plugin as a "project template", which, after the initial installation, is pretty useless and probably should be uninstalled which would be another undesirable step We found some threads around this topic but nothing useful but to use this approach or modifying the grails distribution. When exploring this last approach I've just found these two lines executed con project creation which seem very promising to me:
|
|
Pablo Lalloni wrote:
> > When exploring this last approach I've just found these two lines > <https://github.com/grails/grails-core/blob/master/scripts/_GrailsCreateProject.groovy#L102-103> > executed con project creation which seem very promising to me: > > grailsUnpack(dest: basedir, src: "grails-shared-files.jar") > > > grailsUnpack(dest: basedir, src: "grails-$projectType-files.jar") > > > > But I can't find this two jars which are supposed to be unpacked on > project creation. > > For Grails 2.0.4 those files are in $GRAILS_HOME/dist/grails-resources-2.0.4.jar. Have you looked at the possibility of setting up something like $HOME/.grails/scripts/SpecialCreateApp_.groovy which would allow you to do something like this: grails special-create-app appname That could create the app and do whatever setup you want to do there. Depending on what kind of special stuff you are trying to setup, that may or may not be a great solution. One problem with it is you need some way to distribute the script to all machines that need it. Just a thought. jb -- Jeff Brown SpringSource http://www.springsource.com/ Autism Strikes 1 in 166 Find The Cause ~ Find The Cure http://www.autismspeaks.org/ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
2012/7/11 Jeff Brown <[hidden email]>
For Grails 2.0.4 those files are in $GRAILS_HOME/dist/grails-resources-2.0.4.jar. Thanks a lot for your answer! I didn't know this, sounds great for our use case, we will be installing plugins and various files (templates, layouts, resources, etc.) from such script. The distribution problem is something that will need work, but besides that do you see any other problem?
Is there some way for installing plugins outside an application but in GRAILS_HOME or ~/.? This would be very useful so plugins could provide scripts like "create-app" which can run without a preexistent app.
|
|
You mean like global plugins?
On Wed, Jul 11, 2012 at 1:18 PM, Pablo Lalloni <[hidden email]> wrote:
|
|
Almost... ideally the user should be able to install a "global plugin" outside an existing grails app, currently "grails install-plugin blabla -global" can only be run from inside an existing grails project... of course one could work around this by creating temporal grails app. But then, can a global plugin provide a script which could be run outside an existing grails app?
I guess the desired use case is: $ grails install-plugin some-organization-plugin -global $ grails create-organization-app some-app
Where "create-organizaton-app" is a script provided by the (global) plugin "some-organization-plugin". 2012/7/12 Octavian Covalschi <[hidden email]> You mean like global plugins? |
| Powered by Nabble | Edit this page |
