new-integration-tests/src/test/java/oracle/weblogic/kubernetes/actions/impl/AppBuilder.java
public boolean archiveApp() {
    List<String> srcFiles  = params.srcDirList();
    String srcFile = srcFiles.get(0);
    String appName = srcFile.substring(srcFile.lastIndexOf("/") + 1, srcFile.lastIndexOf("."));
    try {
      String appDir = ARCHIVE_DIR + "/wlsdeploy/applications";
      cleanupDirectory(appDir);
      checkDirectory(appDir);
      for (String appSrcFile : srcFiles) {
        if (appSrcFile.length() > 0) {
          getLogger().info("copy {0]} to {1} ", appSrcFile, appDir);
          String fileName = appSrcFile.substring(appSrcFile.lastIndexOf("/") + 1);
          Files.copy(Paths.get(appSrcFile), Paths.get(appDir + "/" + fileName),
                  StandardCopyOption.REPLACE_EXISTING);
        }
      }
    } catch (IOException ioe) {
      getLogger().severe("Failed to get the directory " + ARCHIVE_DIR + " ready", ioe);
      return false;
    }

    String cmd = String.format(
            "cd %s ; zip -r %s.zip wlsdeploy/applications ",
            ARCHIVE_DIR,
            appName
    );

    return Command.withParams(
            defaultCommandParams()
                    .command(cmd)
                    .redirect(false))
            .execute();
  }
/**
   * Archive an application from provided ear or war file that can be used by WebLogic Image Tool
   * to create an image with the application for a model-in-image use case.
   *
   * @return true if the operation succeeds
   */
Archive an application from provided ear or war file that can be used by WebLogic Image Tool
to create an image with the application for a model-in-image use case.

@return true if the operation succeeds
Archive an application from provided ear or war file that can be used by WebLogic Image Tool to create an image with the application for a model - in - image use case . @return true if the operation succeeds
public boolean archiveApp() {
    List<String> srcFiles  = params.srcDirList();
    String srcFile = srcFiles.get(0);
    String appName = srcFile.substring(srcFile.lastIndexOf("/") + 1, srcFile.lastIndexOf("."));
    try {
      String appDir = ARCHIVE_DIR + "/wlsdeploy/applications";
      cleanupDirectory(appDir);
      checkDirectory(appDir);
      for (String appSrcFile : srcFiles) {
        if (appSrcFile.length() > 0) {
          getLogger().info("copy {0]} to {1} ", appSrcFile, appDir);
          String fileName = appSrcFile.substring(appSrcFile.lastIndexOf("/") + 1);
          Files.copy(Paths.get(appSrcFile), Paths.get(appDir + "/" + fileName),
                  StandardCopyOption.REPLACE_EXISTING);
        }
      }
    } catch (IOException ioe) {
      getLogger().severe("Failed to get the directory " + ARCHIVE_DIR + " ready", ioe);
      return false;
    }
    String cmd = String.format(
            "cd %s ; zip -r %s.zip wlsdeploy/applications ",
            ARCHIVE_DIR,
            appName
    );
    return Command.withParams(
            defaultCommandParams()
                    .command(cmd)
                    .redirect(false))
            .execute();
  }
public boolean archiveApp ( ) { List < String > srcFiles = params . srcDirList ( ) ; String srcFile = srcFiles . get ( 0 ) ; String appName = srcFile . substring ( srcFile . lastIndexOf ( "/" ) + 1 , srcFile . lastIndexOf ( "." ) ) ; try { String appDir = ARCHIVE_DIR + "/wlsdeploy/applications" ; cleanupDirectory ( appDir ) ; checkDirectory ( appDir ) ; for ( String appSrcFile : srcFiles ) { if ( appSrcFile . length ( ) > 0 ) { getLogger ( ) . info ( "copy {0]} to {1} " , appSrcFile , appDir ) ; String fileName = appSrcFile . substring ( appSrcFile . lastIndexOf ( "/" ) + 1 ) ; Files . copy ( Paths . get ( appSrcFile ) , Paths . get ( appDir + "/" + fileName ) , StandardCopyOption . REPLACE_EXISTING ) ; } } } catch ( IOException ioe ) { getLogger ( ) . severe ( "Failed to get the directory " + ARCHIVE_DIR + " ready" , ioe ) ; return false ; } String cmd = String . format ( "cd %s ; zip -r %s.zip wlsdeploy/applications " , ARCHIVE_DIR , appName ) ; return Command . withParams ( defaultCommandParams ( ) . command ( cmd ) . redirect ( false ) ) . execute ( ) ; }
Archive an application from provided ear or war file that can be used by WebLogic Image Tool
 to create an image with the application for a model-in-image use case.
Archive an application from provided ear or war file that can be used by WebLogic Image Tool to create an image with the application for a model - in - image use case .