GoCD package material plugin shim
GoCD 17.1 will deprecate the old-style API-based extension points. The new-style JSON-message-based extension points will be the only way forward. For the package repository material plugin, the new extension point is described here.
Instead of having to rewrite an existing plugin to use the new APIs immediately, this shim gives you a little time and makes the move easier. It brings over the deprecated classes of the old-style extension point and does the translation to and from the new APIs so that most of the existing code can be used as is.
How do I use this?
- Add a dependency to Google's GSON library (available at Maven Central).
- Add a dependency to this library (available at Maven Central).
- Remove the
@Extension
annotation from your plugin's main provider class. - Copy over the class found in this file into your plugin and replace the text
YourOriginalProviderWhichHadExtensionAnnotationOnIt
with the class you removed the@Extension
annotation from in step 3.
Examples
- Moving over the go-maven-poller.
- Moving over the go-puppet-forge-poller.