OSGi technology offers various features that enhance Java development, like versioning and modularization. But tool support is essential for making its 'ease of use' more attainable. The following post contain various resources on how the NetBeans IDE supports OSGi.
The first post by Fabrizio Giudici discusses the overall development of OSGi with NetBeans:
A second post by Geertjan Wielenga discusses how to extend GlassFish via NetBeans with OSGi Support:
And you can also find a third and final post which discusses how to integrate NetBeans with Apache Felix [NOTE: Apache Felix is an OSGi implementation, (e.g. just like Apache Tomcat is a Java web-container implementation)]