Patches to easily support deployment on EAP6.

Improve EAP6 support in EAP profile.