views:

13

answers:

1

Hi,

I want one folder to be copied from my plugin's base directory (pluginBasedir) to the target project when someone installs my plugin. If I keep that folder within web-app, it gets copied. But I want to keep that folder under base directory.

Do I have to ovverride _GrailsPluginDev.groovy script?

Regards, Paras

+1  A: 

You can use the plugin's _Install script (in the scripts folder). Assuming the folder you want to copy is named 'foo' and the plugin name is 'bar', you can use this:

ant.mkdir dir: "$basedir/foo"
ant.copy(todir: "$basedir/foo") {
   fileset dir: "$barPluginDir/foo"
}
Burt Beckwith