static List<ExtraDirectoryParameters> getExtraDirectories(
      JibPluginConfiguration jibPluginConfiguration) {
    List<ExtraDirectoryParameters> extraDirectories = jibPluginConfiguration.getExtraDirectories();
    if (!extraDirectories.isEmpty()) {
      for (ExtraDirectoryParameters directory : extraDirectories) {
        if (directory.getFrom().equals(Paths.get(""))) {
          throw new IllegalArgumentException(
              "Incomplete <extraDirectories><paths> configuration; source directory must be set");
        }
      }
      return extraDirectories;
    }

    MavenProject project = Preconditions.checkNotNull(jibPluginConfiguration.getProject());
    return Collections.singletonList(
        new ExtraDirectoryParameters(
            project.getBasedir().toPath().resolve("src").resolve("main").resolve("jib").toFile(),
            "/"));
  }
Gets the list of extra directory paths from a {@link JibPluginConfiguration}. Returns {@code
(project dir)/src/main/jib} by default if not configured.

@param jibPluginConfiguration the build configuration
@return the list of resolved extra directories
jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/MojoCommon.java