I have put the Openfire.jar in the local Maven repository and setup Maven to build my plugins (with Maven assemblies/descriptors).
In these plugins I've referenced Openfire.jar with scope "provided". The CI is happy with it.
I debug plugins together with the Openfire source code, i.e. start Openfire from IDE, build the plugin first with Maven and copy it in the $openfireHome/plugins folder. My plugin is an IntelliJ module then, so IntelliJ catches it up and let me debug.