ext plugin not working in liferay 6.1.2 jboss7

2019-03-03 14:13发布

I created an ext-plugin for extending Liferay LDAP DefaultPortalToLDAPConverter. I created an ext plugin in eclipse. In the ext-impl/src/main/java/com/liferay/portal/security/ldap/CustomPortalToLDAPConverter i extended DefaultPortalToLDAPConverter and kept only the changed methods in my class. Also I added in ext-spring.xml

<bean id="portalToLDAPConverter" class="com.liferay.portal.security.ldap.CustomPortalToLDAPConverter" />

and then deployed the ext. The deployment went well without any errors. But the changes did not take place. Is there anything wrong in what I am doing? I use jboss7.1.1-final bundled Liferay6.1.2. I build using maven and then deploy by placing the war file in liferay-home/deploy. Then I tried restarting the server. Now I could see that my ext-spring.xml is missing in the jar file. Is there any specific reason for this? Please help.

2条回答
别忘想泡老子
2楼-- · 2019-03-03 14:30

Most of the tutorials say that the META-INF should be placed in the ext-impl/src or ext-impl/src/main folder. Doing so was not placing my ext-spring.xml in the jar build. Shifting the jar to ext-impl/src/main/resources helped and the META-INF was detected. Upon restarting, the changes took effect.

查看更多
我只想做你的唯一
3楼-- · 2019-03-03 14:47

Not compiled files that are meant to be put inside of class-path of resulting artifact should be placed in main/resources path: http://maven.apache.org/guides/getting-started/index.html#How_do_I_add_resources_to_my_JAR

查看更多
登录 后发表回答