private static @Nullable ArtifactAuthenticationData obtainRemoteRepositoryAuthenticationData(
    @NotNull JpsRemoteRepositoryDescription description,
    @NotNull Map<String, JpsMavenSettings.RemoteRepositoryAuthentication> mavenSettingsXmlAuth
  ) {
    ArtifactAuthenticationData fromProperty = loadRemoteRepositoryAuthenticationFromSystemProperty(description);
    if (fromProperty != null) {
      return fromProperty;
    }

    String url = description.getUrl();
    for (DependencyAuthenticationDataProvider provider : JpsServiceManager.getInstance()
      .getExtensions(DependencyAuthenticationDataProvider.class)) {
      DependencyAuthenticationDataProvider.AuthenticationData authData = provider.provideAuthenticationData(url);
      if (authData != null) {
        return new ArtifactRepositoryManager.ArtifactAuthenticationData(authData.getUserName(), authData.getPassword());
      }
    }

    JpsMavenSettings.RemoteRepositoryAuthentication fromMavenSettings = mavenSettingsXmlAuth.get(description.getId());
    if (fromMavenSettings != null) {
      return new ArtifactAuthenticationData(fromMavenSettings.getUsername(), fromMavenSettings.getPassword());
    }
    return null;
  }
private static @Nullable ArtifactAuthenticationData obtainRemoteRepositoryAuthenticationData(
    @NotNull JpsRemoteRepositoryDescription description,
    @NotNull Map<String, JpsMavenSettings.RemoteRepositoryAuthentication> mavenSettingsXmlAuth
  )