@VisibleForTesting
  static Set<Path> getKotlinSourceDirectories(MavenProject project) {
    Plugin kotlinPlugin = project.getPlugin("org.jetbrains.kotlin:kotlin-maven-plugin");
    if (kotlinPlugin == null) {
      return Collections.emptySet();
    }

    Path projectBaseDir = project.getBasedir().toPath();

    // Extract <sourceDir> values from <configuration> in the plugin <executions>. Sample:
    // <executions><execution><configuration>
    //   <sourceDirs>
    //     <sourceDir>src/main/kotlin</sourceDir>
    //     <sourceDir>${project.basedir}/src/main/java</sourceDir>
    //   </sourceDirs>
    // </configuration></execution></executions>
    Set<Path> kotlinSourceDirectories =
        kotlinPlugin.getExecutions().stream()
            .filter(execution -> !execution.getGoals().contains("test-compile"))
            .map(execution -> (Xpp3Dom) execution.getConfiguration())
            .filter(Objects::nonNull)
            .map(configuration -> configuration.getChild("sourceDirs"))
            .filter(Objects::nonNull)
            .map(sourceDirs -> Arrays.asList(sourceDirs.getChildren()))
            .flatMap(Collection::stream) // "array of arrays" into "arrays"
            .map(Xpp3Dom::getValue)
            .filter(value -> !Strings.isNullOrEmpty(value))
            .map(Paths::get)
            .map(path -> path.isAbsolute() ? path : projectBaseDir.resolve(path))
            .collect(Collectors.toSet());

    Path conventionalDirectory = projectBaseDir.resolve(Paths.get("src", "main", "kotlin"));
    kotlinSourceDirectories.add(conventionalDirectory);

    return kotlinSourceDirectories;
  }
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