Package org.bladerunnerjs.model.exception.command

Examples of org.bladerunnerjs.model.exception.command.CommandOperationException


 
  private void validateArguments(String[] args) throws CommandOperationException
  {
    if (args.length < 1)
    {
      throw new CommandOperationException("Invalid arguments provided.");
    }
  }
View Full Code Here


  {
    File testRoot = new File(args[0]);
   
    if(testRoot.exists() == false)
    {
      throw new CommandOperationException("Supplied test path does not exist.");
    }
   
    if(testRoot.isDirectory())
    {
      return testRoot;
    }
   
    throw new CommandOperationException("Supplied test path does not exist.");
  }
View Full Code Here

      {
        return new URL(args[2]).toString();
      }
      catch (MalformedURLException e)
      {
        throw new CommandOperationException("'" + args[2] + "' is an invalid URL.");
      }
    }
   
    return "";
  }
View Full Code Here

    catch(InvalidDirectoryNameException | InvalidRootPackageNameException e) {
      throw new CommandArgumentsException("Failed to import application from zip '" + appZipName + "'.", e, this);
    }
    catch (Exception e)
    {
      throw new CommandOperationException("Failed to import application from zip '" + appZipName + "'.", e);
    }
   
    return 0;
  }
View Full Code Here

      NodeImporter.importBladeset(sourceBladeset.dir(), sourceApp.appConf().getRequirePrefix(), sourceApp.appConf().getRequirePrefix() + "/" + sourceBladesetName, targetBladeset);
     
      logger.println("Successfully copied " + sourceAppName + "/" + sourceBladesetName + " to " + targetAppName + "/" + targetBladesetName);
    }
    catch (IOException | ConfigException | InvalidSdkDirectoryException e) {
      throw new CommandOperationException(e);
    }
   
    return 0;
  }
View Full Code Here

     
      try {
        brjs = ThreadSafeStaticBRJSAccessor.initializeModel(sdkBaseDir);
      }
      catch(InvalidSdkDirectoryException e) {
        throw new CommandOperationException(e);
      }
     
      brjs.populate();
     
      injectLegacyCommands(brjs);
View Full Code Here

      FileUtils.write( app.file("WEB-INF/web.xml") , webXmlContents );
      FileUtils.copyDirectory(brjs.appJars().dir(), app.file("WEB-INF/lib"));
    }
    catch (TemplateInstallationException | IOException ex)
    {
      throw new CommandOperationException(ex);
    }
   
    String relativeWebInf = RelativePathUtility.get(brjs.getFileInfoAccessor(), app.root().dir(), app.file("WEB-INF"));
    logger.println(Messages.SUCCESSFULLY_J2EEIFIED_APP_MESSAGE, appName, relativeWebInf);
   
View Full Code Here

   
    try {
      logger.println(DependencyGraphReportBuilder.createReport(aspect, showAllDependencies)+"\n");
    }
    catch (ModelOperationException e) {
      throw new CommandOperationException(e);
    }
    return 0;
  }
View Full Code Here

      Process process = processBuilder.start();
      ProcessLogger processLogger = new ProcessLogger(brjs, process, LogLevel.INFO, LogLevel.WARN, null);
      int exitCode = waitForProcess(process, brjs.logger(CommandRunnerUtility.class));
      processLogger.waitFor();
     
      if(exitCode != 0) throw new CommandOperationException("Error while running command '" +
          StringUtils.join(processBuilder.command(), " ") + "' (" + exitCode + ")");
    }
    catch(IOException | InterruptedException e) {
      throw new CommandOperationException(e);
    }
  }
View Full Code Here

        app.build(appExportDir);
        logger.println(Messages.APP_BUILT_CONSOLE_MSG, appName, appExportDir.getCanonicalPath());
      }
    }
    catch (ModelOperationException | IOException e) {
      throw new CommandOperationException(e);
    }
   
    return 0;
  }
View Full Code Here

TOP

Related Classes of org.bladerunnerjs.model.exception.command.CommandOperationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.