gpt4 book ai didi

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

转载 作者:知者 更新时间:2024-03-14 19:02:49 26 4
gpt4 key购买 nike

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

ZipURLInstaller.<init>介绍

暂无

代码示例

代码示例来源:origin: apache/geode

new ZipURLInstaller(url, TMP_DIR + "/downloads", installDir);
installer.install();

代码示例来源:origin: stackoverflow.com

// (1) Optional step to install the container from a URL pointing to its distribution
Installer installer = new ZipURLInstaller(new URL("http://www.apache.org/dist/tomcat/tomcat-6/v6.0.20/bin/apache-tomcat-6.0.20.zip"));
installer.install();

// (2) Create the Cargo Container instance wrapping our physical container
LocalConfiguration configuration = (LocalConfiguration) new DefaultConfigurationFactory()
    .createConfiguration("tomcat6x"), ContainerType.INSTALLED, ConfigurationType.STANDALONE);
container = (InstalledLocalContainer) new DefaultContainerFactory()
    .createContainer("tomcat6x", ContainerType.INSTALLED, configuration);
container.setHome(installer.getHome());

// (3) Statically deploy some WAR (optional)
WAR deployable = new WAR("./webapp-testing-webapp/target/webapp-testing-webapp-1.0.war");
deployable.setContext("ROOT");
configuration.addDeployable(deployable);

// (4) Start the container
container.start();

代码示例来源: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: codehaus-cargo/cargo

/**
 * Creates the {@link ZipURLInstaller} with the appropriate configuration.
 * @param projectBuildDirectory Project build directory.
 * @return a new instance of {@link ZipURLInstaller} configured using the attributes specified
 * by the user
 */
public ZipURLInstaller createInstaller(String projectBuildDirectory)
{
  String extractDir = getExtractDir();
  if (extractDir == null)
  {
    extractDir = new File(projectBuildDirectory, EXTRACT_SUBDIRECTORY).getPath();
  }
  ZipURLInstaller installer = new ZipURLInstaller(getUrl(), getDownloadDir(), extractDir);
  if (getProxy() != null)
  {
    installer.setProxy(getProxy());
  }
  return installer;
}

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

/**
 * Creates the test ZIP URL installer and its fils system manager. {@inheritDoc}
 * @throws Exception If anything goes wrong.
 */
@Override
protected void setUp() throws Exception
{
  super.setUp();
  this.fsManager = new StandardFileSystemManager();
  this.fsManager.init();
  this.fileHandler = new VFSFileHandler(this.fsManager);
  this.installer = new ZipURLInstaller(new URL("http://some/url/resin-3.0.18.zip"));
  this.installer.setFileHandler(this.fileHandler);
}

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

/**
   * @return a new instance of {@link ZipURLInstaller} configured using the attributes specified
   * by the user
   */
  public ZipURLInstaller createInstaller()
  {
    ZipURLInstaller installer = new ZipURLInstaller(getInstallURL(), getDownloadDir(),
      getExtractDir());
    if (getProxy() != null)
    {
      installer.setProxy(getProxy());
    }
    return installer;
  }
}

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

/**
   * @return a new instance of {@link ZipURLInstaller} configured using the attributes specified
   * by the user
   */
  public ZipURLInstaller createInstaller()
  {
    ZipURLInstaller installer = new ZipURLInstaller(getInstallURL(), getDownloadDir(),
      getExtractDir());
    if (getProxy() != null)
    {
      installer.setProxy(getProxy());
    }
    return installer;
  }
}

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

public void runContainerAndWait(ProductContext ctx, String baseUrl, Path configDir, Path warFile, Map<String, String> sysProps, Map<String, String> props) throws IOException
  ZipURLInstaller installer = new ZipURLInstaller(new URL("http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.32/bin/apache-tomcat-6.0.32.zip"));
  installer.setExtractDir(ctx.getAppDir().toAbsolutePath().toString());
  installer.install();

代码示例来源:origin: stackoverflow.com

// (1) Optional step to install the container from a URL pointing to its distribution
 Installer installer = new ZipURLInstaller(
   new URL("http://repo1.maven.org/maven2/com/ibm/websphere/appserver/runtime/wlp-javaee7/8.5.5.9/wlp-javaee7-8.5.5.9.zip"));
 installer.install();
 // (2) Create the Cargo Container instance wrapping our physical container
 LocalConfiguration configuration = (LocalConfiguration) new DefaultConfigurationFactory().createConfiguration(
   "liberty", ContainerType.INSTALLED, ConfigurationType.STANDALONE);
 InstalledLocalContainer container =
   (InstalledLocalContainer) new DefaultContainerFactory().createContainer(
     "liberty", ContainerType.INSTALLED, configuration);
 container.setHome(installer.getHome());
 // (3) Statically deploy some WAR (optional)
 WAR war = new WAR("cargo.war");
 // (4) Set the context root for the application
 war.setContext("/myContext");
 configuration.addDeployable(war);
 // (5) Start the container
 container.start();

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

extractDirectory = extractDirectoryFile.getPath();
ZipURLInstaller installer = new ZipURLInstaller(homeURL, home.getParent(),
  extractDirectory);
if (getLog() != null)

代码示例来源: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();
  }
}

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