One option is to use the Eclipse Plugin Development Environment (PDE), a toolkit that supports OSGi. It will not allow you to compile files with internal packages, so it gives you a check on development time. Unlike the maven bundle plugin, it appears first, not the code first, which not everyone likes.
To integrate PDE with Maven, it is best to use the Maven Tycho plugin . This gives you a fully prepared OSGi compilation phase in Maven.
source share