0

I have created a separate hook plugin project for portal properties customization. When I deployed it got worked successfully. But when I add the hook configuration within a portlet plugin project the hook is not working.

I am adding the hook configuration within portlet plugin project because I need to access some spring services and db access. In the portlet plugin project I am already have those stuffs, so If I can add hook within portlet plugin project it will be easy to access those.

My WEB-INF structure is as given below

enter image description here

When I deploy the project I am getting the portlet deployed successfully and able to access but hook is not deployed

Can anyone please tell me some solution for this

Alex Man
  • 4,746
  • 17
  • 93
  • 178
  • The liferay-hook.xml should trigger the registration as hook. Can you check you log file if there is a message `Registering hook for (your WAR-ID)`? – Tobias Liefke Feb 09 '16 at 10:10
  • @TobiasLiefke thanks for the reply actually I planned to make the hook a separate project. do you have any idea on this SO question http://stackoverflow.com/questions/35269627/liferay-access-db-table-in-theme-no-bean-named-com-colors-themes-service-color – Alex Man Feb 09 '16 at 10:21

1 Answers1

0

There should not be any problem deploying together a portlet and a hook in the same project or war.

Your screenshot is showing an alert in liferay-hook.xml file. Does it provide any furder information?

aritzg
  • 39
  • 2
  • Thanks for the reply, but the problem is that when I deploy the project, in webapps the project is deployed with -portlet extension and I have not seen any -hook extension based deployement – Alex Man Feb 09 '16 at 11:50
  • It is absolutelly normal. If you include the hook and the portlet ( or even portlets) in a single war, there will be just one folder for them in webapps – aritzg Feb 09 '16 at 11:53