private static String getArtifactResolverJar(@Nullable String mavenVersion) throws IOException {
    Class<?> marker = MavenArtifactResolvedM31RtMarker.class;

    File classDirOrJar = new File(PathUtil.getJarPathForClass(marker));

    if (!classDirOrJar.isDirectory()) {
      return classDirOrJar.getAbsolutePath(); // it's a jar in IDEA installation.
    }

    // it's a classes directory, we are in development mode.
    File tempFile = FileUtil.createTempFile("idea-", "-artifactResolver.jar", true);

    try (Compressor zip = new Compressor.Zip(tempFile)) {
      zip.addDirectory(classDirOrJar);

      String m2Module = PathUtil.getJarPathForClass(MavenModuleMap.class);
      String commonClassesPath = MavenModuleMap.class.getPackage().getName().replace('.', '/');
      zip.addDirectory(commonClassesPath, new File(m2Module, commonClassesPath));
    }

    return tempFile.getAbsolutePath();
  }
private static String getArtifactResolverJar(@Nullable String mavenVersion)