New Feature: Shielded Classloading ----------------------------------- Key: MWAR-84 URL: http://jira.codehaus.org/browse/MWAR-84 Project: Maven 2.x War Plugin Issue Type: New Feature Affects Versions: 2.0.2 Reporter: Carsten Ziegeler Attachments: patch.txt
This patch adds a new option to the war plugin: it adds shielded class loading to the web application which means that all servlets, filters and listeners in the webapp do use an own classloader which works parent-last. So all classes are first searched in WEB-INF/classes and WEB-INF/lib and then in the parent classloader. This avoids all the typical problems which might occur when using commons-logging or when trying to have a different xerces/xalan version for your web application. The new feature rewrites the web.xml and adds wrappers to each servlet, listener and filter in order to make it working. In addition, by default, all jars are moved from WEB-INF/lib to WEB-INF/shielded/lib and everything from WEB-INF/classes to WEB-INF/shielded/classes. This can be turned off. We started this code as an own maven plugin in the Cocoon project. But the maven lifecycle does not allow to get the plugin at the correct stage (after the resources are copied to the webapp and before the war file is created). And as this is a more general function and not Cocoon specific, it makes much more sense to add this to the war plugin directly. The code has minimal impact on the current plugin and is an optional feature which is turned off by default. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira