if (webModule.endsWith(".war"))
webModule = webModule.substring(0, webModule.lastIndexOf("."));
System.out.println("prepare web archive '" + webModule + "' ...");
Mapping mappingPortletXml = null;
Mapping mappingWebXml = null;
// get portlet xml mapping file
String _portlet_mapping =
webAppsDir + portalImplWebDir + "WEB-INF" + dirDelim + "data" + dirDelim + "xml" +dirDelim + "portletdefinitionmapping.xml";
mappingPortletXml = new Mapping();
try {
mappingPortletXml.loadMapping(_portlet_mapping);
} catch (Exception e) {
System.out.println("CASTOR-Exception: " + e);
throw new IOException(
"Failed to load mapping file " + _portlet_mapping);
}
File portletXml =
new File(webAppsDir + webModule + webInfDir + "portlet.xml");
// get web xml mapping file
String _web_mapping =
webAppsDir
+ portalImplWebDir
+ "WEB-INF" + dirDelim + "data" + dirDelim + "xml" + dirDelim + "servletdefinitionmapping.xml";
mappingWebXml = new Mapping();
try {
mappingWebXml.loadMapping(_web_mapping);
} catch (Exception e) {
throw new IOException(
"Failed to load mapping file " + _web_mapping);
}