docs: private void generateLicenses(final Metadata m, final Element e) {
          for (final License license : m.getLicenses()) {
              final Element licenseElement = new Element("license", NS);
              addNotNullAttribute(licenseElement, "type", license.getType());
              addNotNullAttribute(licenseElement, "href", license.getHref());
              if (license.getValue() != null) {
                  licenseElement.addContent(license.getValue());
              }
              if (licenseElement.hasAttributes() || !licenseElement.getTextTrim().isEmpty()) {
                  e.addContent(licenseElement);
              }
          }
      }