public static List<MavenProfile> convertProfiles(Collection<? extends Profile> profiles) {
    if (profiles == null) return Collections.emptyList();
    List<MavenProfile> result = new ArrayList<MavenProfile>();
    for (Profile each : profiles) {
      String id = each.getId();
      if (id == null) continue;
      MavenProfile profile = new MavenProfile(id, each.getSource());
      List<String> modules = each.getModules();
      profile.setModules(modules == null ? Collections.emptyList() : modules);
      profile.setActivation(convertActivation(each.getActivation()));
      if (each.getBuild() != null) convertBuildBase(profile.getBuild(), each.getBuild());
      result.add(profile);
    }
    return result;
  }
public static List<MavenProfile> convertProfiles(Collection<? extends Profile> profiles)