title: Why third party dependency is required exclusively from OSGi container even if I have it in my maven dependencies?
body: <p><strong>I want to know why OSGi do not respect the maven dependenceis.</strong></p>
  
  <p>I want to create one app  in OSGi(AEM). I want to communicate(CRUD) to the database with the help of JPA(eclipselink).</p>
  
  <p>I created maven project with aem-archetype.</p>
  
  <p>Added all required dependencies(of JPA) into my maven project's pom file.
  No errors in Eclipse, I built the project via <code>mvn clean install</code> and installed it into AEM(CQ5) via <code>mvn sling:install</code>. All good till now. No Errors.</p>
  
  <p>But when I go and see my bundle in the felix console, I see that it is not <em>Active</em> but in <em>Installed</em> state.The error reported is that it could not resolve the <code>javax.persistence</code> package.
  I was puzzled, I searched and I read about it here -</p>
  
  <blockquote>
    <p>You have to make sure that you place the same version in another
    bundle and deploy first.  <a href="https://forums.adobe.com/thread/2325007" rel="nofollow noreferrer">https://forums.adobe.com/thread/2325007</a></p>
  </blockquote>
  
  <p>I converted JPA jar to OSGi bundle and installed in my OSGi container, and the error was gone. Great!</p>
  
  <p>But why OSGi is not watching out for the dependencies I wrote in pom.xml of my maven project. Why it needs JPA strictly from OSGi bundle? </p>
  
  <p>Maybe this is due to any architectural benefit, but could anyone please explain me here about this behaviour of OSGi? And why/how this feature of OSGi is useful ?</p>