Sampsa Sohlman 8 Years Ago Good post Domnik. There is also maven very powerful maven shade plugin for recreating jar files. Please sign in to reply. Reply as... Cancel
James Falkner 8 Years Ago Hey Dominik, thanks for the thoughtful and informative post! One question: does it depend on the plugin's sources being in the .war file? e.g. in the Social networking plugin, there are tons of *.java files. What if the plugin you wish to extend has no source code? Please sign in to reply. Reply as... Cancel Dominik Marks James Falkner 8 Years Ago The Maven War Overlay merges (respectively replaces) Web Resources (.xml, .properties, .jsp files and so on) and the Class files (.class). So it is not neccessary to have the source code of the original plugin.For developers it could be useful to have the source code, especially when replacing or extending existing Java classes in the original plugin. But it is not needed for my approach. Please sign in to reply. Reply as... Cancel
Dominik Marks James Falkner 8 Years Ago The Maven War Overlay merges (respectively replaces) Web Resources (.xml, .properties, .jsp files and so on) and the Class files (.class). So it is not neccessary to have the source code of the original plugin.For developers it could be useful to have the source code, especially when replacing or extending existing Java classes in the original plugin. But it is not needed for my approach. Please sign in to reply. Reply as... Cancel
Andreas Lecerof 8 Years Ago Thank you for your post. I tried this with the calendar portlet (EE) from the Marketplace - unfortunately without success.I get at few errors in catalina.out when deploying the extended plugin:Warning: META-INF/MANIFEST.MF modified in the future....(a lot more of similar) Warning: WEB-INF/classes/com/liferay/calendar/model modified in the future....09:23:02,714 INFO [localhost-startStop-3][HotDeployEvent:145] Plugin UU-Calendar-portlet requires marketplace-portlet...09:23:04,407 ERROR [localhost-startStop-3][HotDeployImpl:233] com.liferay.portal.kernel.deploy.hot.HotDeployException: Error registering portlets for UU-Calendar-portletUU-Calendar-portlet..Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/catalina/loader/WebappClassLoader) previously initiated loading for a different type with name "javax/portlet/PortletConfig" Any help is appreciated (I'm using Liferay 6.2)Best regards, Andreas Please sign in to reply. Reply as... Cancel Dominik Marks Andreas Lecerof 8 Years Ago The "modified in the future" warnings indicate that the timezone on your liferay server is incorrect. Check that the time in the server is the same as in your development machine. The LinkageError could be a problem if you try to deploy the same portlet twice (the original one and the modified one). Try to uninstall the original Calendar portlet first. Please sign in to reply. Reply as... Cancel
Dominik Marks Andreas Lecerof 8 Years Ago The "modified in the future" warnings indicate that the timezone on your liferay server is incorrect. Check that the time in the server is the same as in your development machine. The LinkageError could be a problem if you try to deploy the same portlet twice (the original one and the modified one). Try to uninstall the original Calendar portlet first. Please sign in to reply. Reply as... Cancel
Smira davar 7 Years Ago I also try to customize (with just a JSP hook) the liferay calendar portlet for liferfay version 6.2 with maven. I did everything according to your blog post, but now I don't know which are the next steps . For a normal JSP hook I would add a jsp hook configuration and select the JSP files from Liferay that I want to hook (in the Liferay IDE). But what should I do in this case of an external plugin? Please sign in to reply. Reply as... Cancel Dominik Marks Smira davar 7 Years Ago To overwrite a JSP of a custom plugin, just copy the original JSP to the same location in your plugin (/src/main/webapps/...). Please sign in to reply. Reply as... Cancel
Dominik Marks Smira davar 7 Years Ago To overwrite a JSP of a custom plugin, just copy the original JSP to the same location in your plugin (/src/main/webapps/...). Please sign in to reply. Reply as... Cancel
Daniel Martínez Cisneros 6 Years Ago Thanks for you post Dominik, was very useful for override calendar-portlet. I have added a maven project which override calendar tin case of someone need to follow your steps for this portlet. https://drive.google.com/file/d/0B_rBM3f4UT69UTBQM0VOVHJmLTg/view?usp=sharingKind regards. Please sign in to reply. Reply as... Cancel