Reputation: 61
After one year working with Grails, I still cannot tell the difference between a dependency and a plugin, so I don't know where to declare each and why.
I used to think that dependencies were Java JAR's, but that's not true since I declared some plugins created by us as depencendies and Grails still recognized them as plugins.
My best guess now is that there's no further difference except that plugins will be exported by default. Am I right?
Thanks in advance.
Upvotes: 4
Views: 1697
Reputation: 20699
Simply put:
plugins DO have influence on the app's live-cycle by modifying it's run-time configuration, they can be involved in the compile and bootstrap phases and extend the existing classes (like GORM does).
Also, being Grails beasts, plugins can have exactly the same artefact types, that a Grails app has.
Last but not least, the plugins can run on their own, w/o being installed into an app.
Upvotes: 2
Reputation: 495
As from stated in Grails Reference guide, these are plugins, http://grails.org/doc/latest/guide/plugins.html, i.e. extensions of Grails Platform that you can plug in order to augment the functionalities of your Grails application. You can write your owns and even publish them in the central Grails repository.
Dependencies are JARs that have nothing to share with Grails itself. An example: JTS (the well known Java Topology Suite, the computational geometry library) might be a dependency of your GIS application, definitely not a plugin!
Sometimes the two concepts overlap because people write plugins that are wrappers to external dependencies, I am thinking about ANgularJS plugin, for instance.
Upvotes: 3