In case you are using eclipse: There is a wizard for that.
It allows you to select a number of jar libraries and creates a plug-in project (i.e. OSGi bundle) including these jars.
You can find it here:
File -> New -> Other ... -> Plug-in from Existing jar Archives.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…