You can change your Roo project into an OSGi bundle by editing your POM as follows:
- changing the packaging from "war" to "bundle", and
- adding the Felix "bundle" plugin; here is a minimal configuration:
Code:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.4</version>
<extensions>true</extensions>
</plugin>
You might well want to tweak the bundle configuration as described here, e.g. to limit what packages are exported. You will also need to satisfy your project's dependencies (e.g. JPA), but you may already have that bit figured out.
From my limited testing, Roo seems happy for you change the POM as described above. Let us know how you go!