private static void addResources(RemotePathTransformerFactory.Transformer transformer,
                                   final List<ResourceRootConfiguration> container,
                                   @NotNull Collection<MavenResource> resources) {

    for (MavenResource resource : resources) {
      final String dir = resource.getDirectory();

      final ResourceRootConfiguration props = new ResourceRootConfiguration();
      props.directory = transformer.toRemotePathOrSelf(FileUtil.toSystemIndependentName(dir));

      final String target = transformer.toRemotePathOrSelf(resource.getTargetPath());
      props.targetPath = target != null ? FileUtil.toSystemIndependentName(target) : null;

      props.isFiltered = resource.isFiltered();
      props.includes.clear();
      for (String include : resource.getIncludes()) {
        props.includes.add(include.trim());
      }
      props.excludes.clear();
      for (String exclude : resource.getExcludes()) {
        props.excludes.add(exclude.trim());
      }
      container.add(props);
    }
  }
private static void addResources(RemotePathTransformerFactory.Transformer transformer,
                                   final List<ResourceRootConfiguration> container,
                                   @NotNull Collection<MavenResource> resources)