Grails – Plugin file not found for plugin project

If you have just renamed your Grails plugin project and getting this error “Plugin file not found for plugin project” and wondering – “What’s going on?”

Consider this. Grails is based on DRY principle. Convention over configuration. By convention, the plugin descripor file should end in the word “GrailsPlugin”

Most likely it would have happened that you wanted to rename AbcDef grails plugin to say Abc plugin

In the process, instead of renaming AbcDefGrailsPlugin.groovy file in your plugin root directoy to AbcGrailsPlugin.grooy, you might have mistakenly renamed it to just AbcPlugin.groovy. Since the word GrailsPlugin was not in the name, it was considered as the normal project instead of Plugin project.

If you look inside $GRAILS_HOME/scripts/_GrailsPluginDev.groovy file, you can see the following code snippet


metadataFile.name,
 "*GrailsPlugin.groovy",

In short, the solution is to rename the file and the class defined inside it to AbcGrailsPlugin.groovy

Leave a Reply

Your email address will not be published. Required fields are marked *