Reputation: 339
Specific questions in bold.
I am having an issue in which I am trying to integrate the email-confirmation plugin in a Grails 3 project. My build.gradle
builds fine, however, when I try to import the classes defined by the plugin I receive a Cannot resolve symbol <class name>
error.
This plugin has not been touched in ~5 years and has outstanding pull requests stating it is broken as early as Grails 2.4 (yikes, I know).
While I would not be surprised if this is a fool's errand -- I would still hope that Grails 3 offers at least enough backward compatibility to provide me with the ability to compile and reference plugins from prior releases. I have looked at upgarding from grails2.x which refers to plugin upgrading, however, it doesn't seem to make suggestions that plugins for old versions of Grails won't work.
If I add the following to my build.gradle
task showMeCache << {
configurations.compile.each { println it }
}
The email-configuration
plugin is the only to "compile" as a .zip. I imagine that this has something to do with my inability to reference its classes. Was this how all plugins were compiled/distributed in Grails 2.X?
I am now thinking that the only way in which to use this plugin is to refactor the plugin and create my own plugin distribution if I want to get this working (as this SO question indicates it is not possible to configure a plugin locally.).
Is this the only course of action to get a Grails 2 plugin working for a Grails 3 app?
Upvotes: 0
Views: 312
Reputation: 3370
Question 1: Yes.
Question 2: Also yes.
Basically, there is no reasonable way (and may not even be an unreasonable way; I'm not really sure) to get a grails 2 plugin to work in a grails 3 application. You don't have to release your plugin distribution publicly if you'd rather just upgrade it for your own use (but please do, if you get it working to the point where it would be helpful for other people too!) but you will have to follow the plugin upgrade steps to be able to install and use this plugin in your application. Fortunately, if you are already familiar with grails 3, it will not be a particularly difficult process for you most likely!
Upvotes: 2