public ModuleContextImpl(Logger log, BridgeContext bridgeContext, ResourceResolver resolver) { // ModuleRuntime<?> lifeCycle; if (bridgeContext.getRunMode().isDynamic()) { ReadFileSystem<?> sourcePath = bridgeContext.getSourcePath(); log.info("Initializing live module at " + sourcePath.getDescription()); lifeCycle = new ModuleRuntime.Dynamic(log, Thread.currentThread().getContextClassLoader(), sourcePath); } else { log.info("Initializing module in " + bridgeContext.getRunMode().name().toLowerCase() + " mode"); ReadFileSystem<?> classPath = bridgeContext.getClassPath(); lifeCycle = new ModuleRuntime.Static(log, Thread.currentThread().getContextClassLoader(), classPath); } // this.bridgeContext = bridgeContext; this.resolver = resolver; this.runtime = lifeCycle; }
public ModuleContextImpl(Logger log, BridgeContext bridgeContext, ResourceResolver resolver) { // ModuleRuntime<?> lifeCycle; if (bridgeContext.getRunMode().isDynamic()) { ReadFileSystem<?> sourcePath = bridgeContext.getSourcePath(); log.info("Initializing live module at " + sourcePath.getDescription()); lifeCycle = new ModuleRuntime.Dynamic(log, Thread.currentThread().getContextClassLoader(), sourcePath); } else { log.info("Initializing module in " + bridgeContext.getRunMode().name().toLowerCase() + " mode"); ReadFileSystem<?> classPath = bridgeContext.getClassPath(); lifeCycle = new ModuleRuntime.Static(log, Thread.currentThread().getContextClassLoader(), classPath); } // this.bridgeContext = bridgeContext; this.resolver = resolver; this.runtime = lifeCycle; }
public static WebArchive createPortletDeployment(DescriptorBuilder config, Asset portletXML) { // WebArchive war = createDeployment(asDefault, config.getApplications()); AbstractWebTestCase.path = null; AbstractWebTestCase.servlet = false; // String sourcePath; try { sourcePath = config.getRunMode().isDynamic() ? getCompiler().getSourcePath().getRoot().getCanonicalFile().getAbsolutePath() : ""; } catch (IOException e) { throw failure("Could not read obtain source path", e); } // if (sourcePath != null) { config = config.sourcePath(sourcePath); } // web.xml descriptor config = config.embedPortletContainer(); war.setWebXML(new StringAsset(config.toWebXml())); war.addAsWebInfResource(portletXML, "portlet.xml"); // return war; }
public static WebArchive createPortletDeployment(DescriptorBuilder config, Asset portletXML) { // WebArchive war = createDeployment(asDefault, config.getApplications()); AbstractWebTestCase.path = null; AbstractWebTestCase.servlet = false; // String sourcePath; try { sourcePath = config.getRunMode().isDynamic() ? getCompiler().getSourcePath().getRoot().getCanonicalFile().getAbsolutePath() : ""; } catch (IOException e) { throw failure("Could not read obtain source path", e); } // if (sourcePath != null) { config = config.sourcePath(sourcePath); } // web.xml descriptor config = config.embedPortletContainer(); war.setWebXML(new StringAsset(config.toWebXml())); war.addAsWebInfResource(portletXML, "portlet.xml"); // return war; }