Foros de discusión

RE: Hook plug-in in 5.2.*

thumbnail
Amos Fong, modificado hace 15 años.

RE: Hook plug-in in 5.2.*

Liferay Legend Mensajes: 2047 Fecha de incorporación: 7/10/08 Mensajes recientes
Hey Yogesh,

Don't know if you found it yet, but this wiki might be helpful.http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Portal+Hook+Plugins
Yogesh Gowdra, modificado hace 15 años.

RE: Hook plug-in in 5.2.*

Junior Member Mensajes: 31 Fecha de incorporación: 6/04/09 Mensajes recientes
Hi Amos,
Thanks for the response.

I have seen that wiki and followed it exactly. I have copied a build file from portlet and altered it to fit my hook in folder and built it to auto deploy folder. Liferay just deploys it, but it does not registers it as a hook plug-in.

Here is my folder structure:

<hooks folder>
- <my_folder>
- docroot
- WEB-INF
-custom_jsps
-view.jsp
-view_category.jsp


I have liferay-hook.xml under web-inf and its content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 5.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_5_2_0.dtd">

<hook>
<custom-jsp-dir>/WEB-INF/custom_jsps</custom-jsp-dir>
</hook>

I am just trying to override liferay portal using this hook.

Here is build.xml under my folder:

<?xml version="1.0"?>
<project name="portlet" basedir="." default="deploy">
<import file="../build-common-hook.xml" />
</project>

Let me know what I am doing?

Thanks
thumbnail
Amos Fong, modificado hace 15 años.

RE: Hook plug-in in 5.2.*

Liferay Legend Mensajes: 2047 Fecha de incorporación: 7/10/08 Mensajes recientes
Hm...looks ok to me.

What shows up in the logs after you do a deploy? Do other portlets or hooks deploy ok?
Yogesh Gowdra, modificado hace 15 años.

RE: Hook plug-in in 5.2.*

Junior Member Mensajes: 31 Fecha de incorporación: 6/04/09 Mensajes recientes
Amos Fong:
Hm...looks ok to me.

What shows up in the logs after you do a deploy? Do other portlets or hooks deploy ok?


Found the problem. There was mix-up. I was trying to deploy hook on liferay which was built on extension environment. So when I did the same on clean liferay my hook started registering. but I am getting errors now. I want to use my portal.properties through hook and I have some extension classes for login. So when it tries to deploy hook I get classnotfoundexception for most classes found in jars that are part of liferay/web-inf/lib. So what are my options in making my hook to look into liferay jar files? I dont want to copy all those jars in my hook.war nor even specify 'portal.dependency.jars' in liferay-plugin-package, which internally does the same.

Thanks
thumbnail
Amos Fong, modificado hace 15 años.

RE: Hook plug-in in 5.2.*

Liferay Legend Mensajes: 2047 Fecha de incorporación: 7/10/08 Mensajes recientes
There could be, but I don't know of any other way.