String format = request.getParameter("format");
response.setRenderParameter("relativeServerPath",relativeServerPath);
PluginInstaller pluginInstaller = ManagementHelper.getManagementHelper(request).getPluginInstaller();
ServerArchiver archiver = ManagementHelper.getManagementHelper(request).getArchiver();
String[] configIds = request.getParameterValues("configId");
PluginListType list = getServerPluginList(request, pluginInstaller);
PluginListType installList = getPluginsFromIds(configIds, list);
try {
DownloadResults downloadResults = pluginInstaller.installPluginList("repository", relativeServerPath, installList);
archiver.archive(relativeServerPath, "var/temp", new Artifact(groupId, artifactId, version, format));
} catch (Exception e) {
throw new PortletException("Could not assemble server", e);
}
return ASSEMBLY_CONFIRM_MODE+BEFORE_ACTION;
}