code: public String[] getExternalIdPieces() {
          if (StringUtils.isNotBlank(path)) {
              return new String[] { path };
          } else if (moduleNames != null && moduleNames.length > 0) {
              return moduleNames;
          } else if (StringUtils.isNotBlank(name) && StringUtils.isNotBlank(version)) {
              if (StringUtils.isNotBlank(group)) {
                  return new String[] { group, name, version };
              } else if (StringUtils.isNotBlank(architecture)) {
                  return new String[] { name, version, architecture };
              } else {
                  return new String[] { name, version };
              }
          }
  
          // if we can't be positive about what kind of external id we are, just give everything we have in a reasonable order
          List<String> bestGuessPieces = new ArrayList<>();
  
          List<String> bestGuessCandidates = Arrays.asList(group, name, version, architecture);
          for (String candidate : bestGuessCandidates) {
              if (StringUtils.isNotBlank(candidate)) {
                  bestGuessPieces.add(candidate);
              }
          }
  
          return bestGuessPieces.toArray(new String[bestGuessPieces.size()]);
      }
docs: A forge is always required. The other fields to populate depend on what
  external id type you need. The currently supported types are:
  "name/version": populate name and version
  "architecture": populate name, version, and architecture
  "maven": populate name, version, and group
  "module names": populate moduleNames
  "path": populate path