osgi-http uses HK2 APIs for two reasons:
a) It uses Habitat to get hold of Events object so that it can track GlassFish starting and stopping. This can be fixed by using Extender service.
b) It uses Globals and Habitat to get hold of some services. Those can be obtained by using GlassFish.getService().