code: public static void addEarToServerApps(LibertyServer server, String dir, String earName) throws Exception {
          server.copyFileToLibertyServerRoot(DIR_PUBLISH + server.getServerName() + "/" + dir, DIR_APPS, earName);
      }
docs: /*
  Helper method to create a ear and placed it to the specified directory which is relative from /publish/servers/ directory.