gpt4 book ai didi

org.codehaus.cargo.container.installer.ZipURLInstaller.getHome()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 18:32:49 27 4
gpt4 key购买 nike

本文整理了Java中org.codehaus.cargo.container.installer.ZipURLInstaller.getHome()方法的一些代码示例,展示了ZipURLInstaller.getHome()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipURLInstaller.getHome()方法的具体详情如下:
包路径:org.codehaus.cargo.container.installer.ZipURLInstaller
类名称:ZipURLInstaller
方法名:getHome

ZipURLInstaller.getHome介绍

暂无

代码示例

代码示例来源:origin: com.atlassian.cargo-test-runner/cargo-test-runner

/**
 * Use the home dir if specified by the user or download the container distribution and
 * installs it if an install URL has been specified. Also supports container not requiring a
 * home dir (embedded containers).
 * @param installURL
 * @param installDir
 */
private void setUpHome(URL installURL, File installDir) {
  if (installURL != null) {
    ZipURLInstaller installer = new ZipURLInstaller(installURL, null, installDir.getAbsolutePath());
    final SimpleLogger logger = new SimpleLogger();
    logger.setLevel(LogLevel.INFO);
    installer.setLogger(logger);
    installer.install();
    this.containerHome = new File(installer.getHome());
  }
}

代码示例来源:origin: com.atlassian.sdk/ap3-api

container.setHome(installer.getHome());
container.setSystemProperties(sysProps);

代码示例来源:origin: codehaus-cargo/cargo

/**
 * Test {@link ZipURLInstaller#getHome()} when container not installed yet.
 * @throws Exception If anything goes wrong.
 */
public void testGetHomeWhenContainerNotInstalled() throws Exception
{
  this.installer.setExtractDir("ram:///tmp");
  try
  {
    this.installer.getHome();
    fail("Should have thrown a container exception here");
  }
  catch (ContainerException expected)
  {
    assertEquals("Failed to get container installation home as the container has not yet "
      + "been installed. Please call install() first.", expected.getMessage());
  }
}

代码示例来源:origin: org.codehaus.cargo/cargo-ant

/**
 * Set up a home dir (possibly using a ZipURLInstaller).
 */
protected void setupHome()
{
  if (getHome() != null)
  {
    ((InstalledLocalContainer) getContainer()).setHome(getHome());
  }
  else if (getZipURLInstaller() != null)
  {
    ZipURLInstaller installer = getZipURLInstaller().createInstaller();
    installer.setLogger(getContainer().getLogger());
    installer.install();
    ((InstalledLocalContainer) getContainer()).setHome(installer.getHome());
  }
}

代码示例来源:origin: codehaus-cargo/cargo

/**
 * Set up a home dir (possibly using a ZipURLInstaller).
 */
protected void setupHome()
{
  if (getHome() != null)
  {
    ((InstalledLocalContainer) getContainer()).setHome(getHome());
  }
  else if (getZipURLInstaller() != null)
  {
    ZipURLInstaller installer = getZipURLInstaller().createInstaller();
    installer.setLogger(getContainer().getLogger());
    installer.install();
    ((InstalledLocalContainer) getContainer()).setHome(installer.getHome());
  }
}

代码示例来源:origin: codehaus-cargo/cargo

tmpHome = installer.getHome();
tmpHome = installer.getHome();

代码示例来源:origin: codehaus-cargo/cargo

/**
   * Test {@link ZipURLInstaller#getHome()} when container installed in two levels.
   * @throws Exception If anything goes wrong.
   */
  public void testGetHomeWhenContainerDistributionUnzipsInTwoLevels() throws Exception
  {
    this.fsManager.resolveFile("ram:///tmp/resin-3.0.18/resin-3.0.18/bin").createFolder();
    this.fsManager.resolveFile("ram:///tmp/resin-3.0.18/resin-3.0.18/lib").createFolder();
    this.fsManager.resolveFile("ram:///tmp/resin-3.0.18/resin-3.0.18/webapps").createFolder();
    this.fsManager.resolveFile("ram:///tmp/resin-3.0.18/.cargo").createFile();

    this.installer.setExtractDir("ram:///tmp");

    assertEquals("ram:///tmp/resin-3.0.18/resin-3.0.18", this.installer.getHome());
  }
}

代码示例来源:origin: codehaus-cargo/cargo

/**
   * Install container using {@link ZipURLInstaller}.
   * @return Location in which the container has been installed.
   */
  private String installContainer()
  {
    ZipURLInstaller installer = new ZipURLInstaller(getTestData().installURL,
      getTestData().downloadDir, getTestData().extractDir);
    installer.setLogger(getLogger());

    // Set up proxy
    if (getTestData().proxy != null)
    {
      Proxy userProxy = getTestData().proxy;
      userProxy.setLogger(getLogger());
      installer.setProxy(userProxy);
    }
    installer.install();

    return installer.getHome();
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com