RE: Combining two different Module Type as one Module - Liferay DXP?

thumbnail
Gnaniyar Zubair, modified 6 Years ago. Liferay Master Posts: 724 Join Date: 12/19/07 Recent Posts
We have a requirement to display Google Captcha in Login screen in Liferay DXP.   
Usually, we will customize the jsp and Login event / struts action in a same hook war in earlier versions ( 6.x ). 

we will follow below approach in Liferay DXP.
1. Create Module for  (login.web )JSP fragmentation / Dynamic include...etc, .
2. Create the Module for customizing  "/login/login"  MVCCommand ( Action / Resource ) to validate that captcha request. 

But my question is here, can we merge both customization ( JSP Fragment and MVCCommand) at one module?   [ Hope OSGI modularity architecture wont allow this scenario, but need to find alternate solution ]. 
Reason behind this is, I need to add "portlet.properties" inside the module to read some keys.
In this case, i have to add the same keys in both modules of "portlet.properties". Though we have a alternate solutions to add keys in "portal-ext.properties / portlet preference",  but need to find out the way for the above approach. 

Any idea guys?
thumbnail
David H Nebinger, modified 6 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
Fragment bundles have no "executable" state to them, they can only provide resources to the host bundle.


So in this case, no, you can't put them together because the MVC command overrides need to go into a real bundle. Now if you had a model listener, a service wrapper, some MVC commands for another portlet, etc? All of those can be merged into a single bundle (although I wouldn't recommend that at all).

There's no problem having a large number of cleanly organized bundles, the system has no problem with lots of bundles...
thumbnail
Gnaniyar Zubair, modified 6 Years ago. Liferay Master Posts: 724 Join Date: 12/19/07 Recent Posts
Got it David. Thanks for the clarification.