title: Eclipse maven workspace is too slow with bnd plugin
body: <p>I am using bnd 4.2.0 version</p>
  
  <p>I am building OSGI based application and I am using Eclipse IDE for development. My project is maven based and I am using bnd maven plugins for creating bundles and I use bnd tools eclipse plugin to manage bndrun files in eclipse. Opening bndrun files in Eclipse and even building and debugging application is extremely slow. </p>
  
  <p>I did some investigation in bnd plugin code and found that in class</p>
  
  <pre><code>DefaultRunProvider.java 
  </code></pre>
  
  <p>line number 25, the Workspace object is never resolved as </p>
  
  <pre><code>project.hasNature(BndtoolsConstants.NATURE_ID) 
  </code></pre>
  
  <p>is always false. 
  So everytime a for example a bndrun file is opened, it creates a new Workspace Object. AS the code proceeds further, in </p>
  
  <pre><code>MavenImplicitProjectRunListener.java
  MavenImplicitProjectRepository implicitRepo = workspace.getPlugin(MavenImplicitProjectRepository.class); 
  </code></pre>
  
  <p>is found as null and because of that MavenImplicitProjectRepository is newly initialized and whole process of resolution is done every time. At the end of resolution the MavenImplicitProjectRepository object is added to plugin registry but after closing the bndrun file and opening it again, the whole information is lost and the same set of initializations happens again and again. This takes a lot of time in opening the bndrun file. </p>
  
  <p>For a workspace with around 30 projects, it takes around 20-30 seconds to open the file.</p>
  
  <p>The same behavior is observed when debugger is launched. It takes similar amount of time to get the debugger point to the file where debug point is set. </p>
  
  <p>This behavior is only for visible when maven based project is configured. Its not observed if the project is bnd workspace.</p>
  
  <p>The issue of slow opening of bndrun file can be replicated using following sample project
  <a href="https://github.com/prafullp/maven-bnd-issue.git" rel="nofollow noreferrer">https://github.com/prafullp/maven-bnd-issue.git</a></p>
  
  <p>Need guidance if I have configured the project wrongly or something is missing.</p>