Solved
issue using frameworkfactory
I am using hudson build , it throwns an error Compiler Error: cannot find symbol symbol : method getBundleContext() location: interface org.osgi.framework.Bundle. Please let me know how to fix it . I am usign the below in pom
<dependency>
<groupId>org.osgi.core</ groupId>
<artifactId>org.osgi.core</ artifactId>
<version>4.3.0</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</ groupId>
<artifactId>org.apache.felix. framework</artifactId>
<version>5.0.1</version>
<!-- You aren't compiling against Felix, just using it at runtime -->
<scope>runtime</scope>
</dependency>
Thanks