This can be achieved by implementing hudson.model.listeners.ItemListener
.
It has onLoaded()
, onCreated(Item item)
, onUpdated(Item item)
, which can be used to add in this case a Notifier
to the project... the Item can be casted to AbstractProject
, then getPublishersList().add(
instance to add)
.
Don't forget when modifying the build or project objects in this way to call .save()
to ensure your changes are persisited.