private static boolean allGroupsAreDifferent(Collection<MavenProject> mavenProjects) {
    Set<String> exitingGroups = new HashSet<>();

    for (MavenProject mavenProject : mavenProjects) {
      if (!exitingGroups.add(mavenProject.getMavenId().getGroupId())) {
        return false;
      }
    }

    return true;
  }
private static boolean allGroupsAreDifferent(Collection<MavenProject> mavenProjects)