code: public static String getValueFromServerConfiguration(final Server server, final String key) {
          if (server == null) {
              return null;
          }
  
          final Xpp3Dom configuration = (Xpp3Dom) server.getConfiguration();
          if (configuration == null) {
              return null;
          }
  
          final Xpp3Dom node = configuration.getChild(key);
          if (node == null) {
              return null;
          }
  
          return node.getValue();
      }
docs: Get string value from server configuration section in settings.xml.
  
  @param server Server object.
  @param key    Key string.
  @return String value if key exists; otherwise, return null.