private static void doConvert(Object object, String prefix, Map<String, String> result)
    throws IllegalAccessException, InvocationTargetException {
    for (Method each : ReflectionUtilRt.collectGetters(object.getClass())) {
      Class<?> type = each.getReturnType();
      if (shouldSkip(type)) continue;

      each.setAccessible(true);
      Object value = each.invoke(object);

      if (value != null) {
        String key = each.getName().substring(3);
        String name = prefix + key.substring(0, 1).toLowerCase() + key.substring(1);

        if (value instanceof String || value.getClass().isPrimitive()) {
          String sValue = String.valueOf(value);
          if (!isNativeToString(sValue, value)) {
            result.put(name, sValue);
          }
        }
        else {
          Package pack = type.getPackage();
          if (pack != null && pack.getName().startsWith("org.apache.maven")) {
            doConvert(value, name + ".", result);
          }
        }
      }
    }
  }
private static void doConvert(Object object, String prefix, Map<String, String> result)