@VisibleForTesting
  Map<LayerType, List<Path>> classifyDependencies(
      Set<Artifact> dependencies, Set<Artifact> projectArtifacts) {
    Map<LayerType, List<Path>> classifiedDependencies = new HashMap<>();
    classifiedDependencies.put(LayerType.DEPENDENCIES, new ArrayList<>());
    classifiedDependencies.put(LayerType.SNAPSHOT_DEPENDENCIES, new ArrayList<>());
    classifiedDependencies.put(LayerType.PROJECT_DEPENDENCIES, new ArrayList<>());

    for (Artifact artifact : dependencies) {
      if (projectArtifacts.contains(artifact)) {
        classifiedDependencies.get(LayerType.PROJECT_DEPENDENCIES).add(artifact.getFile().toPath());
      } else if (artifact.isSnapshot()) {
        classifiedDependencies
            .get(LayerType.SNAPSHOT_DEPENDENCIES)
            .add(artifact.getFile().toPath());
      } else {
        classifiedDependencies.get(LayerType.DEPENDENCIES).add(artifact.getFile().toPath());
      }
    }
    return classifiedDependencies;
  }
Gets the major version number from a Java version string.

<p>Examples: {@code "1.7" -> 7, "1.8.0_161" -> 8, "10" -> 10, "11.0.1" -> 11}

@param versionString the string to convert
@return the major version number as an integer, or 0 if the string is invalid
jib-maven-plugin/src/main/java/com/google/cloud/tools/jib/maven/MavenProjectProperties.java