.createContainer(install.getInstallId(), ContainerType.INSTALLED, configuration); container.setHome(install.getHome());
container.setHome(new File(containerHome));
container.setHome(new File(containerHome));
container.setHome(new File(containerHome));
/** * Use the home dir if specified by the user or download the container distribution and installs * it if an install URL has been specified. * @param container Container to configure with the extracted home. */ private void setUpHome(InstalledLocalContainer container) { if (getTestData().home != null) { container.setHome(getTestData().home); } else if (getTestData().installURL != null) { container.setHome(installContainer()); } }
/** * 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()); } }
/** * 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()); } }
container.setHome(installer.getHome()); container.setSystemProperties(sysProps);
// (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();
container.setHome(serverInformation.getContainerHome().getAbsolutePath()); container.setLogger(logger); String[] extraClasspath = serverInformation.getExtraClasspath();
/** * Creates the test file system manager and the container. {@inheritDoc} * @throws Exception If anything goes wrong. */ @Override protected void setUp() throws Exception { super.setUp(); fsManager = new StandardFileSystemManager(); fsManager.init(); fileHandler = new VFSFileHandler(fsManager); String testHome = "ram:/" + this.getClass().getName(); String configHome = testHome + "/config"; String containerHome = testHome + "/container"; fileHandler.mkdirs(configHome); fileHandler.mkdirs(containerHome); this.configuration = createLocalConfiguration(configHome); this.configuration.setFileHandler(fileHandler); this.container = createLocalContainer(configuration); this.container.setHome(containerHome); this.container.setFileHandler(fileHandler); }
targetLocation.getPath())); assertContainer.setLogger(getLogger()); assertContainer.setHome(targetLocation.getPath()); URL warPingURL = new URL("http://localhost:" + getTestData().port + "/simple-war/index.jsp");
container.setHome(tmpHome);