|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
Script help: how to invoke grails install-pluginHi,
I have several small grails projects all using some common plugins. I am trying to write a groovy script, that lives outside of a grails project which can install a common plugin to all of my grails projects. basically I need it to copy the plugin zip to the grails project dir, then invoke "grails install-plugin <zip>" from each project dir. I can figure out the copy part, but am having trouble with the plugin installation part. Any help appreicated |
|
|
Re: Script help: how to invoke grails install-pluginThis is an educated guess :) since install-plugin itself must be a script, I'm guessing that you should find out how to invoke a script from another script... shouldn't be hard...
On Thu, May 15, 2008 at 8:59 PM, interz <interz12@...> wrote:
|
|
|
Re: Script help: how to invoke grails install-pluginYeah, but the problem is that this groovy script lives outside of the grails project directories.
|
|
|
Re: Script help: how to invoke grails install-pluginYou might be able to use the ant library to spoof a basedir and run
your script --- see first comment on the link ( http://docs.codehaus.org/display/GROOVY/Using+Ant+from+Groovy ) On Thu, May 15, 2008 at 8:28 PM, interz <interz12@...> wrote: > > Yeah, but the problem is that this groovy script lives outside of the grails > project directories. > > > > Miguel Ping wrote: >> >> This is an educated guess :) since install-plugin itself must be a script, >> I'm guessing that you should find out how to invoke a script from another >> script... shouldn't be hard... >> >> On Thu, May 15, 2008 at 8:59 PM, interz <interz12@...> wrote: >> >>> >>> Hi, >>> I have several small grails projects all using some common plugins. I am >>> trying to write a groovy script, that lives outside of a grails project >>> which can install a common plugin to all of my grails projects. >>> >>> basically I need it to copy the plugin zip to the grails project dir, >>> then >>> invoke "grails install-plugin <zip>" from each project dir. >>> >>> I can figure out the copy part, but am having trouble with the plugin >>> installation part. >>> >>> Any help appreicated >>> -- >>> View this message in context: >>> http://www.nabble.com/Script-help%3A-how-to-invoke-grails-install-plugin-tp17261185p17261185.html >>> Sent from the grails - user mailing list archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe from this list, please visit: >>> >>> http://xircles.codehaus.org/manage_email >>> >>> >>> >> >> > > -- > View this message in context: http://www.nabble.com/Script-help%3A-how-to-invoke-grails-install-plugin-tp17261185p17265353.html > Sent from the grails - user mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Script help: how to invoke grails install-pluginThis may work (untested though): "grails install-plugin your-plugin.zip".execute([], "your grails app path" as File)Cheers
On Thu, May 15, 2008 at 11:59 PM, interz <interz12@...> wrote:
-- Sergey Nebolsin Principal Software Engineer, Prophotos.ru |
|
|
Re: Script help: how to invoke grails install-plugin2008/5/16 Sergey Nebolsin <nebolsin@...>:
> This may work (untested though): > "grails install-plugin your-plugin.zip".execute([], "your grails app path" > as File) > http://groovy.codehaus.org/groovy-jdk/java/lang/String.html#execute(java.util.List%20envp,%20java.io.File%20dir) > Cheers Another option is to look a the "startGrails" script in $GRAILS_HOME/bin and use it as a reference for invoking the GrailsScriptRunner class. It this script runner that you really need to use to execute the InstallPlugin script. BTW, why are you copying the plugin zip? InstallPlugin will copy it into the "plugins" directory of the project anyway. Cheers, Peter -- Software Engineer G2One, Inc. http://www.g2one.com/ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Script help: how to invoke grails install-pluginwe are creating a suite of plugins all that share a common base plugin. When that plugin is updated we want to go to one place and update all projects that require it.
|
|
|
Re: Script help: how to invoke grails install-pluginIf its another Gant script you can do:
includeTargets << new File ( "${grailsHome}/scripts/InstallPlugin.groovy" ) args = "/path/to/plugin.zip" installPlugin() Cheers On Fri, May 16, 2008 at 3:39 PM, interz <interz12@...> wrote: > > we are creating a suite of plugins all that share a common base plugin. When > that plugin is updated we want to go to one place and update all projects > that require it. > > > > > Peter Ledbrook-2 wrote: > > > > 2008/5/16 Sergey Nebolsin <nebolsin@...>: > >> This may work (untested though): > >> "grails install-plugin your-plugin.zip".execute([], "your grails app > >> path" > >> as File) > >> http://groovy.codehaus.org/groovy-jdk/java/lang/String.html#execute(java.util.List%20envp,%20java.io.File%20dir) > >> Cheers > > > > Another option is to look a the "startGrails" script in > > $GRAILS_HOME/bin and use it as a reference for invoking the > > GrailsScriptRunner class. It this script runner that you really need > > to use to execute the InstallPlugin script. > > > > BTW, why are you copying the plugin zip? InstallPlugin will copy it > > into the "plugins" directory of the project anyway. > > > > Cheers, > > > > Peter > > > > -- > > Software Engineer > > G2One, Inc. > > http://www.g2one.com/ > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > > > > > -- > View this message in context: http://www.nabble.com/Script-help%3A-how-to-invoke-grails-install-plugin-tp17261185p17276357.html > Sent from the grails - user mailing list archive at Nabble.com. > > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > -- Graeme Rocher Grails Project Lead G2One, Inc. Chief Technology Officer http://www.g2one.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free Forum Powered by Nabble | Forum Help |