title: Using ClassPathScanningCandidateComponentProvider with multiple jar files?
body: <p>I'm looking at using ClassPathScanningCandidateComponentProvider for finding sub-classes of a specific Class in my JVM.</p>
  
  <p>I'm doing pretty much exactly what is described here: <a href="https://stackoverflow.com/questions/259140/scanning-java-annotations-at-runtime">Scanning Java annotations at runtime</a></p>
  
  <p>However, when I call the code from ant, via a JMX bean I hit a serious issue.</p>
  
  <p>I call: ClassPathScanningCandidateComponentProvider.findCandidateComponents with the search package: "com.mycompany"</p>
  
  <p>However, there are multiple jar files in my classpath that contain classes that start with that package. Spring is stopping scanning after the first one is scanned (I know this as if I search for sublasees of java.lang.Object I get all classes in one jar file).</p>
  
  <p>Is there a way to tell ClassPathScanningCandidateComponentProvider/Spring not to stop scanning after the first jar ?</p>
  
  <p>Cheers</p>