Package com.alexecollins.vbox.core

Examples of com.alexecollins.vbox.core.VBox


  public VBox call() throws Exception {

    if (!target.exists() && !target.mkdirs())
      throw new IllegalStateException(target + " does not exit and cannot create");

    final VBox box = new VBox(context, resource.toURI());

    for (String f : ImmutableSet.<String>builder()
        .addAll(Arrays.asList("MediaRegistry.xml", "VirtualBox.xml", "Manifest.xml", "Provisioning.xml", "Profile.xml"))
        .addAll(box.getManifest().getFile()).build()) {
      FileUtils.copyURLToFile(getClass().getResource("/" + templateName + "/" + f), new File(target, f));
    }

    LOGGER.info("created " + target);
    return new VBox(context, target.toURI());
  }
View Full Code Here


  public void execute() throws BuildException {
    if (dir == null) {
      throw new BuildException("dir is null");
    }
    try {
      new Ssh(new VBox(context(), dir.toURI())).call();
    } catch (Exception e) {
      throw new BuildException(e);
    }
  }
View Full Code Here

  public void execute() throws BuildException {
    if (dir == null) {
      throw new BuildException("dir is null");
    }
    try {
      new Resume(new VBox(context(), dir.toURI())).call();
    } catch (Exception e) {
      throw new BuildException(e);
    }
  }
View Full Code Here

  public void execute() throws BuildException {
    if (dir == null) {
      throw new BuildException("dir is null");
    }
    try {
      new Suspend(new VBox(context(), dir.toURI())).call();
    } catch (Exception e) {
      throw new BuildException(e);
    }
  }
View Full Code Here

  public void execute() throws BuildException {
    if (dir == null) {
      throw new BuildException("dir is null");
    }
    try {
      new Provision(work(), new VBox(context(), dir.toURI()), Collections.<String>singleton("*")).call();
    } catch (Exception e) {
      throw new BuildException(e);
    }
  }
View Full Code Here

  public void execute() throws BuildException {
    if (dir == null) {
      throw new BuildException("dir is null");
    }
    try {
      new Stop(new VBox(context(), dir.toURI())).call();
    } catch (Exception e) {
      throw new BuildException(e);
    }
  }
View Full Code Here

    if (dir == null) {
      throw new BuildException("dir is null");
    }
    try {
      if (dir.exists()) {
        new DeleteDefinition(work(), new VBox(context(), dir.toURI())).call();
      }
    } catch (Exception e) {
      throw new BuildException(e);
    }
  }
View Full Code Here

    if (dir == null) {
      throw new BuildException("dir is null");
    }

    try {
      new PatchDefinition(work(), new VBox(context(), dir.toURI()), patches).call();
    } catch (Exception e) {
      throw new BuildException(e);
    }
  }
View Full Code Here

  public void execute() throws MojoExecutionException, MojoFailureException {
    try {
      final File file = new File(project.getBasedir(), "src/main/vbox/" + name);
      if (file.exists()) {
        new DeleteDefinition(new Work(getContext()), new VBox(getContext(), file.toURI())).call();
      }
    } catch (Exception e) {
      throw new MojoExecutionException("failed to create definition", e);
    }
  }
View Full Code Here

  public void execute() throws BuildException {
    if (dir == null) {
      throw new BuildException("dir is null");
    }
    try {
      System.out.println(new Status(new VBox(context(), dir.toURI())).call());
    } catch (Exception e) {
      throw new BuildException(e);
    }
  }
View Full Code Here

TOP

Related Classes of com.alexecollins.vbox.core.VBox

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.