@SuppressWarnings("RedundantThrows")
  static void resolveMissingDependencies(CompileContext context, Collection<? extends JpsModule> modules,
                                         BuildTargetChunk currentTargets) throws Exception {
    Collection<JpsTypedLibrary<JpsSimpleElement<JpsMavenRepositoryLibraryDescriptor>>> libs = getRepositoryLibraries(modules);
    if (!libs.isEmpty()) {
      JpsDependencyResolverConfiguration resolverConfiguration = JpsDependencyResolverConfigurationService
        .getInstance()
        .getOrCreateDependencyResolverConfiguration(context.getProjectDescriptor().getProject());

      boolean ignoreChecksums = SystemProperties.getBooleanProperty(RESOLUTION_SHA256_CHECKSUM_IGNORE_PROPERTY, false);
      boolean ignoreBindRepository = SystemProperties.getBooleanProperty(RESOLUTION_BIND_REPOSITORY_IGNORE_PROPERTY, false);

      boolean verifySha256Checksums = !ignoreChecksums && resolverConfiguration.isSha256ChecksumVerificationEnabled();
      boolean useBindRepositories = !ignoreBindRepository && resolverConfiguration.isBindRepositoryEnabled();

      resolveMissingDependencies(libs, lib -> {
        try {
          resolveMissingDependency(context, currentTargets, lib, verifySha256Checksums, useBindRepositories);
        }
        catch (Exception e) {
          throw new RuntimeException(e);
        }
      });
    }
  }
@SuppressWarnings("RedundantThrows")
  static void resolveMissingDependencies(CompileContext context, Collection<? extends JpsModule> modules,
                                         BuildTargetChunk currentTargets)