How can I debug gateway plugin in openfire project?

I want to modify the codes in gateway plugin. but since the gateway is not part of the openfire project codes and it is provided as jar package so I can’t debug the source code of the gateway. Are there any ways to integrate the gateway plugin into the openfire source code so that it can be debugged as other plugins?