private List<Path> collectExtraDirectories(MavenProject project) {
    // Try getting extra directory from project/session properties
    String property =
        MavenProjectProperties.getProperty(PropertyNames.EXTRA_DIRECTORIES_PATHS, project, session);
    if (property != null) {
      List<String> paths = ConfigurationPropertyValidator.parseListProperty(property);
      return paths.stream().map(Paths::get).collect(Collectors.toList());
    }

    // Try getting extra directory from project pom
    Plugin jibMavenPlugin = project.getPlugin(MavenProjectProperties.PLUGIN_KEY);
    if (jibMavenPlugin != null) {
      Xpp3Dom pluginConfiguration = (Xpp3Dom) jibMavenPlugin.getConfiguration();
      if (pluginConfiguration != null) {
        Xpp3Dom extraDirectoriesConfiguration = pluginConfiguration.getChild("extraDirectories");
        if (extraDirectoriesConfiguration != null) {
          Xpp3Dom paths = extraDirectoriesConfiguration.getChild("paths");
          if (paths != null) {
            // <extraDirectories><paths><path>...</path><path>...</path></paths></extraDirectories>
            // paths can contain either strings or ExtraDirectory objects
            List<Path> pathList = new ArrayList<>();
            for (Xpp3Dom path : paths.getChildren()) {
              Xpp3Dom from = path.getChild("from");
              if (from != null) {
                pathList.add(Paths.get(from.getValue()));
              } else {
                pathList.add(Paths.get(path.getValue()));
              }
            }
            return Collections.unmodifiableList(pathList);
          }
        }
      }
    }

    // Return default if not found
    Path projectBase = Preconditions.checkNotNull(project).getBasedir().getAbsoluteFile().toPath();
    Path srcMainJib = Paths.get("src", "main", "jib");
    return Collections.singletonList(projectBase.resolve(srcMainJib));
  }
Print out changing source dependencies on a module. In multimodule applications it should be run
by activating a single module and its dependent modules. Dependency collection will ignore
project level snapshots (sub-modules) unless the user has explicitly installed them (by only
requiring dependencyCollection). For use only within skaffold.

<p>Expected use: "./mvnw jib:_skaffold-files-v2 -q" or "./mvnw jib:_skaffold-files-v2 -pl module
-am -q"
jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/skaffold/FilesMojoV2.java