docs: @Override
      public boolean analyzeJar(Analyzer analyzer) throws Exception {
  
          try {
          if (scanAgain) {
  
              //this will only have an effect on the first scan, because subsequent scanAgain
              //will use the errorMarker to decide if to scan again
              resetErrorMarker();
  
              List<String> newlyAddedPackages = new ArrayList<String>();
  
              System.out.println("ImportlessPackager plugin: iteration " + iteration);
              // set up exclude filter
              setupFilters(analyzer);
              // collect dependency packages
              Set<PackageRef> importedPackages = collectDependencies(analyzer);
              
              Jar outputJar = analyzer.getJar();
              //loop through the referred packages
              for (PackageRef ref : importedPackages) {
  
                  String packageName = ref.getFQN();
  
                  System.out.println("Seeking package " + packageName);
  
                  boolean foundPackage = false;
                  // locate the package in the classpath and add it the the export
                  for (Jar src : analyzer.getClasspath()) {
                 		if (src.getPackages().contains(packageName)) {
                 			foundPackage = true;
                          System.out.println("Found matching pkg " + packageName + " from " +src.getSource().getAbsolutePath());
                           //only want to include the package itself, not any sub-packages
                           //can provide an Instruction to bnd for this, but it gets a bit weird:
                           //match the package name plus a / since everything in the package will
                           //have the package path followed by a separator.
                           //We use [/|/] to match the single / because bnd needs something to serve
                           //as a wildcard to enable regex matching (otherwise it just does an equals match)
                           //we can't use the other wildcards e.g. * ? because bnd processes them into
                           //.?, .* to do an any character match
                           //If we don't want any sub package content we can't allow any more slashes
                           //so use [^/]+ (i.e. not / 1 or more times)
                           outputJar.addAll(src, new Instruction(ref.getPath() + "[/|/][^/]+"));
  
                           newlyAddedPackages.add(packageName);
  
                           //we don't break the outer loop in case of split packages (ick!)
                           //since we might find some additional content for this package in another jar
                       }
                   }
                   if (!foundPackage) {
                  	 //we couldn't find the package on the classpath, fail the build
                       //with a helpful message
  
                       String errorMsg = "Package " + packageName + " not found for inclusion in jar. Is the package available on the projects classpath?";
                       error(errorMsg);
                  }
              }
  
              //add all the newly added packages to our global list so we don't check them again
              if (newlyAddedPackages.isEmpty()) {
                  //no new packages, no further scanning required
                  scanAgain = false;
              } else {
                  addedPackages.addAll(newlyAddedPackages);
                  iteration++;
                  if (iteration > LAST_ITERATION) {
                      //there are new packages but we've run out of iterations, fail the build
                      error("Maximum number of plugin iterations reached, but there were still new packages to analyze. Consider adding more iterations.");
                  }
              }
  
              //don't bother scanning again if we've already had an error
              if (scanAgain == true && errorMarker.exists())
                  scanAgain = false;
  
          }
          } catch(Exception ex) {
              ex.printStackTrace();
              System.out.println(ex.getMessage());
          }
  
          //tell bnd to reanalyze the classpath if we are going to scan again
          return scanAgain;
      }