/**
* Downloads and installs container into target directory, and then starts up container with specified configuration.
* @throws IOException
*/
public void setupContainer() throws IOException {
Installer installer = new ZipURLInstaller(new URL(getZipInstallerUrl()), "target/install/" + getContainerId());
installer.install();
ContainerFactory containerFac = new DefaultContainerFactory();
ConfigurationFactory configFac = new DefaultConfigurationFactory();
Configuration configuration =
configFac.createConfiguration(getContainerId(), ContainerType.INSTALLED, ConfigurationType.STANDALONE);
setConfigProps(configuration, getConfigProps());
container =
(InstalledLocalContainer) containerFac.createContainer(getContainerId(), ContainerType.INSTALLED, configuration);
container.setLogger(new SimpleLogger());
container.setHome(installer.getHome());
Map<String, String> props = getContainerProps();
if (props != null) {
container.setSystemProperties(props);
}