baseDir = System.getProperty("user.dir");
}
final String appRoot = baseDir+"/../../src/webapp";
final ApplicationContext bootContext = new ClassPathXmlApplicationContext(bootConfigurations, true);
ctx = new ClassPathXmlApplicationContext(configurations, false, bootContext);
PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer();
Properties p = TestPortletApplicationManager.setTestProperties(baseDir, new Properties());
p.setProperty("supported.portletmode.autoswitch.config", "false");
p.setProperty("supported.portletmode.autoswitch.edit_defaults", "false");
p.setProperty("supported.portletmode.autoswitch.config.surrogate.portlet", "j2-admin::CustomConfigModePortlet");
p.setProperty(JetspeedEngineConstants.APPLICATION_ROOT_KEY, appRoot);
ppc.setProperties(p);
ctx.addBeanFactoryPostProcessor(ppc);
ctx.refresh();
// access portal application manager
portletApplicationManager = (PortletApplicationManagement)ctx.getBean("PAM");