public @Nullable String getResourceEncoding(Project project) {
    Element pluginConfiguration = getPluginConfiguration("org.apache.maven.plugins", "maven-resources-plugin");
    if (pluginConfiguration != null) {

      String encoding = pluginConfiguration.getChildTextTrim("encoding");
      if (encoding == null) {
        return null;
      }

      if (encoding.startsWith("$")) {
        MavenDomProjectModel domModel = MavenDomUtil.getMavenDomProjectModel(project, this.getFile());
        if (domModel == null) {
          MavenLog.LOG.warn("cannot get MavenDomProjectModel to find encoding");
          return getSourceEncoding();
        }
        else {
          MavenPropertyResolver.resolve(encoding, domModel);
        }
      }
      else {
        return encoding;
      }
    }
    return getSourceEncoding();
  }
public @Nullable String getResourceEncoding(Project project)