Monday 18 July 2011

Grails Script to Copy Jar Dependencies

The usual way to include jar dependencies in Grails is to set the versioned dependencies in the BuildConfig.groovy. One issue I can see with this is that it forces you to use Maven, Ivy or at the very least a directory structure that is versioned. While this is a good practice and should be encouraged, there are times when you have to work with legacy build systems and you dont have the benefit of good structure. A script such as the following can copy the jars into the lib directory of the grails project. Call it something like Copyjars.groovy and put it in the scripts directory in the root of the grails project.





Then run the script using "grails prod copyjars"

No comments:

Post a Comment