Previously posted on blog.labrat.info on January 27, 2011
After getting the upload part up and running so quick and easily, I’ve had a nasty time trying to get the Image Tools plugin for Grails to work with my application. I tried using the version that’s mentioned in the Grails documentation for the file but kept getting the following error:
[groovyc] /Users/test/Documents/Proj-test/grails-app/controllers/ProjController.groovy: 192: unable to resolve class ImageTool [groovyc] @ line 192, column 21. [groovyc] def imageTool = new ImageTool() [groovyc] ^
After looking around for a bit I found the code on the project’s Github seemed correct but I still couldn’t get the plugin installed. Kept getting errors that files were missing and the structure was incorrect. I found out I had to build my own version of the plugin with the code I had checked out. Once I did this everything started to work.
Once that is done don’t forget to import the library before you use it:
import org.grails.plugins.imagetools.*