refactor osgi generation