code: public static boolean addWarToServer(
          LibertyServer targetServer, String targetDir,
          String warName, String[] warPackageNames, boolean addWarResources) throws Exception {
  
          String earName = null;
          boolean addEarResources = DO_NOT_ADD_RESOURCES;
  
          String jarName = null;
          boolean addJarResources = DO_NOT_ADD_RESOURCES;
          String[] jarPackageNames = null;
  
          return addToServer(
              targetServer, targetDir,
              earName, addEarResources,
              warName, warPackageNames, addWarResources,
              jarName, jarPackageNames, addJarResources);
      }
docs: Package a WAR and add it to a server.
  
  The rules of {@link #addToServer} are followed, using a null
  EAR name and a null JAR name.
  
  @param targetServer The server to which to add the EAR or WAR.
  @param targetDir The directory of the server in which to place
  the EAR or WAR.
  @param warName The name of the WAR which is to be created and added.
  @param warPackageNames The names of packages to be placed in the WAR.
  @param addWarResources Control parameter: Tells if resources are to
  be added for the WAR.
  
  @throws Exception Thrown if any of the steps fails.