code: public Set<String> getLocalResources(boolean test) {
          Set<String> resources = new LinkedHashSet<>();
          File classes = getClassesDirectory();
          if (test) {
              classes = new File(basedir, "target/test-classes");
          }
          if (classes.isDirectory()) {
              DirectoryScanner scanner = new DirectoryScanner();
              scanner.setBasedir(classes);
              scanner.setExcludes(new String[]{"**/*.class"});
              scanner.addDefaultExcludes();
              scanner.scan();
  
              Collections.addAll(resources, scanner.getIncludedFiles());
          }
  
          return resources;
      }
docs: Gets the list of resource files from {@literal src/main/resources} or {@literal src/test/resources}.
  This method scans for all files that are not classes from {@literal target/classes} or {@literal
  target/test-classes}. The distinction is made according to the value of {@code test}.
  
  @param test whether or not we analyse tests resources.
  @return the list of packages, empty if none.