Hi,

I create a copy task in this manner:

    /**
     * Creates a task that copies all the project's message bundles to
     * build/resources. If 'native2ascii' is enabled, then that tool is
     * used to convert the files from UTF-8 to ASCII en route.
     */
    private createPackageI18nTask(project, dependsOn) {
        def resourcesDir = new File(project.buildDir, "resources")
        project.task("packageI18n", type: Copy, dependsOn: dependsOn) {
            def buildConfig = project.buildData.settings.config
            if (buildConfig.grails.enable.native2ascii) {
                copyAction = new
FileCopyActionImpl(project.fileResolver, new
Native2AsciiCopySpecVisitor())
            }

            from(".") {
                include "grails-app/i18n/**/*.properties"
            }
            into resourcesDir

            // Process any plugin resources bundles as well.
            for (plugin in project.buildPlugins.pluginManager.allPlugins) {
                if (plugin.pluginDirectory) {
                    from(plugin.pluginDirectory) {
                        include "grails-app/i18n/**/*.properties"
                        into new File(resourcesDir,
"plugins/${plugin.name}-${plugin.version}")
                    }
                }
            }
        }
    }

The problem I have is in the iteration over the plugins: the plugins
are not loaded by the plugin manager until execution time. Is there a
way to add extra 'from's to a Copy task during the execution phase? Or
do I need to use a different approach?

Thanks,

Peter

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to