getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/" + getPropertyValue(GeronimoPropertySet.GERONIMO_SERVLET_CONTAINER_ID) + "/config.xml", new File(configDir, "config.xml"), filterChain, "UTF-8"); getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/users.properties", new File(securityDir, "users.properties"), filterChain, "ISO-8859-1"); getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/groups.properties", new File(securityDir, "groups.properties"), filterChain, "ISO-8859-1"); String keystoresDir = getFileHandler().createDirectory(securityDir, "keystores"); getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/keystore", new File(keystoresDir, "geronimo-default")); getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/server-log4j.properties", new File(logDir, "server-log4j.properties"), filterChain, "ISO-8859-1"); getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/client-log4j.properties", new File(logDir, "client-log4j.properties"), filterChain, "ISO-8859-1"); getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/deployer-log4j.properties", new File(logDir, "deployer-log4j.properties"), filterChain, "ISO-8859-1");
/** * Filter configuration files. * @param container the current {@link LocalContainer}. * @throws IOException if something goes wrong with the file processing. */ private void filterResources(LocalContainer container) throws IOException { FilterChain chain = new JRun4xFilterChain(container); String to = getHome(); String libDir = getFileHandler().createDirectory(to, "lib"); String resourcePath = RESOURCE_PATH + container.getId(); // filter server name in servers.xml getResourceUtils().copyResource(resourcePath + "/servers.xml", new File(libDir, "/servers.xml"), chain, "UTF-8"); // filter VM config in jvm.config getFileHandler().createDirectory(to, "bin"); getResourceUtils().copyResource(resourcePath + "/jvm.config", new File(to + "/bin/jvm.config"), chain, "UTF-8"); String serverInf = "servers/" + getServerName() + "/SERVER-INF"; String serverInfDir = getFileHandler().createDirectory(getHome(), serverInf); // filter port and logging level in jrun.xml getResourceUtils().copyResource(resourcePath + "/jrun.xml", new File(serverInfDir, "/jrun.xml"), chain, "UTF-8"); // filter users in jrun-users.xml getResourceUtils().copyResource(resourcePath + "/jrun-users.xml", new File(serverInfDir, "/jrun-users.xml"), chain, "UTF-8"); // filter rmi port in jndi.propertiess getResourceUtils().copyResource(resourcePath + "/jndi.properties", new File(serverInfDir, "/jndi.properties"), chain, "ISO-8859-1"); }
/** * Filter configuration files. * @param container the current {@link LocalContainer}. * @throws IOException if something goes wrong with the file processing. */ private void filterResources(LocalContainer container) throws IOException { FilterChain chain = new JRun4xFilterChain(container); String to = getHome(); String libDir = getFileHandler().createDirectory(to, "lib"); String resourcePath = RESOURCE_PATH + container.getId(); // filter server name in servers.xml getResourceUtils().copyResource(resourcePath + "/servers.xml", new File(libDir, "/servers.xml"), chain, "UTF-8"); // filter VM config in jvm.config getFileHandler().createDirectory(to, "bin"); getResourceUtils().copyResource(resourcePath + "/jvm.config", new File(to + "/bin/jvm.config"), chain, "UTF-8"); String serverInf = "servers/" + getServerName() + "/SERVER-INF"; String serverInfDir = getFileHandler().createDirectory(getHome(), serverInf); // filter port and logging level in jrun.xml getResourceUtils().copyResource(resourcePath + "/jrun.xml", new File(serverInfDir, "/jrun.xml"), chain, "UTF-8"); // filter users in jrun-users.xml getResourceUtils().copyResource(resourcePath + "/jrun-users.xml", new File(serverInfDir, "/jrun-users.xml"), chain, "UTF-8"); // filter rmi port in jndi.propertiess getResourceUtils().copyResource(resourcePath + "/jndi.properties", new File(serverInfDir, "/jndi.properties"), chain, "ISO-8859-1"); }
String resourcePath = RESOURCE_PATH + container.getId();
String resourcePath = RESOURCE_PATH + container.getId();
/** * {@inheritDoc} */ @Override public void doConfigure(LocalContainer container) throws Exception { try { setupConfigurationDir(); FilterChain filterChain = createJettyFilterChain(); String etcDir = getFileHandler().createDirectory(getHome(), "etc"); getResourceUtils().copyResource(RESOURCE_PATH + "cargocpc.war", new File(getHome(), "cargocpc.war")); getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/webdefault.xml", new File(etcDir, "webdefault.xml"), filterChain, "UTF-8"); if (container.getOutput() != null) { activateLogging(container); } } catch (Exception e) { throw new ContainerException("Failed to create a " + container.getName() + " container configuration", e); } }
/** * {@inheritDoc} */ @Override public void doConfigure(LocalContainer container) throws Exception { try { setupConfigurationDir(); FilterChain filterChain = createJettyFilterChain(); String etcDir = getFileHandler().createDirectory(getHome(), "etc"); getResourceUtils().copyResource(RESOURCE_PATH + "cargocpc.war", new File(getHome(), "cargocpc.war")); getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/webdefault.xml", new File(etcDir, "webdefault.xml"), filterChain, "UTF-8"); if (container.getOutput() != null) { activateLogging(container); } } catch (Exception e) { throw new ContainerException("Failed to create a " + container.getName() + " container configuration", e); } }
/** * {@inheritDoc} */ @Override protected void doConfigure(LocalContainer container) throws Exception { setupConfigurationDir(); // make sure you use this method, as it ensures the same filehandler // that created the directory will be used to copy the resource. // This is especially important for unit testing getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/config.xml", getFileHandler().append(getDomainHome(), "config.xml"), getFileHandler(), getFilterChain(), "UTF-8"); WebLogic8xConfigXmlInstalledLocalDeployer deployer = new WebLogic8xConfigXmlInstalledLocalDeployer(container); deployer.deploy(getDeployables()); getResourceUtils().copyResource( RESOURCE_PATH + container.getId() + "/DefaultAuthenticatorInit.ldift", getFileHandler().append(getDomainHome(), "DefaultAuthenticatorInit.ldift"), getFileHandler(), getFilterChain(), "UTF-8"); deployCargoPing((WebLogicLocalContainer) container); }
/** * {@inheritDoc} */ @Override protected void doConfigure(LocalContainer container) throws Exception { setupConfigurationDir(); // make sure you use this method, as it ensures the same filehandler // that created the directory will be used to copy the resource. // This is especially important for unit testing getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/config.xml", getFileHandler().append(getDomainHome(), "config.xml"), getFileHandler(), getFilterChain(), "UTF-8"); WebLogic8xConfigXmlInstalledLocalDeployer deployer = new WebLogic8xConfigXmlInstalledLocalDeployer(container); deployer.deploy(getDeployables()); getResourceUtils().copyResource( RESOURCE_PATH + container.getId() + "/DefaultAuthenticatorInit.ldift", getFileHandler().append(getDomainHome(), "DefaultAuthenticatorInit.ldift"), getFileHandler(), getFilterChain(), "UTF-8"); deployCargoPing((WebLogicLocalContainer) container); }
getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/config.xml", getFileHandler().append(configDir, "config.xml"), getFileHandler(), filterChain, "UTF-8"); RESOURCE_PATH + container.getId() + "/DefaultAuthenticatorInit.ldift", getFileHandler().append(securityDir, "DefaultAuthenticatorInit.ldift"), getFileHandler(), filterChain, "UTF-8"); RESOURCE_PATH + container.getId() + "/SerializedSystemIni.dat", getFileHandler().append(securityDir, "SerializedSystemIni.dat"), getFileHandler());
getAntUtils().addTokenToFilterChain(filterChain, "tomcat.webapps", createTomcatWebappsToken()); getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/server.xml", serverXml, getFileHandler(), filterChain, "UTF-8");
getAntUtils().addTokenToFilterChain(filterChain, "tomcat.webapps", createTomcatWebappsToken()); getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/server.xml", serverXml, getFileHandler(), filterChain, "UTF-8");
getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/webdefault.xml", new File(etcDir, "webdefault.xml"), filterChain, "UTF-8");
getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/config.xml", getFileHandler().append(configDir, "config.xml"), getFileHandler(), filterChain, "UTF-8"); RESOURCE_PATH + container.getId() + "/DefaultAuthenticatorInit.ldift", getFileHandler().append(securityDir, "DefaultAuthenticatorInit.ldift"), getFileHandler(), filterChain, "UTF-8"); RESOURCE_PATH + container.getId() + "/SerializedSystemIni.dat", getFileHandler().append(securityDir, "SerializedSystemIni.dat"), getFileHandler());
getResourceUtils().copyResource(RESOURCE_PATH + container.getId() + "/webdefault.xml", new File(etcDir, "webdefault.xml"), filterChain, "UTF-8");
+ " archives are not supported for deployment in [" + getContainer().getId() + "]. Got [" + deployable.getFile() + "]");